Click here to Skip to main content
15,917,328 members
Home / Discussions / C#
   

C#

 
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 
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 
Hi. You can do it bay many ways.
one of the simplest way is to write the value of boolean to the hard desk and then to read it from the second form.

in the first form:

private void SaveInfo()
{
try
{
FileStream file = new FileStream("info.txt",FileMode.Create);
StreamWriter sw = new StreamWriter(file);

sw.WriteLine(IsLoggedOn.ToString(),true);
sw.Close();
}
catch(System.Exception se)
{
MessageBox.Show(se.ToString());
}
}

and then you have to call this method from the method that call the other form.

in the second form:

private bool ReadInfo()
{
try
{
FileStream file = new FileStream("info.txt",FileMode.Open);
StreamReader sr = new StreamReader(file);

bool b = sr.ReadLine();
sr.Close();
}
catch(System.Exception se)
{
MessageBox.Show(se.ToString());
}
return b;
}

so now bool b has the value of IsLoggedOn.
There are other ways but this on is simple.

Thanks.


Asaad Mamoun Hassan
Bc in Computer Science.
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 
GeneralRe: problem of image processing Pin
Guffa29-Oct-05 1:04
Guffa29-Oct-05 1:04 
Questionupdating a database from a form Pin
luvs2code28-Oct-05 20:33
luvs2code28-Oct-05 20:33 
Questioninput MASK for datagrid Pin
deep728-Oct-05 19:24
deep728-Oct-05 19:24 

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.