473,804 Members | 3,113 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MouseDown Help

hi all.
in vb6 when the user clicked on the form, in
the "MouseDown" Event i had the x,y positions - where
the user clicked.
how can i do it in vb.net?

Nov 21 '05 #1
2 1255
Shachar,

For a lot of those active in this newsgroup is the VB6 time at least two
years ago. While there are as well who never used it.

So when you want an upgrade answer please ask that in the newsgroup
microsoft.publi c.dotnet.langua ge.vb.upgrade

When you want to know the x,y positions in a mousedown in VBNet, just ask
for that in this newsgroup.

You can find it in that event as e.X and e.Y

I hope this helps?

Cor

"shachar"
...
hi all.
in vb6 when the user clicked on the form, in
the "MouseDown" Event i had the x,y positions - where
the user clicked.
how can i do it in vb.net?

Nov 21 '05 #2
"shachar" <an*******@disc ussions.microso ft.com> schrieb:
in vb6 when the user clicked on the form, in
the "MouseDown" Event i had the x,y positions - where
the user clicked.
how can i do it in vb.net?


Inside the handler, check 'e.X' and 'e.Y'. In some situations it may be
more appropriate to use the 'MouseUp' event.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3

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

Similar topics

3
11912
by: pleary | last post by:
I am quite familiar with JavaScript and many other programming languages as I am a programmer for a living. However, I am having a heck of a time figuring out this problem. I would like to have a function loop as long as the mouse button is pressed. I am aware of the onMouseDown event to fire the loop, but I cann't figure out how to stop the loop with the onMouseUp event. I have tried setting a boolean value with the onMouseDown event,...
2
16324
by: JJ | last post by:
Hi All, I need to create a MouseDown event for a picture box . Am I doing the following right? pictureBox.MouseDown += new System.WinForms.MouseEventHandler(pictureBox_MouseDown) Then
1
4244
by: Jürgen Müllder | last post by:
Hi! I have a TreeView in my Application. I have the MouseDown Attached to the TreeView. When i click at a Node it makes that what it should. But when i Expand a Node by clicking at the Plus Sign the MouseDown gets fired and it runs the routine, what i don't want. Is there a way to find out if the expand sign was clicked? My Idea was to get a bool and a TreeNode in the class where i fetch the
7
8124
by: Scott Mackay | last post by:
Hi, I'm using visual studio dotnet 2002 programming in vb can anyone tell me how I can handle the mousedown event for pictureboxes I create dynamically at runtime? I've tried setting the mousedown to handle mybase.mousedown but it doesn't detect the mousedown event until I move out of the pictureboxes I have created (only works on the part of the form where I don't have any pictureboxes). I also cannot set the mousedown event to...
4
4747
by: rsmith | last post by:
How can I capture the MouseDown event on a Label ? I entered thr following code and got a " cannot handle Event 'MouseDown' because they do not have the same signature." Private Sub Label1_MouseDown _ (ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles Label1.MouseDown
4
4358
by: Colin McGuire | last post by:
Hi again, thanks everyone for your previous help. But having resolved past problems, I'm moving on to new problems :( This one is a simple winforms application with two buttons, named Button1 and Button2, on it (code below). When I press the mouse button over Button2, and don't release it, in the IDE output window it prints "Button2_MouseDown" only. If I release the mouse button over the button, over the form, or even over ANY other...
2
3567
by: Rob | last post by:
How can I fix the following warning warning BC40004: sub 'MouseDown' conflicts with event 'MouseDown' in the base class 'Control' and so should be declared 'Shadows'. This warning appears because I entered the following Sub Private Sub MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) _ Handles AxWebBrowser1.MouseDown
1
2797
by: Alan | last post by:
i have a form with a label on it Private Sub Label1_mousedown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown ' do stuff End Sub Private Sub Label1_mouseup(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseUp
1
5223
by: JDeats | last post by:
It appears the WinForm MouseDown and MouseUp event handlers are not working properly. In the "bare bones" sample application below, Form1_MouseUp gets called even through the mouse button remains pressed while dragging the Form window to resize it. Can this "problem" be explained as some sort of by-design behavior? If so what is the work around to detecting when a user has completed resizing a Windows Form by way of mouse drag? / ...
2
3020
by: lmefford | last post by:
Is there a way to modify all textboxes on a form so that when you click on any of them you process the SelectAll() function. For exaple, let's say I've created a form with 30 textboxes. These textboxes when clicked on, will select all of the text inside of them using the textbox.selectall(). I'm hoping to do this without creating 30 different Subs. How do I do it?
0
9579
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,...
0
10578
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10321
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
10077
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...
0
9152
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4300
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
3
2991
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.