473,604 Members | 2,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simulate DesignMode and Prevent Mouse Clicks from Having an Effect

I have a user control which can be dragged and dropped onto a form in my
application when it is running. I draw a selection border around my control,
and allow it to be dragged to a new location on the form. However, the user
control has a check box on it, and if the user clicks over the checkbox to
drag the control, the check box changes state.

Is there a way that I can simulate the design mode effect of the VS IDE,
such that whilst designing a form controls do not behave in the normal way?
The same problem occurs if clicking over a dropdown list: the list drops
down and then the control can be dragged away from under it. It doesn't look
very good.

TIA

Charles
Nov 20 '05 #1
0 1281

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

Similar topics

5
6215
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,...
1
1883
by: charliewest | last post by:
I am trying use server controls or web controls to simulate the following behavior. I've an image wrapped w/in a link to create a rollover effect as if both elements we're one graphic: <a href="javascript:submit();" onMouseOver="MM_swapImage('Image1221','','images/btn_green_on.gif',1)" onMouseOut="MM_swapImgRestore()" id="A1" runat="server"> Next <img src="images/btn_green.gif" alt="Next" name="Image1221" width="16" height="16"...
0
259
by: Charles Law | last post by:
I have a user control which can be dragged and dropped onto a form in my application when it is running. I draw a selection border around my control, and allow it to be dragged to a new location on the form. However, the user control has a check box on it, and if the user clicks over the checkbox to drag the control, the check box changes state. Is there a way that I can simulate the design mode effect of the VS IDE, such that whilst...
2
15437
by: bretth | last post by:
In a VB.Net Windows Forms application, I have a user control that handles mouse events. Another section of code programmatically adds a label to the control. I would like label to ignore all events allowing the user control to react to the mouse click. Setting the Enabled property on the label to False comes close, but I don't want the font color to change. Does anyone have an idea how .NET implements the code behind the Enabled...
3
2286
by: Ryan Liu | last post by:
Can someone give a sample to prevent a row from being deleted in a datatable? I tried e.Row.RejectChanges(); in dt_RowDeleting() but seems does not work. I need verify if there other data using data in this row before actually remove it from datagrid. I can certainly control with Delete button. But if I want to allow the user to use Del key on the keyboard, I lost this kind control.
18
22077
by: eliss.carmine | last post by:
Is it possible to simulate a mouse click in the window I made (it's a Form), but not give it focus? I tried using WinAPI's mouseevent and SendMessage of WM_LBUTTONDOWN/WM_LBUTTONUP as suggested by the folks in #winapi on EFnet, but I think those require the window to have focus. Either that, or I'm doing something else wrong. The click actually seems to work once, and then stops working... I have no idea what is the problem actually....
5
9988
by: Vincent | last post by:
I have a bound listbox control on one of my forms that has an associated afterupdate event. When this event is invoked, I lock the control to prevent the user from clicking on it more than once. However, it appears that Access is queuing the mouse clicks and calling the afterupdate event regardless of whether the control is locked or not. If I click the mouse quickly, Access generates the following error message: "The macro or function...
5
30593
by: nuhfeken | last post by:
We have a C# winform that uses the MVP design pattern for the user interface. For reasons I'd rather not explain we need to simulate a right mouse click on a specific control to deactivate the control. I found code that almost does what we need. private static extern void mouse_event( UInt32 dwFlags, // motion and click options UInt32 dx, // horizontal position or change UInt32 dy, //...
3
8407
by: =?Utf-8?B?cHJvZ2dlcg==?= | last post by:
I have a C# application that hosts an AxWebBrowser control which I automate by sending mouse clicks and keyboard input. I have had various problems in doing this due to a bug in the AxWebBrowser receiving input when it is hosting a flash page however I have got it to work using SendKeys for the keyboard input and the Windows API SendInput function for the mouse clicks (along with Cursor.Position) however I'd like to do this in the...
0
7997
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
7929
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
8419
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...
0
8409
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 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...
0
8280
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
6739
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
5441
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
3907
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
2434
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 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.