[RESOLVED] [2005] Default button on a form, and Icon question
Hey guys, I want to know how you set the keyboard shortcut, and default button on a form, similar to an installation menu, at the end, you could press alt, and the letter "F" would be underlined in the word "Finish", and if you press "F" on the keyboard, it would select finish, and "Finish" might also be the default button, already selected. How would I apply this to a button in VB?
Also, if I have an image, or create an image in photoshop, do you know of any programs which will turn it into an icon file (.ico)?
Thanks!
Regards,
Silencer
Re: [2005] Default button on a form, and Icon question
If anyone has codes or a link to a website, it would be appreciated greatly.
Re: [2005] Default button on a form, and Icon question
For setting the Default Button,Select the Form Property and search for AcceptButton button and in that set any avl button to default button
Re: [2005] Default button on a form, and Icon question
And for setting the Alt+F option , set the Caption of the button like this &Finish
Hope this helps
Re: [2005] Default button on a form, and Icon question
Quote:
Originally Posted by danasegarane
And for setting the Alt+F option , set the Caption of the button like this &Finish
Hope this helps
How would you set the caption? Its not in the properties box...and for the Acceptbutton, you would put the code in the form1 load sub, but how? I'm using vb 2005...
Re: [2005] Default button on a form, and Icon question
vb Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.AcceptButton = Button1
Me.Button1.Text = "&Finish"
End Sub
If you press Alt+F the button1 click event will be executed
Re: [2005] Default button on a form, and Icon question
:D You rock man! Thanks a lot, now my programs will be much better! I can't thank you enough! I rated your post :thumb:
Regards,
Silencer
Re: [2005] Default button on a form, and Icon question
Welcome :)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"