pop up form question??

cow
09-09-2000, 02:07 PM
hey, i am cow and i am very, very new to visual basic. what i was wondering is how to i get another form to pop up when i click a button ( like on the toolbar for instance)? i surfed around some of the examples and edit it a little and got this:

Private Sub About_Click(Index As Integer)
frmAbout.Show 3
End Sub


what did i do wrong, whenever i run it and click the button on the toolbar ( named About) i get this message:
Rub-time error '424'
Object required

so then i click debug and it highlights:
frmAbout.Show 3

what am i doing wrong, could some pleae hepl me out or just please get me a tutorial if you can explain it in words or whatever.
please help!
thanks everyone!
-Cow

DWard
09-09-2000, 02:39 PM
Hi cow,

The problems is that 3 is not a valid argument.
0=non-modal
1=modal

if you use 'frmAbout.show 1' that should work
I dont understand the error 424 though, you should have got an 5 'Invalid proceedure call or argument'

Hope it helps !

cow
09-09-2000, 05:09 PM
thank you so much! one question though, could you please define non-modal and modal for me in vb terms or whatever?

thanks man

Derek Stone
09-09-2000, 05:36 PM
Modal means the form will stay on top of the form who called it.
Non-modal means it won't.
Experiment with them.
You'll see.

-cl

cow
09-09-2000, 07:57 PM
ooo, i see
thanks!!!
-Cow

cbrewer
09-09-2000, 09:54 PM
cow, Dward is correct about the argument, however the incorrect argument will not give you an Object Required" error, it will tell you that you have an "Invalid Procedure". The real problem you have is an error that says "Object Required", that means you dont have an object in your project named frmAbout, you have to add the frmAbout form first. You dont have to add any argument unless you want it to be Modal (Stay on top), just use

frmAbout.Show

Hope that helps

Chuck

SeiferTim
09-11-2000, 11:35 AM
Correct me if I'm wrong, but If you are a newbie, the stuff they're talking about is a bit to complex for you, right? i had the same problems when i just started... if all you want is to have a "Yes/No" question pop up when you click a button, you can use <code>MsgBox</code> but if you want to have an entirely new form appear, you need to go to "Project | Add Form" name the form whatever you want, put whatever you want on it, and then set Visible to False then have a button, that does the following when pressed:
<code>
FormName.visible = true</code>

I hope that's what you need.

-Seifer Tim

Visit my Web-Site: http://solenoid.50megs.com

cow
09-11-2000, 06:48 PM
thanks man!
well, while i am still on one of my messages, would anyone mind telling me how to insert a web page into a program in vb4?

thanks everyone!
-Cow
"Got Milk?"

Derek Stone
09-12-2000, 05:22 PM
Check out the Microsoft Internet Control found under Project --> Components.
Note: You have to have IE installed on both your machine and the client machine for it to work.
Good Luck

-cl

cow
09-12-2000, 08:14 PM
thanks man, now that i gots that, how do i put a page into it?

Derek Stone
09-13-2000, 06:04 AM
Here you go:
WebBrowser1.Navigate("C:webpage.html") 'A local page
-or-
WebBrowser1.Navigate("http://www.yahoo.com") 'A non-local page

Use the object browser found under the view menu in the IDE to find more about each function the WebBrowser control has.

And make sure to replace "WebBrowser1" with the name of your WebBrowser control.
Good Luck

-cl

cow
09-13-2000, 08:16 PM
thx A LOT MAN!! i have been wanting to find that out forever! thank you!
C`ya

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum