start up form sub main 
Author Message
 start up form sub main

   hi , using vb6
been downloading a few bits of peoples work of the planet source website,
but cant seem to run the program, as it keeps saying    * must have start up
form or sub main  *

were am i going wrong

Regards

--
You can have peace.  Or you can have freedom.  Don't ever count on
having both at once. ..-TPW



Fri, 16 Sep 2005 01:48:39 GMT  
 start up form sub main

Quote:
>    hi , using vb6
> been downloading a few bits of peoples work of the planet source website,
> but cant seem to run the program, as it keeps saying    * must have start
up
> form or sub main  *

> were am i going wrong

> Regards

> --
> You can have peace.  Or you can have freedom.  Don't ever count on
> having both at once. ..-TPW

On the menu, click on Project then on Properties at the bottom of the menu.
The dialog that comes up will show the Startup Object. It may well be blank.
Use the combo/drop down control to select either a starting form in your
project or "Sub Main."  If you choose Sub Main, you must have or create a
.bas module with a sub called Main in it.  Sub Main is used when you want to
do some preliminary processing like checking files and user-Id, etc. prior
to the first form appearing.

Hth,
Bob Walsh



Fri, 16 Sep 2005 02:57:57 GMT  
 start up form sub main
On the MENU BAR in VB, go to "Project", then down at
the botton click on "Project Properties",then on the
"General" tab select "StartUp Object".

HTH,

Jim


"If you are living like there is no God ...
  ... you better be right !"



Fri, 16 Sep 2005 06:17:47 GMT  
 start up form sub main
hi
Tried what you said

On the MENU BAR in VB, go to "Project", then down at
the botton click on "Project Properties",then on the
"General" tab select "StartUp Object".

But the only thing available in the start up object box is SUB MAIN, it
doesnt have anything else listed?


Quote:
> On the MENU BAR in VB, go to "Project", then down at
> the botton click on "Project Properties",then on the
> "General" tab select "StartUp Object".

> HTH,

> Jim


> "If you are living like there is no God ...
>   ... you better be right !"



Fri, 16 Sep 2005 06:42:56 GMT  
 start up form sub main
Is this a FormLess project????

Quote:

>hi
>Tried what you said

>On the MENU BAR in VB, go to "Project", then down at
>the botton click on "Project Properties",then on the
>"General" tab select "StartUp Object".

>But the only thing available in the start up object box is SUB MAIN, it
>doesnt have anything else listed?



>> On the MENU BAR in VB, go to "Project", then down at
>> the botton click on "Project Properties",then on the
>> "General" tab select "StartUp Object".

>> HTH,

>> Jim


>> "If you are living like there is no God ...
>>   ... you better be right !"

Have a good day...

Don



Fri, 16 Sep 2005 06:58:19 GMT  
 start up form sub main
Quote:
> But the only thing available in the start up object box is SUB MAIN, it
> doesnt have anything else listed?

Sounds like your code has no start.
Maybe its just sample objects that you can use in a project.


Fri, 16 Sep 2005 07:12:20 GMT  
 start up form sub main
its not a formless project, and i don't think it is just sample objects
i seem to get this problem all the time, that i try to view someone else's
work from the "planet source VB site"

Is there something i am missing, when u download someone else's work.
do you need to do anything else to the downloaded project to be able to run
it on your own computer

Thanks
Tom


Quote:
> > But the only thing available in the start up object box is SUB MAIN, it
> > doesnt have anything else listed?

> Sounds like your code has no start.
> Maybe its just sample objects that you can use in a project.



Sat, 17 Sep 2005 02:46:02 GMT  
 start up form sub main
I'll try to help...
What project did you download from planet source code (the url would be nice)
I'll download it and see what happens on my system...

Quote:

>its not a formless project, and i don't think it is just sample objects
>i seem to get this problem all the time, that i try to view someone else's
>work from the "planet source VB site"

>Is there something i am missing, when u download someone else's work.
>do you need to do anything else to the downloaded project to be able to run
>it on your own computer

>Thanks
>Tom



>> > But the only thing available in the start up object box is SUB MAIN, it
>> > doesnt have anything else listed?

>> Sounds like your code has no start.
>> Maybe its just sample objects that you can use in a project.

Have a good day...

Don



Sat, 17 Sep 2005 03:06:07 GMT  
 start up form sub main
Thanks
this is one of the samples i tried to run with no luck

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=116...
Id=1


Quote:
> I'll try to help...
> What project did you download from planet source code (the url would be
nice)
> I'll download it and see what happens on my system...



> >its not a formless project, and i don't think it is just sample objects
> >i seem to get this problem all the time, that i try to view someone
else's
> >work from the "planet source VB site"

> >Is there something i am missing, when u download someone else's work.
> >do you need to do anything else to the downloaded project to be able to
run
> >it on your own computer

> >Thanks
> >Tom



> >> > But the only thing available in the start up object box is SUB MAIN,
it
> >> > doesnt have anything else listed?

> >> Sounds like your code has no start.
> >> Maybe its just sample objects that you can use in a project.

> Have a good day...

> Don



Sat, 17 Sep 2005 04:07:03 GMT  
 start up form sub main
Well, I have some good news and some bad... LOL

I downloaded it and ran it and it worked right off the bat for me. (BTW cute project)

I'm using VB6.0 and Winders 98...
Not sure what you are using or what the problem might be...

Sorry I can't help you with this one...

Quote:

>Thanks
>this is one of the samples i tried to run with no luck

>http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=116...
>Id=1



>> I'll try to help...
>> What project did you download from planet source code (the url would be
>nice)
>> I'll download it and see what happens on my system...

Have a good day...

Don



Sat, 17 Sep 2005 04:16:35 GMT  
 start up form sub main
Thanx for trying

Im using VB6 and Win xp

Cheers


Quote:
> Well, I have some good news and some bad... LOL

> I downloaded it and ran it and it worked right off the bat for me. (BTW
cute project)

> I'm using VB6.0 and Winders 98...
> Not sure what you are using or what the problem might be...

> Sorry I can't help you with this one...



> >Thanks
> >this is one of the samples i tried to run with no luck

>http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=116...
W
> >Id=1



> >> I'll try to help...
> >> What project did you download from planet source code (the url would be
> >nice)
> >> I'll download it and see what happens on my system...

> Have a good day...

> Don



Sat, 17 Sep 2005 05:24:04 GMT  
 start up form sub main
Just a thought, Tom. You're not trying to open and run the .bas file are
you? If you are then you will get the response you have mentioned ("must
have startup form or sub main"). The .bas file is a code module and cannot
be run as though it was a project. The file you need to open is the .vbp
file, which will load the project into VB6 for you. Check that you are
saving and opening this stuff properly, Tom. You need to be doing something
like:

1. Download the zip file from the Planet Source site, or wherever. (Click
the "Save" rather than the "Open" button in the download request box and
save it to your desktop).

2. Right click a blank area of your desktop and select New / Folder to
create a new folder.

3. Double click the zip file (on your desktop) and it should open up in
whatever is your default zip application (Winzip or soemthing like that).
You do have Winzip or something similar, do you?

4. Use the Winzip menus to extract all of the zipped files into the new
folder that you created on the desktop. (In Winzip you can use Actions /
Select Alll (if you are ruinning it in the appropriate mode) and just drag
the files into the new folder. Alternatively, you can drag them across one
at a time.

5. Open up the new folder and double click the .vbp file, which will open
the project in VB, from where you can do what you want with it.

Are you doing something like that?

Mike


Quote:
> Thanx for trying

> Im using VB6 and Win xp

> Cheers



> > Well, I have some good news and some bad... LOL

> > I downloaded it and ran it and it worked right off the bat for me. (BTW
> cute project)

> > I'm using VB6.0 and Winders 98...
> > Not sure what you are using or what the problem might be...

> > Sorry I can't help you with this one...



Sat, 17 Sep 2005 18:00:37 GMT  
 start up form sub main
Michael
thanks for the great advice, as a newbie to Visual Basic i needed advice
like you gave to keep me on the right track as i wasn't following the
correct procedure in opening a file after downloading it from Planet source

IE  extract and save to separate folders
i have now got the program working perfectly

Thank you,
and everybody else who gave me advice

cheers

Tom


Quote:
> Just a thought, Tom. You're not trying to open and run the .bas file are
> you? If you are then you will get the response you have mentioned ("must
> have startup form or sub main"). The .bas file is a code module and cannot
> be run as though it was a project. The file you need to open is the .vbp
> file, which will load the project into VB6 for you. Check that you are
> saving and opening this stuff properly, Tom. You need to be doing
something
> like:

> 1. Download the zip file from the Planet Source site, or wherever. (Click
> the "Save" rather than the "Open" button in the download request box and
> save it to your desktop).

> 2. Right click a blank area of your desktop and select New / Folder to
> create a new folder.

> 3. Double click the zip file (on your desktop) and it should open up in
> whatever is your default zip application (Winzip or soemthing like that).
> You do have Winzip or something similar, do you?

> 4. Use the Winzip menus to extract all of the zipped files into the new
> folder that you created on the desktop. (In Winzip you can use Actions /
> Select Alll (if you are ruinning it in the appropriate mode) and just drag
> the files into the new folder. Alternatively, you can drag them across one
> at a time.

> 5. Open up the new folder and double click the .vbp file, which will open
> the project in VB, from where you can do what you want with it.

> Are you doing something like that?

> Mike



> > Thanx for trying

> > Im using VB6 and Win xp

> > Cheers



> > > Well, I have some good news and some bad... LOL

> > > I downloaded it and ran it and it worked right off the bat for me.
(BTW
> > cute project)

> > > I'm using VB6.0 and Winders 98...
> > > Not sure what you are using or what the problem might be...

> > > Sorry I can't help you with this one...



Sun, 18 Sep 2005 06:36:43 GMT  
 
 [ 13 post ] 

 Relevant Pages 

1. trying to start a form, from a MAIN sub in a module

2. Sub Main() Starting Up A Form

3. Starting a form after Closing Sub Main

4. Starting in Sub Main...?

5. Unload after starting with Sub Main

6. create main form and Sub Form

7. create Main Form Sub form in VB6

8. How to change caption on a sub from text on main form

9. Showing a form from within Sub Main.

10. Invock a dll that has sub Main(), instead of a form as entry point

11. Sub Main(): keep app open after showing form?

12. Opening a form from a Mobule Sub Main

 

 
Powered by phpBB® Forum Software