Hello, I'm making a program creator...
I have a toolbox that adds a button and it's event...etc. to a panel called thepanel.
How do I get the code of thepanel to compile it again to create another executable that have thepanel as the form.
I know how to compile it but I just need the code of thepanel...

If i understood correctly you want your form covered with another panel? If so then just make a new location for panel2
for example:

panel2.Location = new Point(0, 0);

Adjust your coordinates.

Nope.
For example I have a button named B1 in thepanel and when I click it it changes the Text of TextBox1 to "Changed". So I want it to generate the following code:

TextBox TextBox1 = new TextBox();
TextBox1.Text="";
TextBox1.Height=50;
TextBox1.Width=50;
//then the location, Font...etc.
Button B1 = new Button();
B1.Width=50; //for example
B1.Height=20;
B1.Click+=delegate{TextBox1.Text="Changed"};

(like decompiling an executable, but only panel)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.