|
-
Aug 22nd, 2000, 09:36 PM
#1
Your question is
What is the num-lock error? Does this really matter if the end user is on a desktop or laptop?
-
Aug 22nd, 2000, 10:28 PM
#2
PowerPoster
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....
-
Aug 22nd, 2000, 11:12 PM
#3
Frenzied Member
why would you have to close it?
-
Aug 23rd, 2000, 08:08 AM
#4
PowerPoster
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....
-
Aug 23rd, 2000, 08:42 AM
#5
Hyperactive Member
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 
-
Aug 23rd, 2000, 08:53 AM
#6
Hyperactive Member
I am so skeptical, I can hardly believe it!
PS I am not a 'hyperactive member' I am a cool, calm, and collected member 
-
Aug 23rd, 2000, 09:15 AM
#7
Hyperactive Member
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 
-
Aug 23rd, 2000, 02:58 PM
#8
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|