Results 1 to 2 of 2

Thread: 2 Questions...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    124

    Arrow 2 Questions...

    1) What is the font used be windows for the form's title bar?

    2) What can I use in the form's KeyPress Event to perform an action when i press a function key like F5 for example? I tried numerous things but nothing worked.

    Any help on the above would be great
    I never know what to put in this section...



    So sue me... ... ... I'm just kidding...


    www.fat-pie.com Flash Movies... You gotta see 'em to believe 'em!

  2. #2
    Fanatic Member Andy_P's Avatar
    Join Date
    May 2005
    Location
    Dunstable, England
    Posts
    669

    Re: 2 Questions...

    1) Trebuchet MS, I think.

    2) I'm not sure how to use the KeyPress event for a form (I'm still very much a newbie!), but this works for me, using the KeyDown event:

    Set the form property 'KeyPreview' to TRUE.

    Code:
    Private Sub frm_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
            
            If e.KeyData = Keys.F5 Then
    
                MsgBox("F5 key pressed!")
    
                e.Handled = True
    
            End If
            
        End Sub
    Hope this helps.
    Last edited by Andy_P; Jun 12th, 2005 at 08:15 AM.
    Using Windows XP Home sp3
    Mucking around with C# 2008 Express
    while ( this.deadHorse ) { flog( ); }


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