REPOST: Form not displaying

G

Guest

Does anybody have any comments/suggestions to the following:

Perhaps someone can help explain the following. I have a complex program for
PPC that first calls a modal form and then the main form from a module used
for startup. Everything works fine with the exception that the main firm
never displays although it is created. All I see is the SIP Input Panel. I
can however use the little Switcher Bar app that gets loaded with the Axim to
go to the main form.

I've tried many things, including FindWindow/ShowWindow; Me.Refresh;
Me.Invalidate; Override OnGotFocus; etc. , to forcibly display the form but
have had no luck.

Also I decided to get really simple about this by starting a new project
with a couple blank forms and a sub main. Even in this minimal setup it
behave exactly the same. The first form displays the second does not. What
am I doing wrong?

Step to reproduce: Create new project Add New Form (Form1), Add New Form
(Form2), Add New Module (Launcher)

Code for Launcher
===================

Module Launcher
Sub Main()
'Option 1
'Dim f As New Form2
'f.ShowDialog()

'Option 2
Application.Run(New Form2)

Application.Run(New Form1)
End Sub
End Module
 
A

Alex Feinman [MVP]

I don't think Application.Run expects this usage pattern.
Try rewriting your code so that the first form is created and displayed
inside main form Load event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top