Question : VB6 Cursor location in Text Box

Hi

I am attempting to modify a project that passes a Barcode Scanner input via COM1 to a specific textbox in my VB6 Windows Form.

I only want to pass in the input string if the Cursor Location is actually in the specific TextBox.

How can I test to see if Cursor is in this location?

I have attempted using Text.SelStart and Text.SelLength but obviously these return 0 regardless of whether cursor is in TextBox or not.

FLOG51

Answer : VB6 Cursor location in Text Box

Hi, FLOG51.

Use the ActiveControl property of the form to see which control has focus.
Random Solutions  
 
programming4us programming4us