I have a form listview and have used the MouseDown event to launch a
modal dialog if a particular cell is clicked.
This works fine but upon closing the dialog I am left with a dotted
rectangle drawn between where the original click was and where I
clicked to close the dialog. Until another mouse click occurs this
rectangle resizes as you move the mouse. I guess this is because the
MouseUp event hasn't fired yet (or fired on the modal dialog).
What is the best way to prevent this, or invoke the MouseUp event once
the dialog has closed. 2 3149
On Mon, 09 Jul 2007 00:56:48 -0700, <ch************ *@gmail.comwrot e:
I have a form listview and have used the MouseDown event to launch a
modal dialog if a particular cell is clicked.
This works fine but upon closing the dialog I am left with a dotted
rectangle drawn between where the original click was and where I
clicked to close the dialog. [...]
What is the best way to prevent this, or invoke the MouseUp event once
the dialog has closed.
The answer is to not invoke the dialog on the MouseDown event. Doing so
is non-standard UI anyway, and creates the situation you're seeing in
which the same user action that would normally be interpreted as
mouse-dragging is being overloaded with the dialog invocation as well.
Instead, use MouseUp for knowing when to show the dialog.
Pete
Peter,
Thanks - worked a treat.
Charlie
On 9 Jul, 18:08, "Peter Duniho" <NpOeStPe...@nn owslpianmk.comw rote:
On Mon, 09 Jul 2007 00:56:48 -0700, <charlieopens.. .@gmail.comwrot e:
I have a form listview and have used the MouseDown event to launch a
modal dialog if a particular cell is clicked.
This works fine but upon closing the dialog I am left with a dotted
rectangle drawn between where the original click was and where I
clicked to close the dialog. [...]
What is the best way to prevent this, or invoke theMouseUpevent once
the dialog has closed.
The answer is to not invoke the dialog on the MouseDown event. Doing so
is non-standard UI anyway, and creates the situation you're seeing in
which the same user action that would normally be interpreted as
mouse-dragging is being overloaded with the dialog invocation as well.
Instead, useMouseUpfor knowing when to show the dialog.
Pete
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jeremy Robertson |
last post by:
I'm working on an application that manages large image files (mulit-page
..Tiff's to be exact some 1000+ pages).
I've written an user control that displays a number of the images as
thumbnails in a scrollable window. The user can select and modify Images
from my thumbnail control. I need to let the user re-arrange the images if
they are out of order. I need the user to be able to click on a thumbnail or
multiple and DRAG them to the...
|
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...
|
by: Michael Maes |
last post by:
Hi,
I have a child-form in an MDI-Application which seems to loose the MouseUp-Event.
I grid (for navigation-purpose) appears on many of the child-forms and in (I think) only one this issue occurs.
What happens:
Private Sub grdNavigation_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles grdNavigation.MouseDown
Debug.WriteLine("Down: " & e.Button.ToString)
End Sub
|
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
|
by: dave.wayne |
last post by:
In a web page I have a div tag that has a onlick event registered
through the event listener. However, that same div tag also has a
onmousedown - start a drag and drop script
The problem I am having is that once the drag and drop is complete, the
mouse button is released and the onclick event is firing. I've tried
returning false from the function dealing with the mouse up and
cancelling the event with
if (e.stopPropagation)...
| |
by: Techsatish |
last post by:
how to make a mouseup event called only once during a double click
event?
here double click is made on a tree node in a tree control.
I have the code inside mouseup event....in runtime the mouseup is
called twice for the mouse double click over the selected tree node.
I want mouseup event to be called onece
Any ideas?
|
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?
/ ...
|
by: Tom Bean |
last post by:
I am trying to display a ContextMenuStrip when a user right-clicks on an
item in a ListView and have encountered a something that seems strange to
me.
When the ListView is initially populated, no items are selected. When the
first item is selected by clicking either the left or right button, the
SelectedIndexChanged event fires but not the MouseUp event. After the first
item is selected and another item clicked on, both the...
|
by: markszlazak |
last post by:
In the following script, a control displays (black box) in each table
cell once you mouse over the cell. Mouse down on the control to change
the mode of the table. Drag the mouse over cells in the same column
then mouseup anywhere in a cell. The mouseup event sometimres fires
before the selection of table cells by dragging is complete. It's
important that I stop these "false" mouseup's from firing or
distinguish them from when I let go of...
|
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,...
|
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...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |