Click here to Skip to main content
16,005,169 members
Home / Discussions / C#
   

C#

 
GeneralFunction Help! Pin
DEWright_CA7-Apr-05 9:50
DEWright_CA7-Apr-05 9:50 
GeneralRe: Function Help! Pin
DavidNohejl7-Apr-05 10:56
DavidNohejl7-Apr-05 10:56 
GeneralRe: Function Help! Pin
DEWright_CA7-Apr-05 11:03
DEWright_CA7-Apr-05 11:03 
GeneralRe: Function Help! Pin
DavidNohejl7-Apr-05 11:22
DavidNohejl7-Apr-05 11:22 
GeneralRe: Function Help! Pin
DEWright_CA7-Apr-05 11:48
DEWright_CA7-Apr-05 11:48 
GeneralEvents from GUI Pin
Member 15698107-Apr-05 9:35
Member 15698107-Apr-05 9:35 
GeneralRe: Events from GUI Pin
DavidNohejl7-Apr-05 11:23
DavidNohejl7-Apr-05 11:23 
GeneralRe: Events from GUI Pin
C_Simpkins7-Apr-05 13:55
C_Simpkins7-Apr-05 13:55 
Noel,

On a WinForm, delegates are used to wire component/control events to the method that handles them. For a bit of background have a look at this article by Maysam here at The Code Project: Link. When you are working on a GUI (which is a WinForm) in Visual Studio, click on the control that you are interested in modifying and then look at the Properties window on the right side of the screen. If you click on the small yellow lightning bolt, you have an event editor built into the IDE. This provides a list of the events that you asked about in your last question. Double click on any event that you are interested in editing and it will (1) automatically code the delegate for you and (2) take you to the code view for your form so that you can add the code for the method that is fired when the event occurs. Anytime you return back to the design view, you can easily find the code for the method again by double clicking the event in the Event editor window. More specifically for your question about the "Form Closing" event, click on the topmost area of the form in the design view, click the yellow lightning in the Properties window, and scroll down to the "Closing" event. Double click on it and you're ready to code!

You can also find more information about all of the events for controls and components at Microsoft's site: http://msdn.microsoft.com. Search for whatever class you are interested in and it will have a members page that includes a description of all events. Here's an example for the combobox: Link.

Hope that this helps. Best of luck with your WinForms.

-CS
GeneralRe: Events from GUI Pin
Member 15698108-Apr-05 5:42
Member 15698108-Apr-05 5:42 
GeneralRe: Events from GUI Pin
C_Simpkins8-Apr-05 7:31
C_Simpkins8-Apr-05 7:31 
GeneralGet Programs from systray Pin
Dispulse7-Apr-05 9:17
Dispulse7-Apr-05 9:17 
GeneralRe: Get Programs from systray Pin
Sebastian Schneider7-Apr-05 20:02
Sebastian Schneider7-Apr-05 20:02 
GeneralRe: Get Programs from systray Pin
Dispulse7-Apr-05 21:53
Dispulse7-Apr-05 21:53 
GeneralC# storing MS word into ms Access as doc. Pin
remenard7-Apr-05 9:15
remenard7-Apr-05 9:15 
QuestionCand find DataReceived on SerialPort class? Pin
Snowjim7-Apr-05 8:28
Snowjim7-Apr-05 8:28 
GeneralEditing/Creating Group Policies in XP through C# Pin
Schleichermann7-Apr-05 7:15
Schleichermann7-Apr-05 7:15 
GeneralRe: Editing/Creating Group Policies in XP through C# Pin
Dave Kreskowiak7-Apr-05 9:31
mveDave Kreskowiak7-Apr-05 9:31 
GeneralRe: Editing/Creating Group Policies in XP through C# Pin
Schleichermann7-Apr-05 9:53
Schleichermann7-Apr-05 9:53 
GeneralRe: Editing/Creating Group Policies in XP through C# Pin
Dave Kreskowiak7-Apr-05 12:17
mveDave Kreskowiak7-Apr-05 12:17 
GeneralGeneral question about file updating Pin
Member 18639967-Apr-05 7:00
Member 18639967-Apr-05 7:00 
GeneralRe: General question about file updating Pin
Colin Angus Mackay7-Apr-05 12:45
Colin Angus Mackay7-Apr-05 12:45 
GeneralWrong Decryption Output Pin
thanhnhahuynh7-Apr-05 6:59
thanhnhahuynh7-Apr-05 6:59 
GeneralRe: Wrong Decryption Output Pin
mav.northwind7-Apr-05 20:15
mav.northwind7-Apr-05 20:15 
GeneralHtml stripping regex Pin
OmegaSupreme7-Apr-05 5:59
OmegaSupreme7-Apr-05 5:59 
GeneralAnalyzing javascript functions Pin
ShajeeDotNet7-Apr-05 5:03
ShajeeDotNet7-Apr-05 5:03 

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.