Lost Password?

Go Back   CodeCall Programming Forum > Software Development > Tutorials > VB Tutorials

Unregistered, Check out the Coder Battles in the Announcement and Game forums.

VB Tutorials Visual Basic Tutorials and Code

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-23-2006, 06:02 AM
TcM's Avatar   
TcM TcM is offline
Moderator
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,306
Credits: 0
Rep Power: 74
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Exclamation VB 6.0: Tutorial, Using the MsgBox

Introduction:-

Ok, so here I will show you the basics of the MsgBox Function!

Requirements:-
  • Visual Basic (preferibly 6.0)

Let's begin!

So the most basic method to display a Msgbox is:-

Code:
MsgBox "testing"
This will just show a msg box with an Ok Button!

But lets elaborate more on it:-

Code:
MsgBox "testing", vbOKOnly, "title"
This will display a msgbox with a title with an Ok Button



ok so thats the basic now lets elaborate more on out msgbox

Code:
msg = MsgBox("Testing", vbYesNoCancel)
If msg = vbYes Then Print "Yes Pressed"
If msg = vbNo Then Print "No Pressed"
If msg = vbCancel Then Print "Cancel Pressed"
and

Code:
msg = MsgBox("Testing", vbAbortRetryIgnore)
If msg = vbAbort Then Print "Abort Pressed"
If msg = vbRetry Then Print "Retry Pressed"
If msg = vbIgnore Then Print "Ignore Pressed"
Here a msg box with 3 buttons ( Yes, No, Cancel or Abort, Retry, Ignore) will be shown!
And if you see we added "msg = " here msg ( a variable )will hold in it what button the user pressed! then we are using the if...then so to make different actions, if different buttons are pressed!



ok now lets make an effect to our msgbox!!

Code:
msg = MsgBox("Testing", vbMsgBoxRtlReading + vbCritical)
This will display a msg box Inverted! ( the other way round )
After the "+" you can make every other type of msgbox you want and it will be inverted!!



And there are MUCH more MsgBoxes, I gave you the basics now you can elaborate on it!!

Ending:-
If you have any questions/problems/feedback pls post here and I will sureley Help you!
So I'm waiting for your feedback
Ow and if you want me to make you some tutorials request what you want and I will see what I can do! I will be happy making some tuts here!
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by Jordan; 10-02-2006 at 11:59 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 02-07-2007, 06:34 PM
SlamX's Avatar   
SlamX SlamX is offline
Newbie
 
Join Date: Feb 2007
Posts: 1
Credits: 0
Rep Power: 0
SlamX is on a distinguished road
Default

ty, was looking for this. +rep
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-08-2007, 02:04 PM
TcM's Avatar   
TcM TcM is offline
Moderator
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,306
Credits: 0
Rep Power: 74
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default

Thanks for the +rep .
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2007, 12:55 PM
nokomoli nokomoli is offline
Newbie
 
Join Date: Feb 2007
Posts: 2
Credits: 0
Rep Power: 0
nokomoli is on a distinguished road
Default

Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-21-2007, 07:38 PM
Noxa Noxa is offline
Newbie
 
Join Date: Oct 2007
Posts: 1
Credits: 0
Rep Power: 0
Noxa is on a distinguished road
Default

Thanks for this, ive just started using VB and its helped alot.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 08-31-2008, 01:14 PM
ViRuSS's Avatar   
ViRuSS ViRuSS is offline
Learning Programmer
 
Join Date: Aug 2008
Location: London, England
Age: 14
Posts: 70
Credits: 0
Rep Power: 2
ViRuSS will become famous soon enoughViRuSS will become famous soon enough
Default Re: VB 6.0: Tutorial, Using the MsgBox

thx i just needed a little help with msgbox
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 09-07-2008, 02:36 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 7,372
Last Blog:
Web slideshow in JavaS...
Credits: 1,276
Rep Power: 61
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: VB 6.0: Tutorial, Using the MsgBox

For anyone using VB.NET, I would advise the MessageBox.Show() function over MsgBox() any day.
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 09-07-2008, 04:27 PM
chili5's Avatar   
chili5 chili5 is online now
Code Warrior
 
Join Date: Mar 2008
Age: 15
Posts: 3,417
Credits: 294
Rep Power: 30
chili5 is a glorious beacon of lightchili5 is a glorious beacon of lightchili5 is a glorious beacon of lightchili5 is a glorious beacon of lightchili5 is a glorious beacon of lightchili5 is a glorious beacon of light
Default Re: VB 6.0: Tutorial, Using the MsgBox

Doesn't this tutorial apply to VB.NET also?
__________________
Success is the ability to go from failure to failure without losing your enthusiasm. ~ Winston Churchill

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 09-08-2008, 12:48 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 7,372
Last Blog:
Web slideshow in JavaS...
Credits: 1,276
Rep Power: 61
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: VB 6.0: Tutorial, Using the MsgBox

Yes, but the MsgBox() function is an old overhand of VB6, so in all cases MessageBox.Show() should be used instead in .NET. This applies to all .NET languages.
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
VB 6.0: Tutorial, How to Make Glass2K!! TcM VB Tutorials 12 09-28-2008 11:53 AM
VB 6.0: Tutorial, Making a Port Scanner TcM VB Tutorials 82 09-23-2008 03:10 PM
VB 6.0: Tutorial, How to make a GIF in your application TcM VB Tutorials 17 07-01-2008 03:26 PM
VB 6.0: Tutorial, Explaining the VB 6.0 GUI TcM VB Tutorials 1 05-18-2007 10:25 AM
John's Java Tutorial Index John Java Tutorials 0 01-11-2007 03:05 PM


All times are GMT -5. The time now is 04:44 PM.

Contest Stats

Xav ........ 1276.19
MeTh0Dz|Reb0rn ........ 1047.22
marwex89 ........ 869.98
morefood2001 ........ 868.04
John ........ 857.15
WingedPanther ........ 761.06
Brandon W ........ 684.41
chili5 ........ 294.12
dargueta ........ 192.86
Steve.L ........ 192.06

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 81%

Ads