Results 1 to 8 of 8

Thread: Same laptop question from before

  1. #1
    Guest

    Question Your question is

    What is the num-lock error? Does this really matter if the end user is on a desktop or laptop?

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Red face

    I am attempting to allow CAPLOCK and NUMLOCK to be turned on a the launch of the program. On a laptop, this becomes a pain, because it must be turned off. I would like to determine if laptop, not to turn NUMLOCKS on.
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  3. #3
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    why would you have to close it?

  4. #4
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441
    OK the problem is this. If NUMLOCK enabled on a laptop, my Gateway for example, typing in a U gets you a 4, I a 5, and so on. This is what I am trying to avoid. Turn the function off if on a laptop.
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  5. #5
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444
    i do not have a laptop so I can only offer an idea.
    It is my understanding that laptops run certain services for power managment and monitoring that desktop pc do not have.
    Perhaps searching to see if these services are running could determine if you are on a laptop or not.
    Perhaps another idea is to determine what kind of keyboard the user has.
    it may be possible to have a desktop pc without a numeric key pad. Rare but possible on some old systems.
    an easy way is to ask the user when installing the program if the system has a numeric key pad or not.
    post a reply if you can determine the keyboard type because I would like to know how to tell.
    When I installed linux I found that there are subtle differences in keyboards so it may be a good thing to know what the system has for hardware.
    I am so skeptical, I can hardly believe it!
    PS I am not a 'hyperactive member' I am a cool, calm, and collected member

  6. #6
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444
    I am so skeptical, I can hardly believe it!
    PS I am not a 'hyperactive member' I am a cool, calm, and collected member

  7. #7
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444
    start a project with a command button and a simple text box with multiline property =true
    Code:
    Option Explicit
    Private Declare Function GetKeyboardType Lib "user32" (ByVal nTypeFlag As Long) As Long
    Private Sub Command1_Click()
    Dim retval As Long
    
    retval = GetKeyboardType(0)
    Select Case retval
    Case 1
        Text1.Text = "IBM PC/XT or compatible (83-key) keyboard"
    Case 2
        Text1.Text = "Olivetti 'ICO' (102-key) keyboard"
    Case 3
        Text1.Text = "IBM PC/AT (84-key) or similar keyboard"
    Case 4
        Text1.Text = "IBM enhanced (101- or 102-key) keyboard"
    Case 5
        Text1.Text = "Nokia 1050 and similar keyboards"
    Case 6
        Text1.Text = "Nokia 9140 and similar keyboards"
    Case 7
        Text1.Text = "Japanese keyboard"
    End Select
    
    
    retval = GetKeyboardType(1)
    Select Case retval
    Case 0
        Text1.Text = Text1.Text & vbCrLf & "Windoze hates you and refuses to give you any info!"
    Case 1
        Text1.Text = Text1.Text & vbCrLf & "10 Function keys"
    Case 2
        Text1.Text = Text1.Text & vbCrLf & "12 sometimes 18 Function keys"
    Case 3
        Text1.Text = Text1.Text & vbCrLf & "10 Function keys"
    Case 4
        Text1.Text = Text1.Text & vbCrLf & "12 Function keys"
    Case 5
        Text1.Text = Text1.Text & vbCrLf & "10 Function keys"
    Case 6
        Text1.Text = Text1.Text & vbCrLf & "24 Function keys"
    Case 7
        Text1.Text = Text1.Text & vbCrLf & "Hardware dependent and specified by the OEM"
    End Select
    End Sub
    I wonder what anybody else gets. My machine is telling me that I have a japanese keyboard. And gives me zero for the subtype.
    NT 4.0 SP5 compaq deskpro, vb6 sp3
    If you get it to work for your please post.
    I am so skeptical, I can hardly believe it!
    PS I am not a 'hyperactive member' I am a cool, calm, and collected member

  8. #8
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444
    does this api give anyone else the wrong description of the key board?
    I am so skeptical, I can hardly believe it!
    PS I am not a 'hyperactive member' I am a cool, calm, and collected member

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