Article View: alt.pl.comp.lang.csharp
Article #831Re: Inherited Form
From: Selvin
Date: Tue, 06 Apr 2004 18:15
Date: Tue, 06 Apr 2004 18:15
97 lines
3255 bytes
3255 bytes
> Czyli odpowiednik Frame z Delphi :)
nie wiem Pascala(fe) omija duuuuuuzym lukiem :P
using System.Windows.Forms;
namespace a
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
this.button1.Location = new System.Drawing.Point(112, 24);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(96, 48);
this.button1.TabIndex = 0;
this.button1.Text = "button1";
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
}
}
using System.Windows.Forms;
namespace a
{
public class Form2 : a.Form1
{
private System.Windows.Forms.TextBox textBox1;
private System.ComponentModel.IContainer components = null;
public Form2()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
this.textBox1.Location = new System.Drawing.Point(64, 112);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(136, 20);
this.textBox1.TabIndex = 1;
this.textBox1.Text = "textBox1";
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.Add(this.textBox1);
this.Name = "Form2";
this.Controls.SetChildIndex(this.textBox1, 0);
this.ResumeLayout(false);
}
}
}
na Form2 mamy buttona z Form1 i wlasnego textboxa
pozdrawiam
Przemek Sulikowski
Technical Details
Message-ID:
<c4us0s$joa$1@news.onet.pl>Path:
mbox-mo1.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!nntp.idg.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mailReferences:
<c4uoq3$9v3$1@news.onet.pl> <c4uq8l$e8p$1@news.onet.pl> <c4ur73$h32$1@news.onet.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!nntp.idg.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mail From: "Selvin" <selvin...@nospam_osadkowski.com.pl> Newsgroups: alt.pl.comp.lang.csharp Subject: Re: Inherited Form Date: Tue, 6 Apr 2004 20:15:37 +0200 Organization: news.onet.pl Lines: 99 Sender: selvin@poczta.onet.pl@217.97.163.80 Message-ID: <c4us0s$joa$1@news.onet.pl> References: <c4uoq3$9v3$1@news.onet.pl> <c4uq8l$e8p$1@news.onet.pl> <c4ur73$h32$1@news.onet.pl> NNTP-Posting-Host: 217.97.163.80 X-Trace: news.onet.pl 1081275228 20234 217.97.163.80 (6 Apr 2004 18:13:48 GMT) X-Complaints-To: ab...@onet.pl NNTP-Posting-Date: 6 Apr 2004 18:13:48 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit