By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,167 Members | 1,688 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,167 IT Pros & Developers. It's quick & easy.

windows form not displaying

P: n/a
Briefly this is my problem .

I created a windows form on a "parent thread" .. then I called a child
thread 1 to make it visible then hide it on that same thread .. then kill
child thread 1 ... then try to make the form visible on child thread 2 ..
However, the form will not display either on child thread 2 or "parent
thread" ... Any idea why this is? Please help

DT
Nov 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Dayne,

Maybe can this sample I made a while ago help you in this.

It is showing an extra form (two times the same) with a thread and withouth
a thread
http://groups.google.com/groups?selm...TNGP10.phx.gbl

I hope this helps?

Cor
"Dayne" <d_**********@hotmail.com>
Briefly this is my problem .

I created a windows form on a "parent thread" .. then I called a child
thread 1 to make it visible then hide it on that same thread .. then kill
child thread 1 ... then try to make the form visible on child thread 2 ..
However, the form will not display either on child thread 2 or "parent
thread" ... Any idea why this is? Please help

DT

Nov 22 '05 #2

P: n/a
"Dayne" <d_**********@hotmail.com> schrieb:
I created a windows form on a "parent thread" .. then I called a child
thread 1 to make it visible then hide it on that same thread .. then kill
child thread 1 ... then try to make the form visible on child thread 2 ..
However, the form will not display either on child thread 2 or "parent
thread"


Always show your forms in the app's main UI thread. You can use
'Control.Invoke'/'Control.BeginInvoke' to communicate in the thread -> UI
direction.

More information:

Multithreading:

<URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms06112002.asp>
<URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms08162002.asp>
<URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms01232003.asp>

<URL:http://www.devx.com/dotnet/Article/11358/>

<URL:http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWindowsFormsControlClassInvokeTopic.asp >

Multithreading in Visual Basic .NET (Visual Basic Language Concepts)
<URL:http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconthreadinginvisualbasic.asp>

Sample:

<URL:http://dotnet.mvps.org/dotnet/samples/filesystem/downloads/FileSystemEnumerator.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.