d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Question About Vb Input Boxes
Add Reply New Topic New Poll
Member
Posts: 22,498
Joined: Mar 21 2007
Gold: 237.50
Nov 24 2013 04:52pm
Can you create ur own custom input boxes in vb 2010 express

And if not how do you interact with the controls in a standard one?
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Nov 24 2013 04:55pm
Quote (havok420 @ Nov 24 2013 05:52pm)
Can you create ur own custom input boxes in vb 2010 express


Yes. just create a form with what you want.

Quote
And if not how do you interact with the controls in a standard one?


https://www.google.com/search?q=Vb+Input+Boxes
Member
Posts: 22,498
Joined: Mar 21 2007
Gold: 237.50
Nov 24 2013 06:00pm
still wasn't able to make it do what I want but it's not that important

Thanks for your input though
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Nov 24 2013 06:17pm
Quote (havok420 @ Nov 24 2013 07:00pm)
still wasn't able to make it do what I want but it's not that important

Thanks for your input though


wouldve helped if you described what you want to do.
Member
Posts: 22,498
Joined: Mar 21 2007
Gold: 237.50
Nov 25 2013 11:42am
Quote (carteblanche @ Nov 24 2013 08:17pm)
wouldve helped if you described what you want to do.


Here's what I was trying to do, and I don't think this is that difficult if you know how to use input boxes

Suppose a program has a button with the caption "Quit". Suppose also that the name property of this button is btnQuit. Write a btnQuit_Click event procedure that gives the user a second chance before ending the program. The procedure should use an input box to request that the user confirm that the program should be terminated, and then end the program only if the user responds in the affirmative
Member
Posts: 2,757
Joined: Nov 26 2007
Gold: 1,214.81
Nov 25 2013 12:02pm
put this in your btnQuit_Click handler
Code
Dim result As MsgBoxResult = MessageBox.Show("Are you sure?", "Quit", _
MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
If result = MsgBoxResult.Yes Then
Application.Exit()
End If


This post was edited by labatymo on Nov 25 2013 12:04pm
Member
Posts: 22,498
Joined: Mar 21 2007
Gold: 237.50
Nov 25 2013 12:32pm
Quote (labatymo @ Nov 25 2013 02:02pm)
put this in your btnQuit_Click handler
Code
Dim result As MsgBoxResult = MessageBox.Show("Are you sure?", "Quit", _
  MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
        If result = MsgBoxResult.Yes Then
            Application.Exit()
        End If


Wow awesome thanks a lot

Was never taught any of this in class but this does EXACTLY what I wanted it to do
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll