|
-
Jan 15th, 2001, 11:23 PM
#1
Thread Starter
PowerPoster
Has anybody tried using WinMain function in VB? I am having trouble in using it.
-
Jan 16th, 2001, 04:12 AM
#2
What kind of trouble?
perhaps if you post or e-mail me your code and problems, I can help you.
Gerco.
-
Jan 16th, 2001, 06:16 AM
#3
Frenzied Member
Why would you use WinMain in VB?
-
Jan 16th, 2001, 03:43 PM
#4
Isn't it called 'WinMain' in VB?
-
Feb 7th, 2001, 10:47 AM
#5
Addicted Member
I Think This would help
In A Module Enter The Code
sub main()
'' Startup Code
end sub
__
Go to the project Properties and Select The Startup To Sub Main. and That's It.
Ex:
Sub Main()
form1.show
end sub
-
Feb 11th, 2001, 01:42 AM
#6
Thread Starter
PowerPoster
We are not talking about Sub Main, but its about using the WinMain function that we use while programming through Win32 API .
-
Feb 11th, 2001, 08:47 AM
#7
Member
The WinMain() function is not an API function. It is a entry point required by the VC++ compiler to create a WIN32 application in Visual C++. It has nothing to do with VB. You can not call the WinMain() function because it doesn't exist in in the WIN32 API.
-
Feb 11th, 2001, 09:06 AM
#8
Monday Morning Lunatic
It's not just VC++ -- every program for windows must export the WinMain function. VB inserts its own into your program to initialise COM, the forms, etc.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Feb 11th, 2001, 09:49 AM
#9
Member
You are right, one way or another there must be a WinMain() function even if you compile your VB code to P-code instead of native code. But there is no way you can get VB code into a WinMain() because this code must be in C/C++, and this is a VB form.
-
Feb 11th, 2001, 11:15 AM
#10
The closest you can get to WinMain, is the 'Main' sub in VB.
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
|