Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Different behavior of ShowDialog between CF1 & CF2

2 views
Skip to first unread message

Alex Stark

unread,
Mar 31, 2006, 3:45:24 AM3/31/06
to
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


Jon Brunson

unread,
Mar 31, 2006, 4:13:30 AM3/31/06
to

Perhaps you could try moving the code that is in ToolsForm_Load into the
constructor of the form (Sub New)

Alex Stark

unread,
Mar 31, 2006, 4:33:07 AM3/31/06
to
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" <sta...@online.nospam> schrieb im Newsbeitrag
news:%23D$909JVG...@tk2msftngp13.phx.gbl...

0 new messages