Click here to Skip to main content
15,898,588 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can I time a function? Pin
alwz_nikhil5-Jun-06 21:12
alwz_nikhil5-Jun-06 21:12 
QuestionHow do i position the output of a Response.Write() [modified] Pin
Red_Wizard_Shot_The_Food5-Jun-06 12:57
Red_Wizard_Shot_The_Food5-Jun-06 12:57 
AnswerRe: How do i position the output of a Response.Write() [modified] Pin
Christian Graus5-Jun-06 13:38
protectorChristian Graus5-Jun-06 13:38 
AnswerRe: How do i position the output of a Response.Write() [modified] Pin
liuqm.china5-Jun-06 16:29
liuqm.china5-Jun-06 16:29 
QuestionHow to show selected rectangle? Pin
Susuko5-Jun-06 12:50
Susuko5-Jun-06 12:50 
AnswerRe: How to show selected rectangle? Pin
stancrm5-Jun-06 22:51
stancrm5-Jun-06 22:51 
QuestionCalling event from the main form Pin
Raj Lal5-Jun-06 11:50
professionalRaj Lal5-Jun-06 11:50 
AnswerRe: Calling event from the main form [modified] Pin
Ed.Poore5-Jun-06 12:18
Ed.Poore5-Jun-06 12:18 
In you're event handler for the button on the frmToolbar Form you can use the Owner property to access an instance of the MainForm.  So something like this will work (in frmToolbar)

private void OnButtonClick(object sender, EventArgs e)
{
    ((MainForm)this.Owner).mnu1_Click(sender, e);
}


You're getting a non-static field error because (I'm taking a logical guess now) that you are referencing the class (hence you have to use a static property / method) when you really want to reference an instance of the class (and get member property / methods).

You don't need to use delegates, you're just not referencing an instance of the MainForm class.



You know you're a Land Rover owner when the best route from point A to point B is through the mud.

Ed
Last modified: 05 June 2006 17:20:57 -- Used the wrong property, should have been Owner not MdiParent D'Oh! | :doh:

GeneralRe: Calling event from the main form [modified] Pin
Raj Lal5-Jun-06 12:37
professionalRaj Lal5-Jun-06 12:37 
Questionhow to display image description? [modified] Pin
mujin035-Jun-06 10:44
mujin035-Jun-06 10:44 
Questionstruct methods Pin
mattlove5-Jun-06 10:16
mattlove5-Jun-06 10:16 
AnswerRe: struct methods [modified] Pin
Dustin Metzgar5-Jun-06 10:26
Dustin Metzgar5-Jun-06 10:26 
AnswerRe: struct methods Pin
Josh Smith5-Jun-06 10:37
Josh Smith5-Jun-06 10:37 
AnswerRe: struct methods Pin
Guffa5-Jun-06 10:59
Guffa5-Jun-06 10:59 
QuestionNeed help creating installer for project with Interop.SHDocVw.dll Pin
Vengeance5-Jun-06 10:10
Vengeance5-Jun-06 10:10 
AnswerRe: Need help creating installer for project with Interop.SHDocVw.dll Pin
Ed.Poore5-Jun-06 12:22
Ed.Poore5-Jun-06 12:22 
QuestionCodeDom question Pin
Pablo Hernandez Valdes5-Jun-06 9:57
Pablo Hernandez Valdes5-Jun-06 9:57 
AnswerRe: CodeDom question Pin
Dustin Metzgar5-Jun-06 10:22
Dustin Metzgar5-Jun-06 10:22 
QuestionDrawing in loop Pin
Nikhil Wason5-Jun-06 9:56
Nikhil Wason5-Jun-06 9:56 
AnswerRe: Drawing in loop [modified] Pin
Le centriste5-Jun-06 10:05
Le centriste5-Jun-06 10:05 
GeneralRe: Drawing in loop [modified] Pin
Nikhil Wason5-Jun-06 10:19
Nikhil Wason5-Jun-06 10:19 
GeneralRe: Drawing in loop [modified] Pin
Dan Neely5-Jun-06 10:29
Dan Neely5-Jun-06 10:29 
AnswerRe: Drawing in loop Pin
Le centriste5-Jun-06 10:17
Le centriste5-Jun-06 10:17 
GeneralRe: Drawing in loop Pin
Nikhil Wason5-Jun-06 10:21
Nikhil Wason5-Jun-06 10:21 
GeneralRe: Drawing in loop Pin
S. Senthil Kumar5-Jun-06 22:27
S. Senthil Kumar5-Jun-06 22:27 

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.