?
Solved

Information pop up in VB6

Posted on 2003-02-21
7
Medium Priority
?
235 Views
Last Modified: 2013-11-28
Hi guys I require your help yet again,
With my very limited knowledge of VB6 i don't know why I use it. (don have time to learn it properly)
ok, need to setup on button that once pressed will create a pop up that can be closed by clicking on a OK button or something similar.
ANything that will help me on my way will be good,

thanks again.
0
Comment
Question by:pnorris98
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 7995508
put a button on your form (name it Command1):

public sub Command1_Click()
   Msgbox "Popup this message"
end sub
0
 
LVL 13

Accepted Solution

by:
AlbertaBeef earned 400 total points
ID: 7995654
Yup, that will do it.  You can also change the style of the messagebox by adding different paramaters:

ie:

msgbox "Popup this message", vbExclamation
msgbox "Popup this message", vbInformation
msgbox "Popup this message", vbCritical

and there's lots more you can do with the msgbox command as well.  You can use it to input OK/Cancel, Yes/No, and other things.

Hope that helps!
0
 

Author Comment

by:pnorris98
ID: 7995702
Hi guys thanx for getting back to me so quick,
I have tried that and works great but what happens when you try to enter say 3 lines of text

Like
public sub Command1_Click()
  Msgbox "Popup this message"
"Popup line 2"
"Popup line 3"
end sub

and while I am here you dont know of any online VB6 tutorials.
Thanks again.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:Sweat
ID: 7995724
pnorris98,

Text in a MsgBox can be like this:

   Dim stxt As String

   stxt = "This would represent line 1" & vbCrLf
   stxt = stxt & "And then this would be two." & vbCrLf
   stxt = stxt & "Then this is three." & vbCrLf

and so on.  You can also put two vbCrLf's together to create a blank line between lines as well.

Sweat

0
 

Expert Comment

by:kevmeist
ID: 7999391
Not sure of online tutorials but there are MANY books available and also MANY websites available with code snippets, such as www.vb2themax.com etc

Kevin
0
 
LVL 1

Expert Comment

by:xThorx
ID: 8025114
You can also create a new form in which you add everything you need (text, picture, sound, video or whatever...) and a quit button for exiting the window. Suppose you have this form2 you want to call

in button_click or label_click or ... you can add
form2.show vbmodal

like this you won't be able to use form1 unless form2 if unloaded.

With this method, you can put your window anywhere in your screen. If you use msgbox, if will come in the middle of the screen. The msgbox should only be used when you want to give a feed back to the user when an operation is done or something.
0
 

Author Comment

by:pnorris98
ID: 8244717
Thanks for that,
Those exampls came into good use.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog, I will share you some basic tips for content marketing and to rank your website on Google.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question