Click here to Skip to main content
15,894,343 members
Home / Discussions / C#
   

C#

 
GeneralRe: TreeView Node selection Pin
mav.northwind23-May-05 3:30
mav.northwind23-May-05 3:30 
GeneralRe: TreeView Node selection Pin
Dylan van Heerden23-May-05 7:30
Dylan van Heerden23-May-05 7:30 
GeneralButtons image are all gray on disable mode on a toolbar. Pin
udir23-May-05 1:38
udir23-May-05 1:38 
GeneralrichTextBox print & print preview Pin
gaby2r23-May-05 1:34
gaby2r23-May-05 1:34 
GeneralCrystal Report designer Pin
robmays23-May-05 1:31
robmays23-May-05 1:31 
GeneralRe: Crystal Report designer Pin
robmays23-May-05 2:01
robmays23-May-05 2:01 
GeneralTo send live audio & video data on network. Pin
shumyla198323-May-05 1:08
shumyla198323-May-05 1:08 
GeneralShow() and ShowDialog() Pin
mike chaplee22-May-05 23:39
mike chaplee22-May-05 23:39 
hi,

i found something rather odd and was simply wondering if anyone can explain this. I have a thread responsible for displaying a Form (in an event driven manner). When trying to display this form, i've notived that usage of .Show() causes the new form to hang (the frame is displayed, but the text field in it is empty, and the mouse shows an hourglass when hovered over this form). On the other hand, use of .ShowDialog() seems to display it fine. Given that it's displayed in its own thread, it doesn't matter which method i use, as the application continues fine. But i was just wondering if anyone can explain why the behaviour is different in this context?

In case it's of any relevance, here's the code
(running on XP Pro, developed in VS .Net 2003 against SDK 1.1)

<code>
public PopupFactory()
{
  Thread t = new Thread(new ThreadStart(waitForEvents));
  t.start();
}

private void waitForEvents()
{
  while ( true )
  {
    lock(al)
    {
      Monitor.Wait(al);
      l.log("got a pulse from another thread on al");
      string[] z_details = (string[])al[al.Count - 1];
      ZTransparentWindow z = new ZTransparentWindow(z_details[0], z_details[1]);

      z.ShowDialog(); // WORKS FINE
      z.Show(); // DOES NOT WORK PROPERLY
    }
  }
}
</code>

thanks!
GeneralRe: Show() and ShowDialog() Pin
S. Senthil Kumar23-May-05 0:49
S. Senthil Kumar23-May-05 0:49 
GeneralRe: Show() and ShowDialog() Pin
methodincharge23-May-05 9:36
methodincharge23-May-05 9:36 
Generalundo in richtext box Pin
hoangsamac22-May-05 23:25
hoangsamac22-May-05 23:25 
GeneralRe: undo in richtext box Pin
mav.northwind23-May-05 0:42
mav.northwind23-May-05 0:42 
QuestionHow to change DataGrid Column's Header's Heigth? Pin
thaibinhla22-May-05 22:18
thaibinhla22-May-05 22:18 
AnswerRe: How to change DataGrid Column's Header's Heigth? Pin
Trivikram Dwivedi22-May-05 23:26
Trivikram Dwivedi22-May-05 23:26 
GeneralRe: How to change DataGrid Column's Header's Heigth? Pin
thaibinhla22-May-05 23:58
thaibinhla22-May-05 23:58 
GeneralRe: How to change DataGrid Column's Header's Heigth? Pin
Trivikram Dwivedi23-May-05 1:20
Trivikram Dwivedi23-May-05 1:20 
GeneralRe: How to change DataGrid Column's Header's Heigth? Pin
thaibinhla23-May-05 14:55
thaibinhla23-May-05 14:55 
QuestionHow to get first object of checked listview Pin
Trivikram Dwivedi22-May-05 22:10
Trivikram Dwivedi22-May-05 22:10 
AnswerRe: How to get first object of checked listview Pin
robmays23-May-05 1:37
robmays23-May-05 1:37 
GeneralRe: How to get first object of checked listview Pin
robmays23-May-05 1:39
robmays23-May-05 1:39 
AnswerRe: I tried this seems ok Pin
robmays23-May-05 1:48
robmays23-May-05 1:48 
Generalpass dataset to new database Pin
sevan22-May-05 21:13
sevan22-May-05 21:13 
GeneralRe: pass dataset to new database Pin
zhengdong jin22-May-05 21:27
zhengdong jin22-May-05 21:27 
GeneralParser Error Message: Could not load type 'talibgroup.Global'. Pin
Murtuza Husain Miyan Patel22-May-05 19:48
professionalMurtuza Husain Miyan Patel22-May-05 19:48 
QuestionHow to Receive Message form other client using RTC API? Pin
Noah_jeal22-May-05 16:54
Noah_jeal22-May-05 16:54 

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.