Solved

C# windows form application with SQL connection

Posted on 2010-11-09
2
1,057 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

685 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