Click here to Skip to main content
15,920,217 members
Home / Discussions / C#
   

C#

 
AnswerRe: control on non client area of form Pin
Christian Graus25-Dec-08 17:08
protectorChristian Graus25-Dec-08 17:08 
GeneralRe: control on non client area of form Pin
James_Zhang25-Dec-08 18:02
James_Zhang25-Dec-08 18:02 
Question[Visual Studio | C#] richtextbox problem Pin
lucas moretti25-Dec-08 14:31
lucas moretti25-Dec-08 14:31 
GeneralRe: [Visual Studio | C#] richtextbox problem Pin
Luc Pattyn25-Dec-08 14:47
sitebuilderLuc Pattyn25-Dec-08 14:47 
GeneralRe: [Visual Studio | C#] richtextbox problem Pin
lucas moretti25-Dec-08 14:59
lucas moretti25-Dec-08 14:59 
GeneralRe: [Visual Studio | C#] richtextbox problem Pin
Christian Graus25-Dec-08 15:24
protectorChristian Graus25-Dec-08 15:24 
GeneralRe: [Visual Studio | C#] richtextbox problem Pin
lucas moretti25-Dec-08 15:35
lucas moretti25-Dec-08 15:35 
GeneralRe: [Visual Studio | C#] richtextbox problem Pin
Luc Pattyn25-Dec-08 15:41
sitebuilderLuc Pattyn25-Dec-08 15:41 
Hi again,

the easiest way (not the cleanest way) is like so:
1. add public Form1 Form1; as a member of class Form2; it will hold
the reference to an already existing Form1 object.
2. add Form2.Form1=this; just before you do Form2.Show();
that is where you provide the information about Form1 to Form2.
3. drop Form1 Form1=new Form1(); so the following line modifies the
existing Form1, not a new one.

Much cleaner and better would be to use a delegate; that way you do not have to
expose Form1 to Form2 (the former approach gives Form2 a chance to change much more
than you really need).

You should study delegates when you are a bit more familiar with C#.
I suggest you work your way through a C# book of your choice.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Fixturized forever. Confused | :confused:


AnswerRe: [Visual Studio | C#] richtextbox problem Pin
N a v a n e e t h25-Dec-08 15:39
N a v a n e e t h25-Dec-08 15:39 
GeneralRe: [Visual Studio | C#] richtextbox problem Pin
lucas moretti25-Dec-08 15:44
lucas moretti25-Dec-08 15:44 
GeneralRe: [Visual Studio | C#] richtextbox problem Pin
Christian Graus25-Dec-08 16:19
protectorChristian Graus25-Dec-08 16:19 
Questionhow to invoke events of dynamically created controls Pin
DEEPNORTH25-Dec-08 11:41
DEEPNORTH25-Dec-08 11:41 
AnswerRe: how to invoke events of dynamically created controls Pin
Not Active25-Dec-08 12:17
mentorNot Active25-Dec-08 12:17 
AnswerRe: how to invoke events of dynamically created controls Pin
User 665825-Dec-08 13:04
User 665825-Dec-08 13:04 
GeneralRe: how to invoke events of dynamically created controls Pin
DEEPNORTH25-Dec-08 16:08
DEEPNORTH25-Dec-08 16:08 
GeneralRe: how to invoke events of dynamically created controls Pin
Luc Pattyn25-Dec-08 14:50
sitebuilderLuc Pattyn25-Dec-08 14:50 
Questiongridview problem Pin
bhatted25-Dec-08 4:28
bhatted25-Dec-08 4:28 
AnswerRe: gridview problem Pin
Lev Danielyan25-Dec-08 4:45
Lev Danielyan25-Dec-08 4:45 
GeneralRe: gridview problem Pin
bhatted25-Dec-08 11:09
bhatted25-Dec-08 11:09 
GeneralRe: gridview problem Pin
bhatted25-Dec-08 11:40
bhatted25-Dec-08 11:40 
QuestionStarting a process using Windows service in Vista Pin
queries36525-Dec-08 2:04
queries36525-Dec-08 2:04 
AnswerRe: Starting a process using Windows service in Vista Pin
Abhijit Jana25-Dec-08 3:27
professionalAbhijit Jana25-Dec-08 3:27 
GeneralRe: Starting a process using Windows service in Vista Pin
queries36525-Dec-08 19:24
queries36525-Dec-08 19:24 
GeneralRe: Starting a process using Windows service in Vista Pin
#realJSOP25-Dec-08 23:54
professional#realJSOP25-Dec-08 23:54 
GeneralRe: Starting a process using Windows service in Vista Pin
DaveyM6926-Dec-08 0:03
professionalDaveyM6926-Dec-08 0: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.