Results 1 to 8 of 8

Thread: [RESOLVED] [2005] Default button on a form, and Icon question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2007
    Location
    NYC
    Posts
    86

    Resolved [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
    There is a thin line between hobby, and obsession.

    If you found my post helpful, please rate it.
    My Laptop System Stats: nVidia 8800 graphics card, Two Intel Core Duo processors, 3.5 GB RAM, Windows Vista Ultimate, 15.4 Widescreen Brightview display, Built-in Webcam and Microphone.
    My Alienware System Stats: nVidia 8800 graphics card, Intel Core Duo Extreme Edition processors, 4 gb RAM, Windows Vista Ultimate, 21 Inch Plasma Display, 42 Inch LCD HD display.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Apr 2007
    Location
    NYC
    Posts
    86

    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.
    There is a thin line between hobby, and obsession.

    If you found my post helpful, please rate it.
    My Laptop System Stats: nVidia 8800 graphics card, Two Intel Core Duo processors, 3.5 GB RAM, Windows Vista Ultimate, 15.4 Widescreen Brightview display, Built-in Webcam and Microphone.
    My Alienware System Stats: nVidia 8800 graphics card, Intel Core Duo Extreme Edition processors, 4 gb RAM, Windows Vista Ultimate, 21 Inch Plasma Display, 42 Inch LCD HD display.

  3. #3
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    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
    Please mark you thread resolved using the Thread Tools as shown

  4. #4
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    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
    Please mark you thread resolved using the Thread Tools as shown

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Apr 2007
    Location
    NYC
    Posts
    86

    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...
    There is a thin line between hobby, and obsession.

    If you found my post helpful, please rate it.
    My Laptop System Stats: nVidia 8800 graphics card, Two Intel Core Duo processors, 3.5 GB RAM, Windows Vista Ultimate, 15.4 Widescreen Brightview display, Built-in Webcam and Microphone.
    My Alienware System Stats: nVidia 8800 graphics card, Intel Core Duo Extreme Edition processors, 4 gb RAM, Windows Vista Ultimate, 21 Inch Plasma Display, 42 Inch LCD HD display.

  6. #6
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: [2005] Default button on a form, and Icon question

    vb Code:
    1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         Me.AcceptButton = Button1
    3.         Me.Button1.Text = "&Finish"
    4.     End Sub

    If you press Alt+F the button1 click event will be executed
    Last edited by danasegarane; Apr 13th, 2007 at 08:25 PM. Reason: Code modified
    Please mark you thread resolved using the Thread Tools as shown

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Apr 2007
    Location
    NYC
    Posts
    86

    Re: [2005] Default button on a form, and Icon question

    You rock man! Thanks a lot, now my programs will be much better! I can't thank you enough! I rated your post

    Regards,
    Silencer
    There is a thin line between hobby, and obsession.

    If you found my post helpful, please rate it.
    My Laptop System Stats: nVidia 8800 graphics card, Two Intel Core Duo processors, 3.5 GB RAM, Windows Vista Ultimate, 15.4 Widescreen Brightview display, Built-in Webcam and Microphone.
    My Alienware System Stats: nVidia 8800 graphics card, Intel Core Duo Extreme Edition processors, 4 gb RAM, Windows Vista Ultimate, 21 Inch Plasma Display, 42 Inch LCD HD display.

  8. #8
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    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"
    Please mark you thread resolved using the Thread Tools as shown

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width