Click here to Skip to main content
15,891,529 members
Home / Discussions / C#
   

C#

 
GeneralPage Structure Pin
Naji.A3-Jul-06 12:26
Naji.A3-Jul-06 12:26 
AnswerRe: Page Structure Pin
Guffa3-Jul-06 18:58
Guffa3-Jul-06 18:58 
GeneralFigured it Out [modified] Pin
Naji.A4-Jul-06 8:51
Naji.A4-Jul-06 8:51 
QuestionGet return value from one class to another Pin
Saamir28-Jun-06 11:04
Saamir28-Jun-06 11:04 
AnswerRe: Get return value from one class to another Pin
led mike28-Jun-06 11:22
led mike28-Jun-06 11:22 
AnswerRe: Get return value from one class to another Pin
Martin#28-Jun-06 11:26
Martin#28-Jun-06 11:26 
QuestionRe: Get return value from one class to another Pin
Saamir28-Jun-06 11:54
Saamir28-Jun-06 11:54 
AnswerRe: Get return value from one class to another Pin
Alexander Wiseman28-Jun-06 12:09
Alexander Wiseman28-Jun-06 12:09 
sasa,

ShowDialog is a synchronous function, which means it will only return and execute code after it when the form is closed. Using this function to display the form is a good idea if you want to force the user to respond to that form before continuing manipulation of the main form. If you are using this function, however, you will need to set all your variables before you call that function, like this:
report.SessionId = m_nSessionId;
report.ShowDialog();
Your code which you have does it in the reverse order, which is why it does not work.

Now Martin had suggested setting the variables after the call to the function called Show, which actually displays the form and returns immediately. His code works fine because the call to Show returns immediately.

Depending on whether you want the user to be able to manipulate both forms at the same time or whether you want to force the user to manipulate only the form you display until the user closes it, you can use Show or ShowDialog. If you use the latter, you will need to set the variables before the call to that function.

Hope that helps!

Sincerely,
Alexander Wiseman
QuestionRe: Get return value from one class to another Pin
Saamir28-Jun-06 12:20
Saamir28-Jun-06 12:20 
QuestionRe: Get return value from one class to another Pin
Alexander Wiseman28-Jun-06 12:28
Alexander Wiseman28-Jun-06 12:28 
QuestionRe: Get return value from one class to another Pin
Saamir28-Jun-06 16:20
Saamir28-Jun-06 16:20 
AnswerRe: Get return value from one class to another Pin
Alexander Wiseman28-Jun-06 16:30
Alexander Wiseman28-Jun-06 16:30 
QuestionRe: Get return value from one class to another [modified] Pin
Saamir28-Jun-06 16:32
Saamir28-Jun-06 16:32 
JokeRe: Get return value from one class to another Pin
Saamir28-Jun-06 16:40
Saamir28-Jun-06 16:40 
GeneralRe: Get return value from one class to another Pin
Alexander Wiseman28-Jun-06 16:48
Alexander Wiseman28-Jun-06 16:48 
AnswerRe: Get return value from one class to another Pin
Mike Poz28-Jun-06 12:12
Mike Poz28-Jun-06 12:12 
AnswerRe: Get return value from one class to another Pin
Rojan Gh.28-Jun-06 14:45
professionalRojan Gh.28-Jun-06 14:45 
Questionload a whole database into a DataSet Pin
hamidreza_buddy28-Jun-06 10:56
hamidreza_buddy28-Jun-06 10:56 
AnswerRe: load a whole database into a DataSet Pin
stancrm28-Jun-06 20:26
stancrm28-Jun-06 20:26 
QuestionXMLSerialize and Microsoft Controls Pin
3Dizard28-Jun-06 10:14
3Dizard28-Jun-06 10:14 
AnswerRe: XMLSerialize and Microsoft Controls Pin
BoneSoft28-Jun-06 10:55
BoneSoft28-Jun-06 10:55 
QuestionHelp with UserControl State Save and Restore Pin
TheBlindWatchmaker28-Jun-06 9:04
TheBlindWatchmaker28-Jun-06 9:04 
AnswerRe: Help with UserControl State Save and Restore [modified] Pin
Martin#28-Jun-06 9:59
Martin#28-Jun-06 9:59 
QuestionDatagridview.selectedValue help? Pin
PyroManiak28-Jun-06 8:38
PyroManiak28-Jun-06 8:38 
AnswerRe: Datagridview.selectedValue help? Pin
Mairaaj Khan28-Jun-06 20:11
professionalMairaaj Khan28-Jun-06 20:11 

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.