Click here to Skip to main content
15,899,026 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to Encrypt Data and Save to Registry ? Pin
Christian Graus31-Oct-06 15:52
protectorChristian Graus31-Oct-06 15:52 
GeneralRe: How to Encrypt Data and Save to Registry ? Pin
matt cole31-Oct-06 19:07
matt cole31-Oct-06 19:07 
GeneralRe: How to Encrypt Data and Save to Registry ? Pin
Haseeb Mukhtar31-Oct-06 19:54
Haseeb Mukhtar31-Oct-06 19:54 
QuestionNew buttons styles... Pin
Lucas Eduardo31-Oct-06 9:49
Lucas Eduardo31-Oct-06 9:49 
AnswerRe: New buttons styles... Pin
Dan Neely31-Oct-06 9:56
Dan Neely31-Oct-06 9:56 
GeneralRe: New buttons styles... Pin
Guffa31-Oct-06 14:05
Guffa31-Oct-06 14:05 
GeneralRe: New buttons styles... Pin
Dan Neely1-Nov-06 2:15
Dan Neely1-Nov-06 2:15 
QuestionPassing Data to a Child Form Pin
Jason887231-Oct-06 7:40
Jason887231-Oct-06 7:40 
The project i am currently working on is receiving data through a TCPClient from a server. The server is sending messages to the clients. I have this part working.

When the server sends an initalization message, the client form received this message on a seperate thread. I then use Invoke to pass this message to the thread of the client form.

	<br />
public delegate void InvokeData(DataMessageClass d);<br />
	<br />
private void Client_DataReceived(object sender, DataMessageEventArgs e)<br />
{<br />
this.Invoke(new InvokeData(this.Data), new object[] { e.DataMessage });<br />
}<br />
<br />
private void Data(DataMessageClass dataMessage)<br />
{<br />
	switch(dataMessage.MessageType)<br />
	{<br />
		case INIT:<br />
		{<br />
// Open form using ShowDialog(this)<br />
break;<br />
}<br />
}<br />


What i would like to do is open the child form using ShowDialog ( to prevent the user from hiding it and interacting with the parent until its close ), but receive the additional messages on this child form instead of the parent form. When the message is a COMPLETE message, the child form will close and the parent will again listen for the INIT message to start the process over again.

I know that ShowDialog is blocking as it will block all additional messages comming in from the server until the child form is closed.

I have tried to assign the event on the child form however the messages are not received on the child until the for is close.

I have been able to make this work with the parent reveiving all the message and then passing them on to the child form. In order to make it work this way, i have had to use Show() which allows the user to hide the form behind the parent form.

I am at a loss as to what to try next.Confused | :confused:
AnswerRe: Passing Data to a Child Form Pin
Cliff Stanford31-Oct-06 11:08
Cliff Stanford31-Oct-06 11:08 
GeneralRe: Passing Data to a Child Form Pin
Jason887231-Oct-06 11:53
Jason887231-Oct-06 11:53 
GeneralRe: Passing Data to a Child Form Pin
luckykhalid31-Oct-06 19:01
luckykhalid31-Oct-06 19:01 
GeneralRe: Passing Data to a Child Form Pin
Cliff Stanford1-Nov-06 3:39
Cliff Stanford1-Nov-06 3:39 
Questionupgraded to 2005 now msi Installer Package does not work...HELP Pin
koalalh31-Oct-06 6:35
koalalh31-Oct-06 6:35 
QuestionHelp Me Pin
minibansal31-Oct-06 5:38
minibansal31-Oct-06 5:38 
AnswerRe: Help Me Pin
Alaric_31-Oct-06 5:59
professionalAlaric_31-Oct-06 5:59 
GeneralRe: Help Me Pin
minibansal31-Oct-06 6:42
minibansal31-Oct-06 6:42 
AnswerRe: Help Me Pin
mav.northwind31-Oct-06 6:02
mav.northwind31-Oct-06 6:02 
GeneralRe: Help Me Pin
Alaric_31-Oct-06 6:07
professionalAlaric_31-Oct-06 6:07 
QuestionWeb Browser Pin
hoatien31-Oct-06 5:29
hoatien31-Oct-06 5:29 
AnswerRe: Web Browser Pin
led mike31-Oct-06 6:12
led mike31-Oct-06 6:12 
AnswerRe: Web Browser Pin
luckykhalid31-Oct-06 19:10
luckykhalid31-Oct-06 19:10 
Questionhow to make datagrid cell invisible? Pin
econnor31-Oct-06 4:49
econnor31-Oct-06 4:49 
AnswerRe: how to make datagrid cell invisible? Pin
sam#31-Oct-06 5:33
sam#31-Oct-06 5:33 
GeneralRe: how to make datagrid cell invisible? Pin
econnor31-Oct-06 5:37
econnor31-Oct-06 5:37 
QuestionWeird crashes Pin
Bekjong31-Oct-06 4:44
Bekjong31-Oct-06 4:44 

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.