vb.net help
2013-10-15, 07:57 PM,
#1
Since I'm not that good at VB.Net, could someone make me a quick script that loads a messagebox when the program opens with yes/no options and that no closes the program and yes goes to a link using process.start ?
Reply
2013-10-16, 06:32 PM,
#2
Why you want to use Message Box?

Create another form, make two buttons. First button "Yes" Use process.start and second one "No" use unload form.
Reply
2013-10-17, 03:06 AM,
#3
Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load



Me.Visible = False
Const message As String = "YOUR MESSAGE"
Const caption As String = "MESSAGE TITLE"
Dim result = MessageBox.Show(message, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question)

' If the no button was pressed ...
If result = DialogResult.No Then

Me.Close()


ElseIf result = DialogResult.Yes Then
System.Diagnostics.Process.Start("http://url.com")
Me.Close()
Form1.Close()
End If
End Sub

End Class
Reply
2013-10-17, 03:26 AM,
#4
Thanks for the reply mate.
Reply
2013-10-20, 06:01 AM,
#5
thats a very odd bot request. does the entire program need to close?
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
  .Net Expert Required insomniac 6 1,535 2016-09-08, 08:38 PM
Last Post: styx
  VB NET FORM APPLICATION QwertySon 12 1,723 2016-04-27, 08:00 PM
Last Post: Harrington
  HttpWebRequest POST Method Visual Basic . net QwertySon 5 1,402 2016-03-17, 02:59 PM
Last Post: QwertySon
  Youtube api v2 to v3 .net evolution74 7 937 2015-06-05, 02:41 AM
Last Post: Jonz




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

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