|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
MouseMove event not firingForm which contains a PictureBox. I have two events, Click and MouseMove that I'd like to cause the program to end (see below) as one would expect from a screen saver. Well my Click event fires but for some reason my MouseMove event does not. Both the Form and the PictureBox are enabled. In my Form_Load routine, I tried placing "Me.Capture = true" which according to the help says it grabs all mouse events - even if the mouse is outside the control (my form starts maximised so this shouldn't be a problem). MouseMove then fires correctly but the Click event then takes two clicks before it fires. Frustrating! I just want my application to end when either event happens. Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click End End Sub Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseMove End End Sub Grateful for any assistance :) -- ______ ___ __ /_ __/_ __/ _ )_______ ___ _/ /_____ ____ / / / // / _ / __/ -_) _ `/ '_/ -_) __/ /_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/ /___/ There are 10 types of people in this world; those who understand the binary numbering system and those who don't. There's no place like 127.0.0.1. ASCII a silly question, get a silly ANSI. -- ______ ___ __ /_ __/_ __/ _ )_______ ___ _/ /_____ ____ / / / // / _ / __/ -_) _ `/ '_/ -_) __/ /_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/ /___/ There are 10 types of people in this world; those who understand the binary numbering system and those who don't. There's no place like 127.0.0.1. ASCII a silly question, get a silly ANSI. Hi tybreaker,
shouldn't Me.MouseMove be PictureBox1.MouseMove > Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As should be> MouseEventArgs) Handles Me.MouseMove > End > End Sub Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles PictureBox1.MouseMove End End Sub hth Greetz Peter -- Show quoteHide quoteProgramming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. (Rich Cook) "TyBreaker" <tybreakerNO@SPAMhotmail.com> schreef in bericht news:uISNVTxTGHA.5972@TK2MSFTNGP10.phx.gbl... > I'm writing a screen saver using Visual Studio 2005 (Basic) and I have a > Form which contains a PictureBox. I have two events, Click and > MouseMove that I'd like to cause the program to end (see below) as one > would expect from a screen saver. Well my Click event fires but for > some reason my MouseMove event does not. Both the Form and the > PictureBox are enabled. > > In my Form_Load routine, I tried placing "Me.Capture = true" which > according to the help says it grabs all mouse events - even if the mouse > is outside the control (my form starts maximised so this shouldn't be a > problem). MouseMove then fires correctly but the Click event then takes > two clicks before it fires. Frustrating! I just want my application to > end when either event happens. > > Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As > System.EventArgs) Handles PictureBox1.Click > End > End Sub > > Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As > MouseEventArgs) Handles Me.MouseMove > End > End Sub > > Grateful for any assistance :) > -- > ______ ___ __ > /_ __/_ __/ _ )_______ ___ _/ /_____ ____ > / / / // / _ / __/ -_) _ `/ '_/ -_) __/ > /_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/ > /___/ > > There are 10 types of people in this world; those who understand the > binary numbering system and those who don't. > > There's no place like 127.0.0.1. > > ASCII a silly question, get a silly ANSI. > > -- > ______ ___ __ > /_ __/_ __/ _ )_______ ___ _/ /_____ ____ > / / / // / _ / __/ -_) _ `/ '_/ -_) __/ > /_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/ > /___/ > > There are 10 types of people in this world; those who understand the > binary numbering system and those who don't. > > There's no place like 127.0.0.1. > > ASCII a silly question, get a silly ANSI. Peter Proost wrote:
Show quoteHide quote > Hi tybreaker, Wow, thank you. My ignorance of the language is obvious! I'm not sure > > shouldn't Me.MouseMove be PictureBox1.MouseMove > >> Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As >> MouseEventArgs) Handles Me.MouseMove >> End >> End Sub > > should be > Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As > MouseEventArgs) Handles PictureBox1.MouseMove > End > End Sub > > hth Greetz Peter how I mucked that up - the routine declarations get inserted automatically but I must have done something to stuff it up at some point. -- ______ ___ __ /_ __/_ __/ _ )_______ ___ _/ /_____ ____ / / / // / _ / __/ -_) _ `/ '_/ -_) __/ /_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/ /___/ There are 10 types of people in this world; those who understand the binary numbering system and those who don't. There's no place like 127.0.0.1. ASCII a silly question, get a silly ANSI. Glad I could help you, but that's what we're here for, to help each other
:-) Greetz, Peter-- Show quoteHide quoteProgramming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. (Rich Cook) "TyBreaker" <tybreakerNO@SPAMhotmail.com> schreef in bericht news:Oh1dgmyTGHA.424@TK2MSFTNGP12.phx.gbl... > Peter Proost wrote: > > Hi tybreaker, > > > > shouldn't Me.MouseMove be PictureBox1.MouseMove > > > >> Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As > >> MouseEventArgs) Handles Me.MouseMove > >> End > >> End Sub > > > > should be > > Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As > > MouseEventArgs) Handles PictureBox1.MouseMove > > End > > End Sub > > > > hth Greetz Peter > > Wow, thank you. My ignorance of the language is obvious! I'm not sure > how I mucked that up - the routine declarations get inserted > automatically but I must have done something to stuff it up at some point. > -- > ______ ___ __ > /_ __/_ __/ _ )_______ ___ _/ /_____ ____ > / / / // / _ / __/ -_) _ `/ '_/ -_) __/ > /_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/ > /___/ > > There are 10 types of people in this world; those who understand the > binary numbering system and those who don't. > > There's no place like 127.0.0.1. > > ASCII a silly question, get a silly ANSI.
DEADLINE! Please help!
need help on bitblt Installation Error: Application validation did not succeed. Unable to continue Object Reference not set an instance of an object Serializing custom properties on a BindingList. How program function keys (e.g. F1, F2) in Windows app? BackgroundWorker and 'freezing' application Multithreading and ActiveX how to capture print message set back ground image to stretch |
|||||||||||||||||||||||