Click here to Skip to main content
15,910,471 members
Home / Discussions / C#
   

C#

 
GeneralRe: Delphi Dlls in C# Pin
Dave Shaw29-Oct-05 13:50
Dave Shaw29-Oct-05 13:50 
Questionpublic static const member? Pin
budidharma29-Oct-05 6:26
budidharma29-Oct-05 6:26 
AnswerRe: public static const member? Pin
S. Senthil Kumar29-Oct-05 7:46
S. Senthil Kumar29-Oct-05 7:46 
AnswerRe: public static const member? Pin
Robert Rohde29-Oct-05 20:49
Robert Rohde29-Oct-05 20:49 
QuestionHow to visualize a machine scheduling plan? Pin
bjung29-Oct-05 6:09
bjung29-Oct-05 6:09 
AnswerRe: How to visualize a machine scheduling plan? Pin
Tom Ollar29-Oct-05 10:42
Tom Ollar29-Oct-05 10:42 
QuestionPassing values to another Form Pin
rich_wenger29-Oct-05 6:06
rich_wenger29-Oct-05 6:06 
AnswerRe: Passing values to another Form Pin
S. Senthil Kumar29-Oct-05 7:54
S. Senthil Kumar29-Oct-05 7:54 
Just expose a property on the second form and set it from the first form.

Like this.
class SecondForm : Form
{
  bool val;
  public bool IsLoggedOn
  {
     set { val = value; }
  }
}

class FirstForm : Form
{
   public void SomeMethod()
   {
      SecondForm sf = new SecondForm();
      sf.IsLoggedOn = this.IsLoggedOn;
       ...
      sf.ShowDialog();
   }
}


Or, if you are passing "this" to the second form (like you did in your sample code), you can directly access the public variable, provided MyParentForm is typed strongly.

I'd recommend the first approach though.

Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
GeneralRe: Passing values to another Form Pin
rich_wenger29-Oct-05 10:00
rich_wenger29-Oct-05 10:00 
GeneralRe: Passing values to another Form Pin
S. Senthil Kumar29-Oct-05 19:17
S. Senthil Kumar29-Oct-05 19:17 
AnswerRe: Passing values to another Form Pin
Aldorado29-Oct-05 13:37
Aldorado29-Oct-05 13:37 
GeneralRe: Passing values to another Form Pin
S. Senthil Kumar29-Oct-05 19:15
S. Senthil Kumar29-Oct-05 19:15 
QuestionHow to determine namespace for a class Pin
SharpSmith29-Oct-05 4:52
SharpSmith29-Oct-05 4:52 
AnswerRe: How to determine namespace for a class Pin
Guffa29-Oct-05 5:12
Guffa29-Oct-05 5:12 
GeneralRe: How to determine namespace for a class Pin
SharpSmith29-Oct-05 5:32
SharpSmith29-Oct-05 5:32 
QuestionSocket Connections Pin
budidharma29-Oct-05 4:33
budidharma29-Oct-05 4:33 
AnswerRe: Socket Connections Pin
Rob Philpott29-Oct-05 13:24
Rob Philpott29-Oct-05 13:24 
QuestionAdd ListView columns at runtime Pin
atgp29-Oct-05 4:05
atgp29-Oct-05 4:05 
QuestionReading mails from exchange sever Pin
domyansumit29-Oct-05 1:25
domyansumit29-Oct-05 1:25 
QuestionRead the CPU fan speed from bios using C# or VC Pin
ajaikurian_200129-Oct-05 1:03
ajaikurian_200129-Oct-05 1:03 
QuestionRe: Read the CPU fan speed from bios using C# or VC Pin
BIJU Manjeri12-Oct-09 1:36
BIJU Manjeri12-Oct-09 1:36 
QuestionCan i use the delphi 5 compiled dll in .net like our com dll Pin
sukanyavarma29-Oct-05 0:31
sukanyavarma29-Oct-05 0:31 
AnswerRe: Can i use the delphi 5 compiled dll in .net like our com dll Pin
Kevin McFarlane29-Oct-05 3:52
Kevin McFarlane29-Oct-05 3:52 
QuestionDigitally Signed E-Mail Pin
MalikRizwan29-Oct-05 0:31
MalikRizwan29-Oct-05 0:31 
Questionproblem of image processing Pin
montu337728-Oct-05 22:45
montu337728-Oct-05 22:45 

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.