CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: override

  1. #1
    Join Date
    Feb 2001
    Location
    New Jersey
    Posts
    312

    override

    In Vb I want to override the F1 key on a forum. How does one do that?
    http://www.dewgames.com
    Shareware and Free games!

  2. #2
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    On a Forum?

    Was it on a form?
    In any case, follow links and links to links...maybe...
    http://www.codeguru.com/forum/showth...hlight=disable
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  3. #3
    Join Date
    Feb 2001
    Location
    New Jersey
    Posts
    312
    Yes I meant Forms.... **** I cant speel. And that one I actually knew. Anyway how do I override this F1 key. Please can you help me?
    http://www.dewgames.com
    Shareware and Free games!

  4. #4
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    If it is for the form only

    Do not know what exactly you're asking....
    Set keypreview of form to true
    in keyDown test for Keycode=VbKeyF1
    if match...do what you need...
    Something happens when you press F1? Does it display
    an help you do not want to appear on that form?
    ie: stopping an help from appearing:
    Code:
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
        If KeyCode = vbKeyF1 Then
            KeyCode = 0
            'do what you need
        End If
    End Sub
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  5. #5
    Join Date
    Feb 2001
    Location
    New Jersey
    Posts
    312
    Set keypreview of form to true

    Thanks That was why it wasnt working. Excellent!
    http://www.dewgames.com
    Shareware and Free games!

  6. #6
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    You're welcome

    Nice to have feedback
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

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

Featured