|
-
May 17th, 2000, 09:48 AM
#1
Thread Starter
New Member
I'm having LOTS of trouble with a very simple thing, and I can't understand why. I started a quite big project as a Standard EXE program, and now that I have almost finished it I would like to change it into a ActiveX EXE program.
No big deal, I just changed the project type property in the property window. But here comes my problem : While I had a Form as a startup object, I can't use it anymore, since VB limits me to Sub Main. So I added a Sub Main as so
Sub Main()
Form1.Show
End Sub
But VB won't even run it at startup even if it acknowledge it as the startup Sub...
Now I'm lost. Why isn't this working ?
-DrkMatter
"Failure is not an option: Windows as it built-in"
-Some guy whose name I don't remember. =P
-
May 17th, 2000, 12:31 PM
#2
Are you sure that your Sub Main() is in a Module?
___________________
-
May 18th, 2000, 07:59 AM
#3
Thread Starter
New Member
Yes it is. and another weird thing...
When I run Sub Main through the Immediate window, the fform appear in double.
What's happening in here ??????
-DrkMatter
"Failure is not an option: Windows as it built-in"
-Some guy whose name I don't remember. =P
-
May 18th, 2000, 12:40 PM
#4
Try your Sub Main() this way:
Code:
Sub Main
Dim frm as Form1
Set frm = New Form1
frm.Show
End Sub
This doesn't show the global instance of Form1 but creates a new one. It works well in my ActiveX EXE projects.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|