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
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


Possibly Related Threads...
Thread Author Replies Views Last Post
  Aeonsofts VB.NET Theme Manager v2.1 lanzye 29 9,713 2017-06-20, 06:55 PM
Last Post: storix
  VB NET FORM APPLICATION QwertySon 12 1,723 2016-04-27, 08:00 PM
Last Post: Harrington
  Best available vb.net theme? SteelHard 1 1,096 2015-01-30, 01:55 AM
Last Post: Yaznas
  PLEASE TELL ME WHICH VB NET THEME THIS IS ? androtweaks 3 438 2015-01-27, 10:16 PM
Last Post: Riven
  *Double Your Earnings by Using VB* [Begginers] FK_ 87 11,829 2015-01-23, 08:16 AM
Last Post: xchanmolx




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

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