PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms The Form.Show() method

Reply

The Form.Show() method

 
Thread Tools Rate Thread
Old 01-06-2005, 04:02 AM   #1
=?Utf-8?B?YWN0aXZlODVr?=
Guest
 
Posts: n/a
Default The Form.Show() method


First of all excuse me for my bad english but i'm italian.
I have an application with two threads. The second one is not the main
thread and i tryed to show a form like that:

MyForm f = new MyForm(params);
f.Show();

but the form is frozen. i tryed with Invoke and BeginInvoke but i have no
solutions. Can someone help me?
  Reply With Quote
Old 01-06-2005, 10:11 AM   #2
Morten Wennevik
Guest
 
Posts: n/a
Default Re: The Form.Show() method

As Bineesh said, we need more info. Something in MyForm is locking up.



On Wed, 01 Jun 2005 05:02:02 +0200, active85k <active85k@discussions.microsoft.com> wrote:

> First of all excuse me for my bad english but i'm italian.
> I have an application with two threads. The second one is not the main
> thread and i tryed to show a form like that:
>
> MyForm f = new MyForm(params);
> f.Show();
>
> but the form is frozen. i tryed with Invoke and BeginInvoke but i have no
> solutions. Can someone help me?
>




--
Happy coding!
Morten Wennevik [C# MVP]
  Reply With Quote
Old 01-06-2005, 01:03 PM   #3
=?Utf-8?B?YWN0aXZlODVr?=
Guest
 
Posts: n/a
Default Re: The Form.Show() method

nothing more special:

in the main thread happen this:

Thread t = new Thread(new ThreadStart(ThreadProc));
t.Start();

in t thread happen this:

ProcessMessage(bla bla);

in ProcessMessage happen this:

ProcessMessage(bla bla)
{
...
...
MyForm f = new MyForm(bla bla);
f.Show();
...
}

and the form not work correctly.
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off