Click here to Skip to main content
15,925,723 members
Home / Discussions / C#
   

C#

 
GeneralRe: Searching for opponents, what do I need? Pin
Bill Dean23-Jul-04 8:25
Bill Dean23-Jul-04 8:25 
GeneralRe: Searching for opponents, what do I need? Pin
Dave Kreskowiak23-Jul-04 10:40
mveDave Kreskowiak23-Jul-04 10:40 
GeneralReceiving NoNullAllowedException setting SelectedValue from code. Pin
Brett Slaski22-Jul-04 12:01
Brett Slaski22-Jul-04 12:01 
GeneralRe: Receiving NoNullAllowedException setting SelectedValue from code. Pin
Heath Stewart22-Jul-04 12:11
protectorHeath Stewart22-Jul-04 12:11 
GeneralRe: Receiving NoNullAllowedException setting SelectedValue from code. Pin
Brett Slaski23-Jul-04 9:30
Brett Slaski23-Jul-04 9:30 
GeneralRe: Receiving NoNullAllowedException setting SelectedValue from code. Pin
Heath Stewart23-Jul-04 10:00
protectorHeath Stewart23-Jul-04 10:00 
Generalnon-static class referencing Pin
Wolfman3222-Jul-04 12:00
Wolfman3222-Jul-04 12:00 
GeneralRe: non-static class referencing Pin
Heath Stewart22-Jul-04 12:29
protectorHeath Stewart22-Jul-04 12:29 
You don't do anything in main. In your definition of Form1, pass this (Form1) to the constructos of other controls or as properties. If those controls are children of that Form, cast the childrens' Parent properties to Form1 and access what you need to (so long as it's public or internal (public only within an assembly)).

It's all about keep references of objects assigned to variables and passing them as parameters. This is simple, straight-forward object-oriented programming.

What does Form1_Load do? If you look at your source code for Form1, you'll see it's the event handler for the form's Load event. It was put there and is empty because you double-clicked the form at some point. VS.NET will automatically add an event handler for the default event when you double-click a control (like the Click event for a Button). Visual Basic 6 was no different.

I recommend reading through some articles here and reading about the .NET Framework at http://msdn.microsoft.com/netframework[^]. Understanding these simple concepts is crucial to developing applications - not just coding programs.

There are also many examples of such applications that you're working on, such as A designable propertytree for VS.NET[^].

Abstraction also fits very nicely into such a model.

 

Microsoft MVP, Visual C#
My Articles
Generalthe process and services... Pin
Wail A.Salem22-Jul-04 11:58
Wail A.Salem22-Jul-04 11:58 
GeneralRe: the process and services... Pin
Heath Stewart22-Jul-04 12:39
protectorHeath Stewart22-Jul-04 12:39 
QuestionGetTextExtent? Pin
Matt Gerrans22-Jul-04 10:01
Matt Gerrans22-Jul-04 10:01 
AnswerRe: GetTextExtent? Pin
Gary Thom22-Jul-04 10:06
Gary Thom22-Jul-04 10:06 
GeneralRe: GetTextExtent? Pin
Matt Gerrans22-Jul-04 19:25
Matt Gerrans22-Jul-04 19:25 
GeneralRun external program and wait Pin
Boaz V22-Jul-04 9:06
Boaz V22-Jul-04 9:06 
GeneralRe: Run external program and wait Pin
Heath Stewart22-Jul-04 9:25
protectorHeath Stewart22-Jul-04 9:25 
GeneralAtt: Heath Stewart - Browser Helper Objects Pin
Stuggo22-Jul-04 8:46
Stuggo22-Jul-04 8:46 
GeneralRe: Att: Heath Stewart - Browser Helper Objects Pin
Heath Stewart22-Jul-04 9:08
protectorHeath Stewart22-Jul-04 9:08 
GeneralCOM Ports Pin
eggie522-Jul-04 7:09
eggie522-Jul-04 7:09 
GeneralRe: COM Ports Pin
eggie522-Jul-04 7:42
eggie522-Jul-04 7:42 
GeneralRe: COM Ports Pin
Jae Sammy22-Jul-04 7:51
Jae Sammy22-Jul-04 7:51 
GeneralRe: COM Ports Pin
eggie522-Jul-04 8:01
eggie522-Jul-04 8:01 
GeneralRe: COM Ports Pin
Jae Sammy23-Jul-04 4:17
Jae Sammy23-Jul-04 4:17 
GeneralListView ColumnHeader class Pin
Andy H22-Jul-04 6:12
Andy H22-Jul-04 6:12 
GeneralRe: ListView ColumnHeader class Pin
Heath Stewart22-Jul-04 9:31
protectorHeath Stewart22-Jul-04 9:31 
GeneralPDF ActiveX Control Pin
Mr. Rogers22-Jul-04 6:12
Mr. Rogers22-Jul-04 6:12 

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.