Click here to Skip to main content
15,884,388 members
Home / Discussions / C#
   

C#

 
GeneralToolbar button images disappear at runtime Pin
Jason Liu20-Jan-04 13:34
Jason Liu20-Jan-04 13:34 
GeneralRe: Toolbar button images disappear at runtime Pin
Anders Molin20-Jan-04 15:20
professionalAnders Molin20-Jan-04 15:20 
GeneralRe: Toolbar button images disappear at runtime Pin
Jason Liu20-Jan-04 15:51
Jason Liu20-Jan-04 15:51 
GeneralRe: Toolbar button images disappear at runtime Pin
Anders Molin20-Jan-04 15:54
professionalAnders Molin20-Jan-04 15:54 
GeneralRe: Toolbar button images disappear at runtime Pin
Jason Liu20-Jan-04 21:55
Jason Liu20-Jan-04 21:55 
QuestionHow to insert a tab into the label text? Pin
Jason Liu20-Jan-04 13:30
Jason Liu20-Jan-04 13:30 
AnswerRe: How to insert a tab into the label text? Pin
Heath Stewart21-Jan-04 4:45
protectorHeath Stewart21-Jan-04 4:45 
GeneralWeird Prob with input keys and toolbar Pin
cgcrute20-Jan-04 12:26
cgcrute20-Jan-04 12:26 
I have a form where I have assigned the left and right cursor keys to perform functions, using the following code:

private void SAPtastic_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
e.Handled = true;
switch(e.KeyCode)
{
case Keys.D1: movecopysap("1"); break;
case Keys.D2: movecopysap("2"); break;
case Keys.D3: movecopysap("3"); break;
case Keys.D4: movecopysap("4"); break;
case Keys.D5: movecopysap("5"); break;
case Keys.D7: movecopysap("Unclassified"); break;

case Keys.NumPad1: movecopysap("1"); break;
case Keys.NumPad2: movecopysap("2"); break;
case Keys.NumPad3: movecopysap("3"); break;
case Keys.NumPad4: movecopysap("4"); break;
case Keys.NumPad5: movecopysap("5"); break;
case Keys.NumPad7: movecopysap("Unclassified"); break;
case Keys.Space: movecopysap("Unclassified"); break;
case Keys.Back: if (apnt > 0) {apnt = apnt - 1; LoadnScale();} break;
case Keys.Left: if (apnt > 0) {apnt = apnt - 1; LoadnScale();} break;
case Keys.Right: if (apnt < (al.Count-1))
{apnt = apnt + 1; LoadnScale();} break;

case Keys.Home: apnt = 0; LoadnScale(); break;
case Keys.End: apnt = al.Count -1; LoadnScale(); break;

default: e.Handled = true; break;

}
}

The odd thing about this was that whilst I did create an override on IsInputKey to allow me access to the cursor keys, it is never called - if I remove it there is no difference to the operation of the program.

That is not the REALLY WEIRD THING, I added a toolbar at user's request and now the cursor keys need to be pressed twice in order to get them to function. The above code is not called on the first keypress, but is on the second.

I gets worse... I included an option to not display the toolbar, if the toolbar is disabled - the keys work fine!

Any assistance would prevent me having yet another sleepless night and so would be much appreciated!

Chris
GeneralRe: Weird Prob with input keys and toolbar Pin
Heath Stewart21-Jan-04 4:37
protectorHeath Stewart21-Jan-04 4:37 
GeneralRe: Weird Prob with input keys and toolbar Pin
cgcrute21-Jan-04 4:50
cgcrute21-Jan-04 4:50 
Generalprinter Handshake Pin
Ankwa20-Jan-04 11:46
Ankwa20-Jan-04 11:46 
GeneralRe: printer Handshake Pin
Tom Larsen21-Jan-04 4:56
Tom Larsen21-Jan-04 4:56 
GeneralRe: printer Handshake Pin
Ankwa21-Jan-04 21:16
Ankwa21-Jan-04 21:16 
GeneralSecurity exception running from network Pin
cje20-Jan-04 11:19
cje20-Jan-04 11:19 
GeneralRe: Security exception running from network Pin
scadaguy20-Jan-04 11:34
scadaguy20-Jan-04 11:34 
GeneralRe: Security exception running from network Pin
cje20-Jan-04 11:42
cje20-Jan-04 11:42 
GeneralRe: Security exception running from network Pin
Heath Stewart20-Jan-04 14:58
protectorHeath Stewart20-Jan-04 14:58 
GeneralImage Rotation with GDI Pin
MrEyes20-Jan-04 9:29
MrEyes20-Jan-04 9:29 
GeneralRe: Image Rotation with GDI Pin
Mazdak20-Jan-04 9:45
Mazdak20-Jan-04 9:45 
GeneralRe: Image Rotation with GDI Pin
MrEyes21-Jan-04 6:07
MrEyes21-Jan-04 6:07 
GeneralXML Pin
Gary Kirkham20-Jan-04 8:16
Gary Kirkham20-Jan-04 8:16 
GeneralRe: XML Pin
Heath Stewart20-Jan-04 8:34
protectorHeath Stewart20-Jan-04 8:34 
GeneralRe: XML Pin
Gary Kirkham20-Jan-04 8:56
Gary Kirkham20-Jan-04 8:56 
GeneralPopUp Menu Pin
Inam20-Jan-04 7:33
Inam20-Jan-04 7:33 
GeneralRe: PopUp Menu Pin
Mazdak20-Jan-04 7:46
Mazdak20-Jan-04 7:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.