Groups | Blog | Home
all groups > dotnet compact framework > june 2005 >

dotnet compact framework : Problem with CF2.0 and form.show


B Wiesner
6/14/2005 7:01:08 AM
I just converted my app from VS.NET 2003 to VS.NET 2005 Beta 2, and the first
issue I came to was that “form.show” is loading the form, but not displaying
it.

I created a new project, and added Form1 and Form2. The following code is in
Form1.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim tf As New Form2
tf.Show()
End Sub

When I run my app, Form2 is in the running programs list, but Form1 is still
the top form displayed.

Please tell me I’m overlooking something simple. Thanks for the help.

B Wiesner
6/14/2005 7:39:04 AM
Is this new behavior in cf 2.0? I've been under the assumption that this was
ok, as it has been working fine in the past (CF 1.0).

Thanks for the reply.

[quoted text, click to view]
Darren Shaffer
6/14/2005 8:22:43 AM
it's because you're trying to show Form2 in Form1's Load method
that this is happening.
--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com

[quoted text, click to view]

Darren Shaffer
6/15/2005 4:16:33 PM
yes, the load event on CF2.0 forms behaves differently than in 1.0
--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com


[quoted text, click to view]

B Wiesner
6/24/2005 6:11:02 AM
Is this documented somewhere, (along with any other changes like this) I've
searched but no luck. Also, since this has changed, is there a suggested best
practice for loading a second form like this while the first one is loading?

Thanks for the help.


[quoted text, click to view]
B Wiesner
7/19/2005 12:58:02 PM
I'm still at a loss here. Anyone have any suggestions? Thanks

[quoted text, click to view]
AddThis Social Bookmark Button