473,804 Members | 2,536 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to handle mouse events?

8 New Member
Hi, I am using windows forms. I have a problem in handling mouse events. In my application there is menu bar on top. In menu bar I have several toolstripmenu items. I want that when toolstripmenu item is highlighted, it shows some description in label. I am totally confused. What event I used to handle this problem. I used mouse enter, mouse move & mouse leave event but when mouse enters in the area of any menu item, its alright. The label shows some description when mouse enters or mouse move on the item. But when I move mouse on other area of form. The label remain shows the description about an item. I want that when mouse leaves the area of toolstripmenu item, the label goes blank. Help me to solve this problem
Jun 20 '10 #1
4 2581
ThatThatGuy
449 Recognized Expert Contributor
What do you mean by the label...
Is it a tooltip that you're saying
Jun 21 '10 #2
shariquekhan
8 New Member
@ThatThatGuy
That is not a tool tip. But I want to use as a tool tip. I want to show some description in status bar label. I have menustrip in my application and I want that when I move mouse on menu option. It shows description in status bar label. For Example I have open tool strip item in menu strip and when I move mouse on "open" option it shows text "Open Files" in status bar label. Give me an idea how to use Mouse Enter/Move/Leave events. I used mouse move & mouse Enter events it shows text in a label control but when I take away my mouse from "open" option, it still shows the open description. Any Idea how to use Mouse leave event or What mouse leave event can do? Here is my code. Take a look and tell me what's the problem

private void openToolStripMe nuItem_MouseEnt er(object sender, EventArgs e)
{
label1.Text = "Open files";

}


private void openToolStripMe nuItem_MouseLea ve(object sender, EventArgs e)
{
label1.Text = "";

}
Jun 24 '10 #3
shariquekhan
8 New Member
Hey above code is works fine for me. I am happy. I really don't know whats the problem at that time. But Now above code works fine for me
Jun 24 '10 #4
ThatThatGuy
449 Recognized Expert Contributor
@shariquekhan
Them use MouseMove event instead of MouseEnter
Jun 25 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6230
by: John Champaign | last post by:
Hi all, I'm working on an educational applet for a child with special needs. He's got a bit of a trick to make my life more difficult... To interact with the applet he needs to click on buttons, which is fine most of the time (he comes from a Mac environment, so I accept mouse clicks from the right or left button when he's working on the PC). But every once in a while, he'll press and hold the right mouse button, move onto a JButton,...
3
10685
by: red | last post by:
mouse events when the mouse is on a "child control" hi everyone; my problem: I have a userControl in this usercontrol, I have a child control (a button) when the mouse moves over the userControl, I can detect the movement using MouseMove event. the problem is when the mouse is on the child control : I can t detect
5
3768
by: Bill Henning | last post by:
Does anyone know a good method of preventing keyboard and mouse events from interrupting processing? My situation is: 1) I need to track and handle all key and mouse events 2) I need to perform processing on certain key/mouse events 3) If key/mouse events interrupt processing, the events should not be discarded since they need to be handled but AFTER the current processing is complete
1
7075
by: RC | last post by:
I know some JavaScript mouse events are: onClick, onMouseOver, onMouseOut, onMouseDown and onMouseUp. Are there more like: onMousePress, onMouseDrag, onMouseMove In Java there are:
0
1614
by: Gamey | last post by:
I have an application that NEEDS (don't ask) to handle additional mouse and keyboard processing during DoDragDrop. Normally, DoDragDrop kindly squashes all keyboard and mouse events. Alternate, more specific events, are used in their stead such as DragEnter, DragLeave, DragHover, GiveFeedback, and QueryContinueDrag. None of these give me access to the general state of the keyboard or to mouse events ( in my case I really need the mouse...
1
2753
by: MrNobody | last post by:
I'm going to be creating shapes in a OnPaint method of an extended Panel object, and I need mouse event functionality (onClick, onMouseOver) that kind of stuff... what's the best way to go about doing this? Are there any design patterns, algorithms for best performance? Best way to translate mouse's x,y coords into a shape on my Panel
2
5861
by: =?Utf-8?B?c25naWxi?= | last post by:
The WebBrowser control is described as exposing numerous public mouse events. See: http://msdn2.microsoft.com/en-us/library/ayestehw.aspx. many of the event are described as: "This event is not supported by this control. (inherited from WebBrowserBase)". Does this mean that I can't access these? I am using VS Express C#. Otherwise how do I capture webBrowser mouse events? I am trying to have a DISPLAY-ONLY browser window (i.e. no...
2
3259
by: ahmed.maryam | last post by:
Hello Everyone, I designed a custom control that is entirely covered by a picture box. I then dragged this custom control onto a windows form application (called main) and I need to handle mouse events in my main application. Specifically, when a user double clicks on my custom control I need to draw something on another picture box located in my main application. I'm going to attempt to draw the scenario because I think it will
3
1364
by: informat | last post by:
Hi : I had a Form and I put the property Transparency Key to "Control" so some of the form will be hidden .... but I still want to handle User Mouse Clicks on the hidden part of the form ... How Can I ? thanks ...
6
4016
by: =?Utf-8?B?TXJOb2JvZHk=?= | last post by:
I mught have misunderstood how SetCapture works, but I call it passing my form's Handle and I am not noticing any difference in what mouse events my app is picking up. It is only limited to mouse events within my control, which is the same way it worked with just setting a mouse event handler directly. What I desire is to capture mouse events accross the entire system, whether I click in my window or another window... SetCapture...
0
9711
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9591
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10331
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10087
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7631
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4306
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.