all groups > dotnet compact framework > march 2006 >
You're in the

dotnet compact framework

group:

Different behavior of ShowDialog between CF1 & CF2


Different behavior of ShowDialog between CF1 & CF2 Alex Stark
3/31/2006 12:00:00 AM
dotnet compact framework: Hi,

I have a WM2003 application ported from Compact Framework 1 to 2.
In my main menu I do a simple :

ToolsForm tf = new ToolsForm();
tf.ShowDialog();

in ToolsForm.Load I do some init stuff and show a state message. This
works with CF 1. But after porting this app to CF2 I have a different
behavior. The ToolsForm form is shown just after the Load-Methode is
executed, so that I can not see any state messages. It seems that in CF1
after a ShowDialog first the Form is shown and then the Load-Method is
execuded. In CF2 it seems that first the Load-Method is executed and
after that, the Form is shown. I haven't found a solution for this proble,
Refresh() on top of Load method doesn't matter.
Does anyone have a solution for this problem ?

Best regards
Alex

Re: Different behavior of ShowDialog between CF1 & CF2 Jon Brunson
3/31/2006 12:00:00 AM
[quoted text, click to view]

Perhaps you could try moving the code that is in ToolsForm_Load into the
Re: Different behavior of ShowDialog between CF1 & CF2 Alex Stark
3/31/2006 12:00:00 AM
I found a little workaround. If I call base.Show() on the top of the
Form.Load() method, everything works like in CF 1.

"Alex Stark" <stalle@online.nospam> schrieb im Newsbeitrag
news:%23D$909JVGHA.2704@tk2msftngp13.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button