Click here to Skip to main content
15,921,577 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: Drawing Sunpath in my WinForms Pin
Christian Graus3-May-08 1:39
protectorChristian Graus3-May-08 1:39 
QuestionDrawing Sunpath in my WinForms Pin
Member 38458153-May-08 19:30
Member 38458153-May-08 19:30 
AnswerRe: Drawing Sunpath in my WinForms Pin
Christian Graus4-May-08 11:34
protectorChristian Graus4-May-08 11:34 
QuestionTwo TextBoxs and only one can contain any text at a given time [modified] Pin
Steve Messer1-May-08 9:11
Steve Messer1-May-08 9:11 
AnswerRe: Two TextBoxs and only one can contain any text at a given time Pin
SomeGuyThatIsMe2-May-08 8:46
SomeGuyThatIsMe2-May-08 8:46 
GeneralRe: Two TextBoxs and only one can contain any text at a given time Pin
Steve Messer2-May-08 11:57
Steve Messer2-May-08 11:57 
Questioncalling event from inside another event Pin
raydona1-May-08 7:34
raydona1-May-08 7:34 
AnswerRe: calling event from inside another event Pin
Luc Pattyn1-May-08 9:45
sitebuilderLuc Pattyn1-May-08 9:45 
Hi,

I don't have the complete answer, and my examples will be C#, but here it goes:

1.
you can call your own event handlers from anywhere you like, and provide real or dummy
arguments (if the handler does not use them, dummies would be sufficient), just look at
the handler's prototype and pass either null (=dummy), new MyEventArgs(...), or a real EventArg.

2.
However you are not really supposed to call event handlers directly; instead you should
cause events to happen. Some Controls have methods for this purpose, e.g.
Button.PerformClick().

3.
When the required method does not exist (e.g. typing to textbox) you could extract the core
of the KeyPress or KeyDown handler, put it in a new method, and call that at will, without
it requiring the object sender and the specialized EventArgs argument, using simple data
arguments instead (such as char theNewKeyChar).

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

I dislike the black-and-white voting system on questions/answers. Dead | X|


QuestionConvert txt to sysmbols!! Pin
s3rk430-Apr-08 23:46
s3rk430-Apr-08 23:46 
AnswerRe: Convert txt to sysmbols!! Pin
Kschuler1-May-08 3:43
Kschuler1-May-08 3:43 
GeneralRe: Convert txt to sysmbols!! [modified] Pin
s3rk41-May-08 6:52
s3rk41-May-08 6:52 
GeneralRe: Convert txt to sysmbols!! Pin
Kschuler1-May-08 7:27
Kschuler1-May-08 7:27 
GeneralRe: Convert txt to sysmbols!! Pin
s3rk41-May-08 9:56
s3rk41-May-08 9:56 
QuestionEnumChildWindows Pin
mehmetned30-Apr-08 20:59
mehmetned30-Apr-08 20:59 
AnswerRe: EnumChildWindows Pin
Christian Graus30-Apr-08 23:20
protectorChristian Graus30-Apr-08 23:20 
QuestionHow to display a Winform as rounded rectangle Pin
Member 391904930-Apr-08 9:08
Member 391904930-Apr-08 9:08 
AnswerRe: How to display a Winform as rounded rectangle Pin
Giorgi Dalakishvili30-Apr-08 9:17
mentorGiorgi Dalakishvili30-Apr-08 9:17 
GeneralRe: How to display a Winform as rounded rectangle Pin
Member 391904930-Apr-08 10:55
Member 391904930-Apr-08 10:55 
QuestionDATABOUND DATAGRIDVIEW Pin
Linn7230-Apr-08 2:46
Linn7230-Apr-08 2:46 
AnswerRe: DATABOUND DATAGRIDVIEW Pin
SomeGuyThatIsMe2-May-08 8:54
SomeGuyThatIsMe2-May-08 8:54 
QuestionRegarding Message Box size Pin
mrcsn30-Apr-08 0:29
mrcsn30-Apr-08 0:29 
AnswerRe: Regarding Message Box size Pin
N a v a n e e t h30-Apr-08 3:20
N a v a n e e t h30-Apr-08 3:20 
AnswerRe: Regarding Message Box size Pin
Hamid_RT4-May-08 4:51
Hamid_RT4-May-08 4:51 
Questionwindows programming Pin
Knowledgestudent29-Apr-08 22:48
Knowledgestudent29-Apr-08 22:48 
AnswerRe: windows programming Pin
Giorgi Dalakishvili29-Apr-08 22:59
mentorGiorgi Dalakishvili29-Apr-08 22:59 

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.