Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
 All Forums
 Other hexagora products
 Programs (Programmi)
 [HELP] ctlUniTextBoxXP, sendkeys and shift

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert Email Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
ma.montesi Posted - 29 Apr 2015 : 07:33:54
Hi, I have a ctlUniTextBoxXP wrapped in a custom usercontrol.
Everything works fine if I press keys on the keyboard.
When an application tries to write text in my control using the SendKeys statement (I'm sure the usercontrol is focused) the keyboard events loose the correct shift argument.
For example if I press Shift+A on the keyboard the code below output is:

keydown 16 Shift = 1
keydown 65 Shift = 1
keyup 65 Shift = 1
keyup 16 Shift = 0

If I use SendKeys "+a" the output is:

keydown 16 Shift = 0
keydown 65 Shift = 0
keyup 65 Shift = 0
keyup 16 Shift = 0

Can this behavior be fixed?
Thanks in advance, Marco

Private Sub MyRichTextBox1_KeyDown(KeyCode As Integer, Shift As Integer)
Debug.Print "keydown " & KeyCode & " Shift = " & Shift
End Sub

Private Sub MyRichTextBox1_KeyUp(KeyCode As Integer, Shift As Integer)
Debug.Print "keyup " & KeyCode & " Shift = " & Shift
End Sub
10   L A T E S T    R E P L I E S    (Newest First)
nikolaus Posted - 25 Jun 2015 : 11:43:41
as far as I know, SendKeys is unsupported within Win versions Vista plus. For more info, refer the following site:

http://www.vbforums.com/showthread.php?456795-Modifications-Required-for-VB6-Applications-to-Work-on-Vista-7&p=2807202#post2807202

C.U., nikolaus
s.dav Posted - 18 May 2015 : 05:07:50
riprovo sull'altro indirizzo
s.dav Posted - 18 May 2015 : 05:07:40
l'ho zippato anche la prima volta ;-)
ma.montesi Posted - 17 May 2015 : 23:47:34
quote:
Originally posted by s.dav

Spedito


Scusami Davide ma non ho ricevuto nulla.
Forse il problema ? nel nostro server di posta che blocca gli allegati.
Prova a reinviare la mail zippando il file .ocx, oppure mandala a marco.montesi at gmail.com

Grazie, Marco
s.dav Posted - 14 May 2015 : 23:55:44
Spedito
ma.montesi Posted - 14 May 2015 : 23:05:32
quote:
Originally posted by s.dav

marco,

mandami una mail che ti allego il file .ocx di prova



Ciao Davide,
puoi mandarmi l'ocx di prova a questo indirizzo:
xxxxxxxxxxxxxxx

Grazie, Marco
s.dav Posted - 14 May 2015 : 04:06:12
marco,

mandami una mail che ti allego il file .ocx di prova
ma.montesi Posted - 13 May 2015 : 22:44:53
Hi Davide, news?
ma.montesi Posted - 04 May 2015 : 23:01:09
It's simple: create a blank new project, put a ctlUniTextBoxXP on the form and paste the code below.
Run the app and compare the debug output after the SendKeys command and after you press (shift + a) manually on the keyboard.

Private Sub ctlUniTextBoxXP1_KeyDown(KeyCode As Integer, Shift As Integer)
Debug.Print "keydown " & KeyCode & " Shift = " & Shift
End Sub

Private Sub ctlUniTextBoxXP1_KeyUp(KeyCode As Integer, Shift As Integer)
Debug.Print "keyup " & KeyCode & " Shift = " & Shift
End Sub

Private Sub Form_Activate()
ctlUniTextBoxXP1.SetFocus
SendKeys "(+a)", True
End Sub
s.dav Posted - 03 May 2015 : 23:09:15
Marco, send me the sample project and I'll check

Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000