Click here to Skip to main content
15,887,416 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionDataGrid in CF 2.0 Pin
Member 62799727-Oct-08 17:10
Member 62799727-Oct-08 17:10 
QuestionTrackBar appearance inconsistency Pin
John Whitmire27-Oct-08 11:12
professionalJohn Whitmire27-Oct-08 11:12 
GeneralRe: TrackBar appearance inconsistency Pin
Luc Pattyn27-Oct-08 11:31
sitebuilderLuc Pattyn27-Oct-08 11:31 
AnswerRe: TrackBar appearance inconsistency Pin
John Whitmire28-Oct-08 5:23
professionalJohn Whitmire28-Oct-08 5:23 
QuestionShowing and manipulating a window form Pin
dj_jeff27-Oct-08 4:13
dj_jeff27-Oct-08 4:13 
AnswerRe: Showing and manipulating a window form Pin
JoeSharp27-Oct-08 4:38
JoeSharp27-Oct-08 4:38 
GeneralRe: Showing and manipulating a window form Pin
dj_jeff27-Oct-08 20:14
dj_jeff27-Oct-08 20:14 
GeneralRe: Showing and manipulating a window form Pin
Luc Pattyn27-Oct-08 6:04
sitebuilderLuc Pattyn27-Oct-08 6:04 
Hi,

if all the code you've shown is running on the GUI thread (say inside a
button_click handler) then none of it will have a visible effect, since
the GUI actions will get queued until your code reaches its end: it is only
when the GUI thread is done dealing with the button click that it can start executing the queued stuff in a hurry.

Do you really want to show a form and (almost immediately) close it again??
Normally a form gets closed by an explicit user action, such as clicking
an OK button or the close box.

Remedy: reorganise your code, at least separate the Form.Close from everything
else (use another event, such as a button click, a timer tick, whatever).

BTW: DO NOT include delays in handlers, don't try Thread.Sleep() inside a
button click handler, it does not make any sense whatsoever.

Mind you there is one dangerous hack that may or may not be useful here:
include some Application.DoEvents() calls; they are bound to cause weird
effects if used inappropriately though.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Fixturized forever. Confused | :confused:


GeneralRe: Showing and manipulating a window form Pin
dj_jeff27-Oct-08 20:17
dj_jeff27-Oct-08 20:17 
AnswerRe: Showing and manipulating a window form Pin
dybs1-Nov-08 17:13
dybs1-Nov-08 17:13 
GeneralRe: Showing and manipulating a window form Pin
dj_jeff4-Nov-08 6:46
dj_jeff4-Nov-08 6:46 
QuestionPlz , I want help !! :( Pin
ahmed.mli27-Oct-08 1:02
ahmed.mli27-Oct-08 1:02 
Questiondatagridview sort Pin
CICCIOLO6923-Oct-08 13:19
CICCIOLO6923-Oct-08 13:19 
Questionprint a bitmap backround Pin
PaulaM22-Oct-08 22:41
PaulaM22-Oct-08 22:41 
AnswerRe: print a bitmap backround Pin
Thomas Stockwell24-Oct-08 4:20
professionalThomas Stockwell24-Oct-08 4:20 
QuestionTask list Pin
boiDev22-Oct-08 22:24
boiDev22-Oct-08 22:24 
AnswerRe: Task list Pin
Tom Deketelaere22-Oct-08 23:19
professionalTom Deketelaere22-Oct-08 23:19 
Questiondrag and drop operation in treeview Pin
tracywitty22-Oct-08 21:53
tracywitty22-Oct-08 21:53 
AnswerRe: drag and drop operation in treeview Pin
led mike24-Oct-08 7:22
led mike24-Oct-08 7:22 
AnswerRe: drag and drop operation in treeview Pin
Patrick Etc.3-Nov-08 17:12
Patrick Etc.3-Nov-08 17:12 
QuestionProblem with .ldb file Pin
Venumunna22-Oct-08 15:48
Venumunna22-Oct-08 15:48 
AnswerRe: Problem with .ldb file Pin
Eduard Keilholz23-Oct-08 0:34
Eduard Keilholz23-Oct-08 0:34 
QuestionDatareport in C# Pin
pekhaleyogesh21-Oct-08 19:46
pekhaleyogesh21-Oct-08 19:46 
AnswerRe: Datareport in C# Pin
Giorgi Dalakishvili22-Oct-08 2:34
mentorGiorgi Dalakishvili22-Oct-08 2:34 
QuestioncheckedListBox Pin
raushan_921-Oct-08 19:34
raushan_921-Oct-08 19:34 

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.