Solved

C# windows form application with SQL connection

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Latency in .net app using DB in .net 21 65
Diagnostics with Net and Net.Sockets 2 27
How to prevent website from publishing with errors 9 47
Cant save 3D 4 19
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!
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

770 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