Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27189

Problem With "Sendkeys.Send" and Browser

$
0
0
Hi everyone, I've made an application that sends text to any textbox in a browser (something like an auto typer). When I press a combination of keys, for example (ALT+F1), the text is sent to the textbox (in the browser (Chrome, Firefox, IE...)), everything works fine but an exception, if the text sent contains spaces, the text is cut until it reaches the first "space" and then the browser window minimizes :S

Piece of code:

Code:


If ComboBox5.Text = "Selected Item" Then
                            SendKeys.Send(ListBox1.SelectedItem)
                            SendKeys.Send("{Enter}")
End If

That happens when the key combination is pressed

Code:

RegisterHotKey(Me.Handle, 300, MOD_ALT, cbox)
When the combination is pressed, it registers the combination and executes a "CASE" (300), which is the code written up.

I want to correct the problem: possibility to send spaces without interrumpting the "send" and without minimizing the window...

*I know why it minimizes the window: "ALT+SPACE" combination opens the window menu (close, minimize, maximize, etc) and then "ENTER" is sent, so it selects minimize from the menu and then enters it.. :S
Tips? Thanks!

Viewing all articles
Browse latest Browse all 27189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>