PC Review


Reply
Thread Tools Rate Thread

After copying and pasting controls, compiling app removes them

 
 
Ryan Taylor
Guest
Posts: n/a
 
      4th Mar 2005
Urghhhh. I am having a hard time with Visual Studio .NET 2003. I am
developing a WindowForms application in C#. I had a Form that with a few
controls on it (a left docked panel with 4 top docked buttons with images).
I selected the panel, cut and pasted it into a usercontrol I was building.
It looked fine and docked fine. I then added some panels left docked and top
docked just to make some gutter space. I had to change the order in which
they were added to make then dock the way I wanted. Now whenever I compile
the application the buttons are removed from the designer, yet the button
declarations still exist. So I remove the declarations, re-create the
buttons and compile. Same thing. What is going on here?

Thanks in advance.
Ryan "Frustrated" Taylor


 
Reply With Quote
 
 
 
 
Ryan Taylor
Guest
Posts: n/a
 
      4th Mar 2005
Some additional information. This is how my button code is declared by the
designer. Interestingly enough, the btnDatabase does not get removed on
compile but the btnBins does.

private System.Windows.Forms.Button btnBins;

private void InitializeComponent()
{
// ... some other controls
this.btnBins = new System.Windows.Forms.Button();

//
// pnlBins
//
this.pnlBins.Controls.Add(this.binConfig);
this.pnlBins.Location = new System.Drawing.Point(464, 104);
this.pnlBins.Name = "pnlBins";
this.pnlBins.Size = new System.Drawing.Size(288, 296);
this.pnlBins.TabIndex = 5;
this.pnlBins.Visible = false;

//
// pnlToolbar
//
this.pnlToolbar.BackColor = System.Drawing.SystemColors.Control;
this.pnlToolbar.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.pnlToolbar.Controls.Add(this.btnBins);
this.pnlToolbar.Controls.Add(this.btnDatabase);
this.pnlToolbar.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlToolbar.Location = new System.Drawing.Point(0, 37);
this.pnlToolbar.Name = "pnlToolbar";
this.pnlToolbar.Size = new System.Drawing.Size(84, 699);
this.pnlToolbar.TabIndex = 9;
}

"Ryan Taylor" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Urghhhh. I am having a hard time with Visual Studio .NET 2003. I am
> developing a WindowForms application in C#. I had a Form that with a few
> controls on it (a left docked panel with 4 top docked buttons with

images).
> I selected the panel, cut and pasted it into a usercontrol I was building.
> It looked fine and docked fine. I then added some panels left docked and

top
> docked just to make some gutter space. I had to change the order in which
> they were added to make then dock the way I wanted. Now whenever I compile
> the application the buttons are removed from the designer, yet the button
> declarations still exist. So I remove the declarations, re-create the
> buttons and compile. Same thing. What is going on here?
>
> Thanks in advance.
> Ryan "Frustrated" Taylor
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem copying and pasting controls =?Utf-8?B?Q1c=?= Microsoft Access Forms 3 18th Sep 2006 11:05 PM
Pasting removes header =?Utf-8?B?c2hlcA==?= Microsoft Word Document Management 1 29th Aug 2006 07:19 PM
Pasting/Compiling Data To The End Of A File =?Utf-8?B?TVdT?= Microsoft Excel Programming 1 1st Feb 2006 01:19 PM
Controls Cut Paste removes Event Handlers rawCoder Microsoft VB .NET 2 30th Aug 2004 05:18 PM
Controls Cut Paste removes Event Handlers rawCoder Microsoft C# .NET 2 30th Aug 2004 05:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:36 AM.