473,624 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VS Unwire Bug

Hi guys,

This is probably old, but it is getting on my nerves.

When you cut and paste an object graphically while using the Visual Studio
Editor (say for example, a button), all the methods get disconnected or
unwired from their respective handlers (code). for the button for example,
if I have placed code on the click event and I cut and paste the button, the
next time I double click on it, it creates another subroutine in the form
Button_Click_1, and it wires to this one, so I end up deleting the old one,
copying the content, reclicking on the button and pasting the content again.
This might not be a big deal with a button, but when you have a bunch of
controls and you want to say put them into a panel or something and you cut
and paste, you have to go and wire everything manually again!

Is there a fix or a way to get around this???

Thank you in advance.
Nov 20 '05 #1
4 995
Drives me mental too, especially If I've got dozens of handlers and then I
decide to put them in a group box, I end up spending the next hour picking
all the code out and replacing it.

Merlin.
"Juan Romero" <ju*********@bo wne.com> wrote in message
news:uW******** ******@TK2MSFTN GP09.phx.gbl...
Hi guys,

This is probably old, but it is getting on my nerves.

When you cut and paste an object graphically while using the Visual Studio
Editor (say for example, a button), all the methods get disconnected or
unwired from their respective handlers (code). for the button for example,
if I have placed code on the click event and I cut and paste the button, the next time I double click on it, it creates another subroutine in the form
Button_Click_1, and it wires to this one, so I end up deleting the old one, copying the content, reclicking on the button and pasting the content again. This might not be a big deal with a button, but when you have a bunch of
controls and you want to say put them into a panel or something and you cut and paste, you have to go and wire everything manually again!

Is there a fix or a way to get around this???

Thank you in advance.

Nov 20 '05 #2
It's good to know I am not alone..... he he
This is a major issue. They should really fix this ASAP.
Otherwise, we can start calling it RCPD (Rapid Copy and Paste Development)
rathen than RAD.
"Merlin" <iM*****@hotmai l.com> wrote in message
news:c0******** **@hercules.bti nternet.com...
Drives me mental too, especially If I've got dozens of handlers and then I
decide to put them in a group box, I end up spending the next hour picking
all the code out and replacing it.

Merlin.
"Juan Romero" <ju*********@bo wne.com> wrote in message
news:uW******** ******@TK2MSFTN GP09.phx.gbl...
Hi guys,

This is probably old, but it is getting on my nerves.

When you cut and paste an object graphically while using the Visual Studio Editor (say for example, a button), all the methods get disconnected or
unwired from their respective handlers (code). for the button for example, if I have placed code on the click event and I cut and paste the button,

the
next time I double click on it, it creates another subroutine in the form Button_Click_1, and it wires to this one, so I end up deleting the old

one,
copying the content, reclicking on the button and pasting the content

again.
This might not be a big deal with a button, but when you have a bunch of
controls and you want to say put them into a panel or something and you

cut
and paste, you have to go and wire everything manually again!

Is there a fix or a way to get around this???

Thank you in advance.


Nov 20 '05 #3
On Thu, 12 Feb 2004 16:28:34 +0000 (UTC), Merlin wrote:
Drives me mental too, especially If I've got dozens of handlers and then I
decide to put them in a group box, I end up spending the next hour picking
all the code out and replacing it.

This might not be a big deal with a button, but when you have a bunch of
controls and you want to say put them into a panel or something and you


Just a dumb question, but when moving a control (say a group of buttons)
into a panel or group box, why not just drag them there? Cut and Paste may
unwire the handlers, but dragging the buttons (or whatever) does not.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #4
Yes, but lets say that you have placed a groupbox on the form, then you put
a panel with a number of controls. You can drag stuff here and there, and
dock the panel and the groupbox. But then you decide you want to have a
status bar on your form.... simple right? just add the control. Well, you
add the status bar and... ouch, the panel is actually docking at the bottom
and your status bar is not! (ever experienced that?). In order for things to
dock properly, you have to cut everything else out of the form and then
paste it again. This behavior is due to the zorder of controls on the form,
so you have no choice, either you decide what you want to have on your form
before hand, or start copying and pasting.....

By the way, I don't recall the VB6 code window object having these
problems...

"Chris Dunaway" <dunawayc@_lunc hmeat_sbcglobal .net> wrote in message
news:1t******** *************** ********@40tude .net...
On Thu, 12 Feb 2004 16:28:34 +0000 (UTC), Merlin wrote:
Drives me mental too, especially If I've got dozens of handlers and then I
decide to put them in a group box, I end up spending the next hour picking all the code out and replacing it.
This might not be a big deal with a button, but when you have a bunch of controls and you want to say put them into a panel or something and you


Just a dumb question, but when moving a control (say a group of buttons)
into a panel or group box, why not just drag them there? Cut and Paste

may unwire the handlers, but dragging the buttons (or whatever) does not.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.

Nov 20 '05 #5

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

Similar topics

0
994
by: joe mamma | last post by:
I know it works for basic widows form components. . . Similar approach can be applied for other controls if this doesn't work . . . Typical Usage: ============================= ArrayList eventData = new ArrayList(); EventDescriptorCollection events = TypeDescriptor.GetEvents(myComponent); foreach (System.ComponentModel.EventDescriptor myEvent in events) { //Unwire the events
1
2588
by: Soul | last post by:
*** I am not sure this question belong to *.languages.csharp or *.framework.windowsdorms.databinding, so I post to both *** Hi, Currently I have a DataGrid which bind to a DataSet. One of the column in the DataSet table consist of DateTime value. I also have two DateTimePicker (startDate and endDate) on my Windows form.
2
1316
by: Barry Mossman | last post by:
Hi, What is required to unwire an event ? I wire it with: this.MyEvent += new MyEventHandler() Do I need to maintain a handle to the eventhandler created so that I can detach it ? The following seems to work, but it doesn't feel right as I seem to be adding one object, but then removing another:
1
55822
by: MuZZy | last post by:
Hi, Is there a way to remove all event handlers for a control's event? Say, i have a button and i want to remove all button.Click events for it - i don't know how many of them was hooked to the event and what are the functions hooked, but i need to make sure that i unwired all of them at once. I could unwire event handlers if i knew the functions: button.Click += new EventHandler(OnMyBtnClick); // Wire event handler ....
132
5688
by: Kevin | last post by:
I don't know if I should even start this topic but here goes. I'm an ex vb6 developer, now developing in C#. The reason why I started developing in C# is because the company that I worked for at the time standarised on C#. Many of my friends working in previous companies that I worked for are starting to move back to VB.Net. When I asked them why, it seems that the next release of VB.Net seems very promising and they kinda see...
7
14142
by: Doru Roman | last post by:
Hi, What is the fastest way to evaluate manually the result in this case: int a, b, c; a = 255; b = 122; c = a & b; The only way I know is transforming each number into the binary value and
1
1733
by: CB | last post by:
When designing an object, is there a best practice for how to allow the user of the object to tell the object to remove itself from any delegates / events it has registered with? For example.. say we have a static settings class, and it has some OnChange event. The object I am writing will add a method to the settings OnChange event in its constructor. Obviously, at some point, the method needs to be removed from the event so the new...
37
1597
by: Peter | last post by:
I am wondering if I should turn to C# from VB. How long will this turning cost for an ordinary man? Thanks for any response, Peter
4
2038
by: Joergen Bech | last post by:
I sometimes use delegates for broadcasting "StateChanged" events, i.e. if I have multiple forms and/or controls that need updating at the same time as the result of a change in a global/common object, I keep local references to this object in each UI object, e.g. Private WithEvents _tools As RepeatTools and catch messages in an event handler like this:
0
8231
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
8672
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
8330
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
7153
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
5561
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
4075
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...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2603
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
1474
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.