Click here to Skip to main content
15,922,015 members
Home / Discussions / C#
   

C#

 
GeneralRe: Custom textbox with a unchangable text Pin
Not Active18-Jul-05 7:56
mentorNot Active18-Jul-05 7:56 
GeneralRetrieving Printer Test Page Data Pin
Neomaya18-Jul-05 5:00
Neomaya18-Jul-05 5:00 
GeneralRe: Retrieving Printer Test Page Data Pin
Dave Kreskowiak18-Jul-05 7:10
mveDave Kreskowiak18-Jul-05 7:10 
GeneralRe: Retrieving Printer Test Page Data Pin
Neomaya18-Jul-05 7:47
Neomaya18-Jul-05 7:47 
GeneralRe: Retrieving Printer Test Page Data Pin
Dave Kreskowiak18-Jul-05 8:42
mveDave Kreskowiak18-Jul-05 8:42 
Generalhelp with System.NullReferenceException Pin
theStorminMormon18-Jul-05 4:11
theStorminMormon18-Jul-05 4:11 
GeneralRe: help with System.NullReferenceException Pin
emc218-Jul-05 4:37
emc218-Jul-05 4:37 
GeneralRe: help with System.NullReferenceException Pin
theStorminMormon18-Jul-05 4:55
theStorminMormon18-Jul-05 4:55 
Thanks for responding.

I ran the debugger and double-checke that the theParent object is not empty. It's not.

The value I get for it is:

Benefit_Select_Application.frmCostTracker frmSetupNewCostTracker01.theParent

Trying to track down the problem I also tried adding the line:
MessageBox.Show(theParent.hasSetupCostTracker.ToString());
in the cancel button method to see if I could at least access the value of the hasCostTracker variable. I got this error:

Cannot pass 'Benefit_Select_Application.frmCostTracker.hasSetupCostTracker' as ref or out, because 'Benefit_Select_Application.frmCostTracker.hasSetupCostTracker' is a marshal-by-reference class


I have no idea what a "marshal-by-refernce" class is.

OK - while I was typing this message I tried something else, and now it works. I copied the line from the constructor
(theParent = (frmCostTracker)this.MdiParent;) into the cancel button method. So now it works.

But I'm still curious, do you know why the exact same code successfully initializes the reference in the cancel_button method but not in the constructor (there's only 1 constructor).

Thanks for your help.

The ends can never justify the means. It is the means that determine the ends.
GeneralMinimised to taskbar Pin
emc218-Jul-05 4:03
emc218-Jul-05 4:03 
GeneralRe: Minimised to taskbar Pin
emc218-Jul-05 4:30
emc218-Jul-05 4:30 
GeneralRe: Minimised to taskbar Pin
Judah Gabriel Himango18-Jul-05 6:11
sponsorJudah Gabriel Himango18-Jul-05 6:11 
GeneralRe: Minimised to taskbar Pin
Anonymous19-Jul-05 8:28
Anonymous19-Jul-05 8:28 
Generaln-tier apps Pin
mr_seus18-Jul-05 3:50
mr_seus18-Jul-05 3:50 
GeneralRe: n-tier apps Pin
Judah Gabriel Himango18-Jul-05 8:56
sponsorJudah Gabriel Himango18-Jul-05 8:56 
GeneralRe: n-tier apps Pin
ekynox24-Aug-07 1:38
ekynox24-Aug-07 1:38 
Generalexit after if statement (new one) Pin
PaulaM18-Jul-05 3:18
PaulaM18-Jul-05 3:18 
GeneralRe: exit after if statement (new one) Pin
leppie18-Jul-05 3:26
leppie18-Jul-05 3:26 
GeneralRe: exit after if statement (new one) Pin
dwatkins@dirq.net18-Jul-05 3:46
dwatkins@dirq.net18-Jul-05 3:46 
GeneralRe: exit after if statement (new one) Pin
J4amieC18-Jul-05 5:19
J4amieC18-Jul-05 5:19 
GeneralPassing a binary file(stream) to the presentation layer Pin
roy_huntley18-Jul-05 3:08
roy_huntley18-Jul-05 3:08 
GeneralRe: Passing a binary file(stream) to the presentation layer Pin
Not Active18-Jul-05 3:36
mentorNot Active18-Jul-05 3:36 
GeneralRe: Passing a binary file(stream) to the presentation layer Pin
roy_huntley18-Jul-05 3:55
roy_huntley18-Jul-05 3:55 
GeneralRe: Passing a binary file(stream) to the presentation layer Pin
Not Active18-Jul-05 4:36
mentorNot Active18-Jul-05 4:36 
GeneralRe: Passing a binary file(stream) to the presentation layer Pin
Member 46143018-Jul-05 9:05
Member 46143018-Jul-05 9:05 
GeneralAttribute Tree Pin
Member 149813818-Jul-05 2:52
Member 149813818-Jul-05 2:52 

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.