codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Problem with modal dialog in threads...  eshwar_gp at 12:38 on Thursday, February 09, 2006
 

Hi,


In my windows application having two win forms and one class file. In class file i created form2 object in seperate thread like

public Class1()
{
System.Threading.Thread t1 = new System.Threading.Thread(new System.Threading.ThreadStart(test));
t1.Start();
}

private void test()
{
Form2 f2 = new Form2();
f2.ShowDialog(WindowsApplication2.Form1.ActiveForm);
}

now i taken this Class1 object in form1 button click event like


Class1 c1 = new Class1();

Now the problem is the form2 is not acting as a modal dialog insted of that it is giving access to click the button again, how to solve that.

Let me know the answer if any one faced this type of situation.


Thanks,
eshwar_gp










CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  setSize and setTitle
•  web publishing problem
•  C++ and Passwording Files
•  Disabling/enabling the textbox of EditCommandColumn based on value
•  Re: Character Arrays
•  Subject: regarding making a setup using Package and Deployment Wizard
•  java script
•  Re: how to extract applet class ?
•  Wrong number of arguments or invalid property assignment


Recent Articles
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net
Creating CSS Buttons


© Copyright codetoad.com 2001-2006