Re: Giving Button Functions?
Re: Giving Button Functions?
Like I said, big big beginner
where do I apply that coding, on that button right
and its ALT + left so.. let me try.
Re: Giving Button Functions?
okay i got this error "Specified repeat count is not valid."
i think it kept clicking it infinity? how can you do it so when you click it does it once
-sry for doublepost
Re: Giving Button Functions?
just put it in your button_click event. doubleclick the button + vb will open the button_click event in your code window
Re: Giving Button Functions?
SendKeys.Send("%{LEFT}") specifies to send alt+left to the application with the focus (i.e. your application)
Re: Giving Button Functions?
While SendKeys is the way to simulate a certain key combination to your program, I don't think it's the best way here...
I suppose 'my browser' means that you got a webbrowser control on your form? If so, you can simply call it's "GoBack" function. There is no need to use SendKeys in this case.
If you don't have your own browser control but you mean an external browser (internet explorer, whatever) then maybe SendKeys is the way to do this...
Re: Giving Button Functions?
ok heres what my code lines look like for the button:
Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
SendKeys.Send("%{LEFT}")
End Sub
End Class
when i push f5 to test it, i click the button and nothing happens
shudnt the button be affiliated with the webbrowser?
Re: Giving Button Functions?
YES a webmaster is what i mean. where is this goback funtion found?
Re: Giving Button Functions?
if sendkeys doesn't work, try NickThissens solution
Re: Giving Button Functions?
Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.WebBrowser1.GoBack()
End Sub
Re: Giving Button Functions?
it works!
THANK YOU EVERYBODY FOR YOUR TIME AND SUPPORT!
Re: Giving Button Functions?
hmm i come with another problem....
Code:
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Me.WebBrowser1.Stop()
End Sub
that doesnt seem to work...