Originally posted by Killer42
VB is an event-driven language. When the user clicks on the button control, it fires an event procedure called Command1_Click. That's where you would place the code to do something when the button is clicked. (Note that a "click" on the button can also be triggered by the keyboard, but that's not really relevant to this discussion.)
So, let's further assume that when the button is clicked, you want to take the text which is displayed on the button (it's .Caption property) and place it in the textbox. You do this by setting the .Text property of the textbox.
The entire code required to do this would look something like this...
[CODE=vb]Option Explicit
Private Sub Command1_Click( )
Text1.Text = Command1.Captio n
End Sub[/CODE]However, you won't need to enter all of that. You just double-click on the button in the form design window, and it will create the Command1_Click routine - then you simply fill in what to do.
Let me know whether this is what you're after.
However, I'd recommend you have a look on the web for VB tutorials - there are plenty of them around. TheScripts is not really a getting-started site, so much. We're more geared toward helping programmers who run into specific problems in their code.
You might also want to consider downloading a free copy of VB 2005 Express Edition from Microsoft's website. While I love VB6, it is almost 10 years old, so it would seem to make more sense to learn the newer version.
Comment