Need Help With VB
2014-02-07, 06:43 PM,
#1
Hello guys i was trying to create a button that when i click it first time it generates one message and when i click it second time i want to generate a different message saying something else.


1: MsgBox(" First message", MsgBoxStyle.Information, "write here the message's title")

2: MsgBox(" Second message", MsgBoxStyle.Information, "write here the message's title")


i tried this but it displays the messages on the on the first click.


thanks
Reply
Share This Thread :

2014-02-07, 07:56 PM,
#2
Thats really easy. Here is my way to do it. Mine is kinda complicated but someone else may have a simpler way!

1) Insert a progressbar and make it invisible by setting Visible property to False

2) On the button insert code

Code:
If Progressbar1.value = 0 then
MsgBox(" First message", MsgBoxStyle.Information, "write here the message's title")
Progressbar1.value = 10

Else: MsgBox(" Second message", MsgBoxStyle.Information, "write here the message's title")

Try debugging and if this does not work just quote me and i will help you. :)
Latest Thanks - View all

albothug(2014-02-07 08:28 PM) 

Join The Best Network Today And Earn REAL Money! The secret to success lies here.

[Image: jqE21u3.gif]
Reply
2014-02-07, 08:28 PM,
#3
you smart guy thanks for this i really appreciate it
Reply
2014-02-07, 08:34 PM,
#4
Or you could just use a simple boolean?

Use right after you declare the class
Code:
dim firstTime as Boolean = True

and then in your button you can use
Code:
If firstTime Then
MsgBox(" First message", MsgBoxStyle.Information, "write here the message's title")
firstTime = false
Else
MsgBox(" Second message", MsgBoxStyle.Information, "write here the message's title")
End If
Reply
2014-02-24, 09:13 PM, (This post was last modified: 2014-02-24, 09:14 PM by Delfo.)
#5
Why not:

Code:
If MsgBox("First Message", MsgBoxStyle.Information, "Title goes here") = MsgBoxResult.Ok Then
        MsgBox("Second Message", MsgBoxStyle.Information, "Title goes gere")
End If
Reply


Related Threads
Thread Author Replies Views Last Post
  Need Few Instructions That Can Help me Create Video Whiteboard Animation EvaHarrison 1 346 2018-08-17, 05:53 PM
Last Post: CharlieHarper
  help with embed adult videos to my site adlof 1 518 2018-02-16, 10:22 PM
Last Post: Enabled
  Need help is possible? shikoattia 1 561 2018-01-28, 03:25 PM
Last Post: CharlieHarper
  Need a loading progress bar for wordpress! YoungArt 6 890 2017-08-26, 06:01 PM
Last Post: YoungArt
  help templet error W3C vip2 0 345 2017-08-24, 10:45 PM
Last Post: vip2





About Us | Contact Us | CPA Elites | Advertise | Stats

© 2013-2019 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top