|
-
Nov 28th, 2009, 07:42 PM
#1
Thread Starter
New Member
Adding something in my program.
Hi, I'd like to know how to add buttons, and when you press the buttons, text appears in a text box that I put in. Is that possible to create?
Let me know,
Jeremy
-
Nov 28th, 2009, 07:58 PM
#2
Addicted Member
Re: Adding something in my program.
 Originally Posted by Feartheyankees
Hi, I'd like to know how to add buttons, and when you press the buttons, text appears in a text box that I put in. Is that possible to create?
Let me know,
Jeremy
Hi,
You don't know how to add buttons on a form? Well I suggest you play around in the IDE for a while or read some tutorials by searching google before asking questions here as you would be making a lot of posts.
To add a button to the form just drag it from the toolbox or double click it, then it will appear on the form, very simple (you sure you mean that?).
-
Nov 28th, 2009, 08:09 PM
#3
Lively Member
Re: Adding something in my program.
This is very easy.
To add a button just drag it to the form. Then to make it so the message box pops up.
Double click it. Then add this.
Code:
MsgBox("Whatever you want the message to be", MsgBoxStyle.Information, "Title")
-
Nov 28th, 2009, 08:34 PM
#4
Thread Starter
New Member
Re: Adding something in my program.
No, i know how to add a button. I just need to know how to add a code that'll do what I asked. Thanks
-
Nov 28th, 2009, 09:09 PM
#5
Re: Adding something in my program.
I'd like to know how to add buttons, and when you press the buttons, text appears in a text box that I put in. Is that possible to create?
It is not clear to me... 
But I think you want to display text inputted by the user, when he clicks a button, should be displayed in a text box.. Is it..???
Then,
Code:
Private Sub Command1_Click()
Text1.Text=InputBox("Please enter something","Text ?")
End Sub
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Nov 28th, 2009, 09:31 PM
#6
Frenzied Member
Re: Adding something in my program.
Start a new exe project and add a button. Now double click it. This will bring you to the code window for the control in question and its default event, presently a command button. Now, go back to the form design view and change the command buttons name from command1 to commandTest. Set its caption and any other property you want. Double click on the button once again and you will see that it has once again taken you to the code window but the cursor is now in a different sub that has the controls new name.
Now, if you look up above the code window or at the top (depends upon your point of view), you will see two combo boxes. The one on the left allows you to navigate between the different objects on the form and the form itself. Presently it should read commandTest (if you followed instructions above).
Then, the combo box on the right will list the events that the object in question recieves (not all objects recieves the same events).
Good Luck
Option Explicit should not be an Option!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|