Solved

C# windows form application with SQL connection

Posted on 2010-11-09
2
1,054 Views
Last Modified: 2013-12-17
Hi,
 
I'm developing an application called SysCons.. This application receives data from a serial port and stores it in a database and displays it on the screen..

I have already done with the connection part and everything works fine and also I have a sample database attached to see what kind of data I receive.

This application has been programmed in such a way that on start up when the user presses F10 the application loads the most recent 50 rows from the database and displays it on the screen.

The buffer or temp database table which I have created is called as currentTable which stores the data in a buffer before it is being pushed into the database.

The application is not in history mode when it is first initialized. Now I need an help so that when the user does PAGEUP and PAGEDOWN then the data on the screen should be refreshed. The table which I have created to hold the history data in a buffer is called HistoryTable.

I'm attaching my working application if you want to have a look at it... There is no to worry about serial port and all... Just u can run it without the need of any hardware interfaces. Just change the path of the database.

C-Application.zip
0
Comment
Question by:sairam123
2 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 400 total points
ID: 34093382
http://edn.embarcadero.com/article/30129  

add a case for the appropriate keys and call your refresh routine.

case Keys.PgDown,  Keys.PgUp:  Refresh(); break;

private void WinForm_KeyDown(object sender,

             System.Windows.Forms.KeyEventArgs e)

{

  e.Handled = true;



  switch(e.KeyCode) {

    case Keys.Left:   label1.Text = "Left Arrow";   break;

    case Keys.Right:  label1.Text = "Right Arrow";  break;

    case Keys.Up:     label1.Text = "Up Arrow";     break;

    case Keys.Down:   label1.Text = "Down Arrow";   break;

    case Keys.Space:  label1.Text = "Space";        break;

    default:          e.Handled   = true;           break;

  }

}

Open in new window

0
 
LVL 21

Assisted Solution

by:Alpesh Patel
Alpesh Patel earned 100 total points
ID: 34101629
Hi,

write code on Form KeyDown, KeyUp or KeyPress event to sense the PageUP and PAge Down key is pressed.

If that is pressed then bind data again.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now