Pracuję z VS2008. Chcę po wciśnięciu buttona wyświetlić nowego forma już zmodyfikowanego. taki mam kod do przycisku:
private void nowa_Click(object sender, EventArgs e)
{
CustomForm nowa_gra = new CustomForm();
nowa_gra.Show();
}
a taki do forma:
public partial class CustomForm : Form
{
private Button button1;
public CustomForm()
{
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.button1.Location = new System.Drawing.Point(315, 384);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(153, 61);
this.button1.TabIndex = 0;
this.button1.Text = "Powrót";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// CustomForm
//
this.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ClientSize = new System.Drawing.Size(741, 482);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "CustomForm";
this.TopMost = true;
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.ResumeLayout(false);
}
nowe okienko otwiera sie jednak bez wprowadzonych zmian we wyglądzie. Czy potrafiłby mi ktoś doradzić jak to zmienić?
Mam jeszcze jedno pytanie. Chciałabym żeby po wciśnięciu buttona otworzył mi się i wyświetlił plik pdf i nie wiem jak to zrobić;/