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. 3 5130
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
--
Programming 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" <ty*********@SPAMhotmail.com> schreef in bericht
news:uI**************@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: 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.
Glad I could help you, but that's what we're here for, to help each other
:-)
Greetz, Peter
--
Programming 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" <ty*********@SPAMhotmail.com> schreef in bericht
news:Oh*************@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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tim Mulholland |
last post by:
I have written some code that causes mouseover effects on a picture box.
The code works fine most of the time and creates some really nice effects.
HOWEVER,
If i try, i can get the effects to...
|
by: Tim Mulholland |
last post by:
i posted this a while ago and never got a response, but i'm still having
problems, so i thought i'd see if anyone had any sudden realizations this
time
Thanks in advance!
Tim
I have...
|
by: Sam Sungshik Kong |
last post by:
Hello!
If I understand correctly, MouseMove event is triggered when the mouse moves
(ie when point changes).
I, however, found out that it's triggered even if the mouse is not moving.
What I...
|
by: Crucifix |
last post by:
Hello,
I'm writing a small C# app, and part of what I'm trying to do
involves the dragging of PictureBox controls on a form. Unfortunately,
MouseMove seems to be behaving very oddly, causing...
|
by: Jakub Ćukomski |
last post by:
hi. i've got a problem as follows, to which i can't find a solution to:
i've got two divs, which are completely independent of each other
(neither is a parent of child of another).
they're...
|
by: Dave |
last post by:
I have a listview control in a form, and I use the mousemove event (to set a
tooltip). This worked fine in VS2003, but when I ported it to VS2005 I found
that when the mouse hovers over a populated...
|
by: missinglinq |
last post by:
Having been asked, for the umpteenth time, how to use the MouseMove property to change the appearance of an object, I put together this short tutorial and sample database today. Perhaps it will be of...
|
by: info |
last post by:
Hello everybody,
I hope you can help me with my problem. I want to add the mousemove
event to a class that doesn't have it (specifically it is the
nationalinstruments.ui.xycursor from measurement...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
| |