|
-
Jul 17th, 2001, 08:31 PM
#1
Ignore the shiftkey
how can I have my app ignore the shift key
-
Jul 17th, 2001, 08:53 PM
#2
In what sense? Like with capital letters?
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jul 17th, 2001, 09:29 PM
#3
Fanatic Member
What exactly are you trying to do by ignoring shift? The easiest way would be to just not make anything in your app that uses shift. Or if you had something look at keys you could do something like making Form.KeyPreview = True and then inside the Form_KeyDown (or KeyUp) event, flip the shift bit of the Shift parameter to 0.
VB Code:
Shift = Shift And (vbCtrlMask Or vbAltMask) 'turns of the shift bit
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
-
Jul 18th, 2001, 02:36 PM
#4
I cant seem to figure it out and get it working.
what i need is for the use to be able to hold the shift key during the function below and not affect it so I would like to ignore the shift key during the function
Timer1.Enabled = False
Dim strhwindow As String
Dim StrFilename As String
Dim s As String
StrFilename = GetGUID & txtSuffix.Text & ".htm"
strhwindow = FindWindow(vbNullString, "Save As...")
If strhwindow <> 0 Then SendKeys StrFilename, wait
If strhwindow <> 0 Then SendKeys "{Enter}", True
Timer1.Enabled = True
any ideas?
-
Jul 18th, 2001, 03:23 PM
#5
-
Jul 18th, 2001, 04:10 PM
#6
Fanatic Member
Is holding shift affecting the code you posted? I tried it out myself, and holding shift had no effect. The keys you specify for SendKeys are literal, so "a" is sent as "a", regardless of the shift state. Are you sure that you also have the window specified by strhwindow active? If it's not, SendKeys may not work as you expect. You can force it to be active by using the SetActiveWindow() API once you have the handle.
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
-
Jul 18th, 2001, 04:13 PM
#7
what it is doing is insted of putting a nine in the filename from the getguid it puts in a ( all of the numbers do this and they are filenames and unix dosn't like that
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
|