473,408 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

mousewheel event in VC++.NET

Hi,

I program a windows form application with VC++.NET, I wish to program an
event which occurs when the user uses the mouse wheel in a pictureBox
control. Which event should I use? And how can I program that?

Thanks in advance
Feb 28 '06 #1
4 3679
Check out the 'MouseWheel' event in MSDN.
you basically use it like this:
this->panel1->MouseWheel += gcnew
System::Windows::Forms::MouseEventHandler( this,
&Form1::panel1_MouseWheel );

you can also do this in the properties box of the picture box normally. if
you doubleclick the event the designer will automatically generate the event
handler for you.
strangly enough the MouseWheel event does not show up there (in new winforms
project in VC++2005), but you can add it programmatically.

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"
"tlemcenvisit" <tl**********@discussions.microsoft.com> wrote in message
news:8B**********************************@microsof t.com...
Hi,

I program a windows form application with VC++.NET, I wish to program an
event which occurs when the user uses the mouse wheel in a pictureBox
control. Which event should I use? And how can I program that?

Thanks in advance

Feb 28 '06 #2
I want to say that the event onwheel does not appear in the properties box of
the picture box !
The events onmouseclick, onmousemove, onmousedoubleclick appear but not
onwheel !
I tried to make it by programming, it is compiled but it is not executed !
Please, what is the problem?
"Bruno van Dooren" wrote:
Check out the 'MouseWheel' event in MSDN.
you basically use it like this:
this->panel1->MouseWheel += gcnew
System::Windows::Forms::MouseEventHandler( this,
&Form1::panel1_MouseWheel );

you can also do this in the properties box of the picture box normally. if
you doubleclick the event the designer will automatically generate the event
handler for you.
strangly enough the MouseWheel event does not show up there (in new winforms
project in VC++2005), but you can add it programmatically.

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"
"tlemcenvisit" <tl**********@discussions.microsoft.com> wrote in message
news:8B**********************************@microsof t.com...
Hi,

I program a windows form application with VC++.NET, I wish to program an
event which occurs when the user uses the mouse wheel in a pictureBox
control. Which event should I use? And how can I program that?

Thanks in advance


Mar 1 '06 #3
pictureBox did not have the focus, now it's good, but the event onmousewheel
isn't present in the properties window.
Mar 1 '06 #4
> pictureBox did not have the focus, now it's good, but the event
onmousewheel
isn't present in the properties window.


I know, but you can add it manually in your form constructor.
You can see this in the example that is included with the MouseWheel event
topic in MSDN.

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"
Mar 1 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: deko | last post by:
Is it possible to disable the mouse wheel WITHOUT using a DLL? I've looked at Microsoft Knowledge Base Article 278379 (http://support.microsoft.com/default.aspx?scid=kb;en-us;278379), which...
1
by: Niranjan | last post by:
I have a data entry form. I am trying to avoid users accidentally using the mouse wheel and saving an incomplete record (or saving record that skips the validation routine). In Mousewheel event,...
7
by: Daisy | last post by:
I've got a control with a scrollbar docked to the right-hand side. The scrollbar works fine, I've got an event: bottomControlVScroll.Scroll += new ScrollEventHandler(HandleBottomThingScroll); ...
1
by: Qwert | last post by:
Hello, when a NumericUpDown control has the focus, the mousewheel increases/decreases its value. How does one prevent this from happening? How does one turn off its mousewheel event? Thanks.
1
by: Nicholas Shewmaker | last post by:
(I apologize if this posts twice. My AVG is being fussy.) From what I've read, MouseWheel is a very tricky event. I have replaced my Python tcl84.dll and tk84.dll files with those in the...
7
by: James | last post by:
Hi, I have a Windows Forms application which uses multiple child forms (MDI interface). The height of one of the child forms is larger than the height of the MDI client area, so when this...
3
by: Dave K | last post by:
I seem to be missing something... I want to use a mousewheel event in my VB.NET app... and there's a lot of example code on the net showing how to use the mousewheel event... and the .NET docs...
0
by: WaterWalk | last post by:
Hello. When I tried to make Tkinter canvas widget respond to MouseWheel event on Windows XP, I failed. The canvas just doesn't receive MouseWheel event. I used bind_all to find out which widget...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
In a database search application (vb2005), the user wants to be able to scroll through records using the mousewheel. The data display form contains textboxes for the main data and a datagridview...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
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...
0
agi2029
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 project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.