Click here to Skip to main content
15,913,773 members
Home / Discussions / C#
   

C#

 
GeneralRe: Saving objects in Files Pin
Niiiissssshhhhhuuuuu24-Sep-06 17:10
Niiiissssshhhhhuuuuu24-Sep-06 17:10 
GeneralRe: Saving objects in Files Pin
Ed.Poore24-Sep-06 22:54
Ed.Poore24-Sep-06 22:54 
GeneralRe: Saving objects in Files Pin
ezazazel25-Sep-06 8:25
ezazazel25-Sep-06 8:25 
GeneralRe: Saving objects in Files Pin
ezazazel25-Sep-06 8:26
ezazazel25-Sep-06 8:26 
QuestionKeyboard focus trouble with unmanaged code Pin
zapsolution24-Sep-06 5:13
zapsolution24-Sep-06 5:13 
AnswerRe: Keyboard focus trouble with unmanaged code Pin
Nader Elshehabi24-Sep-06 11:11
Nader Elshehabi24-Sep-06 11:11 
GeneralRe: Keyboard focus trouble with unmanaged code Pin
zapsolution24-Sep-06 11:43
zapsolution24-Sep-06 11:43 
GeneralRe: Keyboard focus trouble with unmanaged code Pin
Nader Elshehabi24-Sep-06 12:02
Nader Elshehabi24-Sep-06 12:02 
zapsolution wrote:
Thus when I put the focus on the graphic control it must keep it

Actually to make your control able to recieve focus -supposing it's inherited from the Control class-, you must call SetStyle(ControlStyles.Selectable, true) first. Otherwise it won't even recieve focus no matter how many Focus() calls or any other calls you make.
zapsolution wrote:
This is related to the fact that the form also uses the arrow keys
to navigate between the .NET child controls of the form.

If you want to make the direction keys move the spirit even if the buttons have the focus, you can implement the solution I provided in my previous post, yet note that if the user presses Enter or Spacebar the button which has the focus will be pressed.
zapsolution wrote:
Being new to C# I have no idea of what .NET realy does under the hood
in its message pump that would cause this havoc.

I don't see much of a havoc here. The message pump in .Net forms is very much similar to Win32, in fact you can send Win32 messages to .Net forms normally!! Also you can implement IMessageFilter interface to filter messages of your form before being processed, but I don't think that would do you much help. What you really need is to set the focus to the graphics control. Try the SetStyle() method in your control's constructor as it's a protected method.

RegardsRose | [Rose]

GeneralRe: Keyboard focus trouble with unmanaged code Pin
zapsolution24-Sep-06 20:29
zapsolution24-Sep-06 20:29 
QuestionCustom DataGridColumStyle with color dialog Pin
TeamWild24-Sep-06 3:27
TeamWild24-Sep-06 3:27 
AnswerRe: Custom DataGridColumStyle with color dialog Pin
Alexandr Sergeevich Ilyin24-Sep-06 6:06
Alexandr Sergeevich Ilyin24-Sep-06 6:06 
QuestionHow could i record a sound ?!!! Pin
Nafiseh Salmani24-Sep-06 2:06
Nafiseh Salmani24-Sep-06 2:06 
AnswerRe: How could i record a sound ?!!! Pin
mav.northwind24-Sep-06 2:28
mav.northwind24-Sep-06 2:28 
GeneralRe: How could i record a sound ?!!! Pin
Nafiseh Salmani24-Sep-06 20:22
Nafiseh Salmani24-Sep-06 20:22 
QuestionWhat is an easiest way of doing Background operation w/o affecting GUI Pin
engsrini24-Sep-06 1:53
engsrini24-Sep-06 1:53 
AnswerRe: What is an easiest way of doing Background operation w/o affecting GUI Pin
Stefan Troschuetz24-Sep-06 3:02
Stefan Troschuetz24-Sep-06 3:02 
GeneralRe: What is an easiest way of doing Background operation w/o affecting GUI Pin
engsrini24-Sep-06 3:26
engsrini24-Sep-06 3:26 
AnswerRe: What is an easiest way of doing Background operation w/o affecting GUI Pin
Tilewa24-Sep-06 3:23
Tilewa24-Sep-06 3:23 
GeneralRe: What is an easiest way of doing Background operation w/o affecting GUI Pin
engsrini24-Sep-06 3:24
engsrini24-Sep-06 3:24 
QuestionMultiview like control in C# Windows Forms App ? Pin
Yasen Georgiew24-Sep-06 0:49
Yasen Georgiew24-Sep-06 0:49 
AnswerRe: Multiview like control in C# Windows Forms App ? Pin
Christian Graus24-Sep-06 1:05
protectorChristian Graus24-Sep-06 1:05 
GeneralRe: Multiview like control in C# Windows Forms App ? Pin
Yasen Georgiew24-Sep-06 2:44
Yasen Georgiew24-Sep-06 2:44 
GeneralRe: Multiview like control in C# Windows Forms App ? Pin
Christian Graus24-Sep-06 10:33
protectorChristian Graus24-Sep-06 10:33 
Questionfill combobox by sqldatareader Pin
Mohammed Elkholy23-Sep-06 22:31
Mohammed Elkholy23-Sep-06 22:31 
AnswerRe: fill combobox by sqldatareader Pin
Garry Shutler23-Sep-06 22:58
Garry Shutler23-Sep-06 22:58 

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.