473,763 Members | 10,253 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Button Text Not Changed Problem

Hi to everybody,

I have chnged a button text in design mode. But After compiling and
executing the program
the text of the button do not change to new value.

Any Ideas?

Thaks for helps.

Arif Çimen
Nov 17 '05 #1
4 2629
Hi Arif, Could you post some code?...

Josema.

"Arif Çimen" wrote:
Hi to everybody,

I have chnged a button text in design mode. But After compiling and
executing the program
the text of the button do not change to new value.

Any Ideas?

Thaks for helps.

Arif Çimen

Nov 17 '05 #2
Here My Codes:



using System;

using System.Drawing;

using System.Collecti ons;

using System.Componen tModel;

using System.Windows. Forms;

using System.Data;

namespace Cosmo

{

/// <summary>

/// Summary description for Form1.

/// </summary>

public class Form1 : System.Windows. Forms.Form

{

public TicketPartSelec tionForm tpsF;

public TicketsDatabase Form tdF;

public TicketPrintingF orm tpF;

public AboutBoxForm abF;

public CustomerInfoSel ectionForm cisF;

public CustomerTravelP rocesses ctP;

public Biletler bltler;

private System.Windows. Forms.Label label1;

private System.Windows. Forms.Button button1;

private System.Windows. Forms.Button button4;

private System.Windows. Forms.Button button5;

private System.Windows. Forms.Button button6;

private System.Windows. Forms.Label label2;

private System.Windows. Forms.Button button7;

private System.Windows. Forms.Button button2;

private System.Windows. Forms.Button button3;

/// <summary>

/// Required designer variable.

/// </summary>

private System.Componen tModel.Containe r components = null;

public Form1()

{

//

// Required for Windows Form Designer support

//

InitializeCompo nent();

//

// TODO: Add any constructor code after InitializeCompo nent call

//

button2.Text="R ezervasyon";

button5.Visible =false;

button4.Visible =false;

}

/// <summary>

/// Clean up any resources being used.

/// </summary>

protected override void Dispose( bool disposing )

{

if( disposing )

{

if (components != null)

{

components.Disp ose();

}

}

base.Dispose( disposing );

}

#region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeCompo nent()

{

System.Resource s.ResourceManag er resources = new
System.Resource s.ResourceManag er(typeof(Form1 ));

this.label1 = new System.Windows. Forms.Label();

this.button1 = new System.Windows. Forms.Button();

this.button4 = new System.Windows. Forms.Button();

this.button5 = new System.Windows. Forms.Button();

this.button6 = new System.Windows. Forms.Button();

this.label2 = new System.Windows. Forms.Label();

this.button7 = new System.Windows. Forms.Button();

this.button2 = new System.Windows. Forms.Button();

this.button3 = new System.Windows. Forms.Button();

this.SuspendLay out();

//

// label1

//

this.label1.Acc essibleDescript ion =
resources.GetSt ring("label1.Ac cessibleDescrip tion");

this.label1.Acc essibleName = resources.GetSt ring("label1.Ac cessibleName");

this.label1.Anc hor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("la bel1.Anchor"))) ;

this.label1.Aut oSize = ((bool)(resourc es.GetObject("l abel1.AutoSize" )));

this.label1.Bac kColor = System.Drawing. Color.RosyBrown ;

this.label1.Doc k =
((System.Window s.Forms.DockSty le)(resources.G etObject("label 1.Dock")));

this.label1.Ena bled = ((bool)(resourc es.GetObject("l abel1.Enabled") ));

this.label1.Fon t =
((System.Drawin g.Font)(resourc es.GetObject("l abel1.Font")));

this.label1.For eColor = System.Drawing. Color.Yellow;

this.label1.Ima ge =
((System.Drawin g.Image)(resour ces.GetObject(" label1.Image")) );

this.label1.Ima geAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("labe l1.ImageAlign") ));

this.label1.Ima geIndex = ((int)(resource s.GetObject("la bel1.ImageIndex ")));

this.label1.Ime Mode =
((System.Window s.Forms.ImeMode )(resources.Get Object("label1. ImeMode")));

this.label1.Loc ation =
((System.Drawin g.Point)(resour ces.GetObject(" label1.Location ")));

this.label1.Nam e = "label1";

this.label1.Rig htToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("lab el1.RightToLeft ")));

this.label1.Siz e =
((System.Drawin g.Size)(resourc es.GetObject("l abel1.Size")));

this.label1.Tab Index = ((int)(resource s.GetObject("la bel1.TabIndex") ));

this.label1.Tex t = resources.GetSt ring("label1.Te xt");

this.label1.Tex tAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("labe l1.TextAlign")) );

this.label1.Vis ible = ((bool)(resourc es.GetObject("l abel1.Visible") ));

//

// button1

//

this.button1.Ac cessibleDescrip tion =
resources.GetSt ring("button1.A ccessibleDescri ption");

this.button1.Ac cessibleName = resources.GetSt ring("button1.A ccessibleName") ;

this.button1.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton1.Anchor")) );

this.button1.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button1.Backgro undImage")));

this.button1.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n1.Dock")));

this.button1.En abled = ((bool)(resourc es.GetObject("b utton1.Enabled" )));

this.button1.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n1.FlatStyle")) );

this.button1.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton1.Font"))) ;

this.button1.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button1.Image") ));

this.button1.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on1.ImageAlign" )));

this.button1.Im ageIndex =
((int)(resource s.GetObject("bu tton1.ImageInde x")));

this.button1.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button1 .ImeMode")));

this.button1.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button1.Locatio n")));

this.button1.Na me = "button1";

this.button1.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton1.RightToLef t")));

this.button1.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton1.Size"))) ;

this.button1.Ta bIndex = ((int)(resource s.GetObject("bu tton1.TabIndex" )));

this.button1.Te xt = resources.GetSt ring("button1.T ext");

this.button1.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on1.TextAlign") ));

this.button1.Vi sible = ((bool)(resourc es.GetObject("b utton1.Visible" )));

this.button1.Cl ick += new System.EventHan dler(this.butto n1_Click);

//

// button4

//

this.button4.Ac cessibleDescrip tion =
resources.GetSt ring("button4.A ccessibleDescri ption");

this.button4.Ac cessibleName = resources.GetSt ring("button4.A ccessibleName") ;

this.button4.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton4.Anchor")) );

this.button4.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button4.Backgro undImage")));

this.button4.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n4.Dock")));

this.button4.En abled = ((bool)(resourc es.GetObject("b utton4.Enabled" )));

this.button4.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n4.FlatStyle")) );

this.button4.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton4.Font"))) ;

this.button4.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button4.Image") ));

this.button4.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on4.ImageAlign" )));

this.button4.Im ageIndex =
((int)(resource s.GetObject("bu tton4.ImageInde x")));

this.button4.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button4 .ImeMode")));

this.button4.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button4.Locatio n")));

this.button4.Na me = "button4";

this.button4.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton4.RightToLef t")));

this.button4.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton4.Size"))) ;

this.button4.Ta bIndex = ((int)(resource s.GetObject("bu tton4.TabIndex" )));

this.button4.Te xt = resources.GetSt ring("button4.T ext");

this.button4.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on4.TextAlign") ));

this.button4.Vi sible = ((bool)(resourc es.GetObject("b utton4.Visible" )));

this.button4.Cl ick += new System.EventHan dler(this.butto n4_Click);

//

// button5

//

this.button5.Ac cessibleDescrip tion =
resources.GetSt ring("button5.A ccessibleDescri ption");

this.button5.Ac cessibleName = resources.GetSt ring("button5.A ccessibleName") ;

this.button5.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton5.Anchor")) );

this.button5.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button5.Backgro undImage")));

this.button5.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n5.Dock")));

this.button5.En abled = ((bool)(resourc es.GetObject("b utton5.Enabled" )));

this.button5.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n5.FlatStyle")) );

this.button5.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton5.Font"))) ;

this.button5.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button5.Image") ));

this.button5.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on5.ImageAlign" )));

this.button5.Im ageIndex =
((int)(resource s.GetObject("bu tton5.ImageInde x")));

this.button5.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button5 .ImeMode")));

this.button5.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button5.Locatio n")));

this.button5.Na me = "button5";

this.button5.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton5.RightToLef t")));

this.button5.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton5.Size"))) ;

this.button5.Ta bIndex = ((int)(resource s.GetObject("bu tton5.TabIndex" )));

this.button5.Te xt = resources.GetSt ring("button5.T ext");

this.button5.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on5.TextAlign") ));

this.button5.Vi sible = ((bool)(resourc es.GetObject("b utton5.Visible" )));

//

// button6

//

this.button6.Ac cessibleDescrip tion =
resources.GetSt ring("button6.A ccessibleDescri ption");

this.button6.Ac cessibleName = resources.GetSt ring("button6.A ccessibleName") ;

this.button6.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton6.Anchor")) );

this.button6.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button6.Backgro undImage")));

this.button6.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n6.Dock")));

this.button6.En abled = ((bool)(resourc es.GetObject("b utton6.Enabled" )));

this.button6.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n6.FlatStyle")) );

this.button6.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton6.Font"))) ;

this.button6.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button6.Image") ));

this.button6.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on6.ImageAlign" )));

this.button6.Im ageIndex =
((int)(resource s.GetObject("bu tton6.ImageInde x")));

this.button6.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button6 .ImeMode")));

this.button6.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button6.Locatio n")));

this.button6.Na me = "button6";

this.button6.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton6.RightToLef t")));

this.button6.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton6.Size"))) ;

this.button6.Ta bIndex = ((int)(resource s.GetObject("bu tton6.TabIndex" )));

this.button6.Te xt = resources.GetSt ring("button6.T ext");

this.button6.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on6.TextAlign") ));

this.button6.Vi sible = ((bool)(resourc es.GetObject("b utton6.Visible" )));

//

// label2

//

this.label2.Acc essibleDescript ion =
resources.GetSt ring("label2.Ac cessibleDescrip tion");

this.label2.Acc essibleName = resources.GetSt ring("label2.Ac cessibleName");

this.label2.Anc hor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("la bel2.Anchor"))) ;

this.label2.Aut oSize = ((bool)(resourc es.GetObject("l abel2.AutoSize" )));

this.label2.Bac kColor = System.Drawing. Color.RosyBrown ;

this.label2.Doc k =
((System.Window s.Forms.DockSty le)(resources.G etObject("label 2.Dock")));

this.label2.Ena bled = ((bool)(resourc es.GetObject("l abel2.Enabled") ));

this.label2.Fon t =
((System.Drawin g.Font)(resourc es.GetObject("l abel2.Font")));

this.label2.For eColor = System.Drawing. Color.Yellow;

this.label2.Ima ge =
((System.Drawin g.Image)(resour ces.GetObject(" label2.Image")) );

this.label2.Ima geAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("labe l2.ImageAlign") ));

this.label2.Ima geIndex = ((int)(resource s.GetObject("la bel2.ImageIndex ")));

this.label2.Ime Mode =
((System.Window s.Forms.ImeMode )(resources.Get Object("label2. ImeMode")));

this.label2.Loc ation =
((System.Drawin g.Point)(resour ces.GetObject(" label2.Location ")));

this.label2.Nam e = "label2";

this.label2.Rig htToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("lab el2.RightToLeft ")));

this.label2.Siz e =
((System.Drawin g.Size)(resourc es.GetObject("l abel2.Size")));

this.label2.Tab Index = ((int)(resource s.GetObject("la bel2.TabIndex") ));

this.label2.Tex t = resources.GetSt ring("label2.Te xt");

this.label2.Tex tAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("labe l2.TextAlign")) );

this.label2.Vis ible = ((bool)(resourc es.GetObject("l abel2.Visible") ));

//

// button7

//

this.button7.Ac cessibleDescrip tion =
resources.GetSt ring("button7.A ccessibleDescri ption");

this.button7.Ac cessibleName = resources.GetSt ring("button7.A ccessibleName") ;

this.button7.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton7.Anchor")) );

this.button7.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button7.Backgro undImage")));

this.button7.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n7.Dock")));

this.button7.En abled = ((bool)(resourc es.GetObject("b utton7.Enabled" )));

this.button7.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n7.FlatStyle")) );

this.button7.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton7.Font"))) ;

this.button7.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button7.Image") ));

this.button7.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on7.ImageAlign" )));

this.button7.Im ageIndex =
((int)(resource s.GetObject("bu tton7.ImageInde x")));

this.button7.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button7 .ImeMode")));

this.button7.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button7.Locatio n")));

this.button7.Na me = "button7";

this.button7.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton7.RightToLef t")));

this.button7.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton7.Size"))) ;

this.button7.Ta bIndex = ((int)(resource s.GetObject("bu tton7.TabIndex" )));

this.button7.Te xt = resources.GetSt ring("button7.T ext");

this.button7.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on7.TextAlign") ));

this.button7.Vi sible = ((bool)(resourc es.GetObject("b utton7.Visible" )));

//

// button2

//

this.button2.Ac cessibleDescrip tion =
resources.GetSt ring("button2.A ccessibleDescri ption");

this.button2.Ac cessibleName = resources.GetSt ring("button2.A ccessibleName") ;

this.button2.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton2.Anchor")) );

this.button2.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button2.Backgro undImage")));

this.button2.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n2.Dock")));

this.button2.En abled = ((bool)(resourc es.GetObject("b utton2.Enabled" )));

this.button2.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n2.FlatStyle")) );

this.button2.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton2.Font"))) ;

this.button2.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button2.Image") ));

this.button2.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on2.ImageAlign" )));

this.button2.Im ageIndex =
((int)(resource s.GetObject("bu tton2.ImageInde x")));

this.button2.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button2 .ImeMode")));

this.button2.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button2.Locatio n")));

this.button2.Na me = "button2";

this.button2.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton2.RightToLef t")));

this.button2.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton2.Size"))) ;

this.button2.Ta bIndex = ((int)(resource s.GetObject("bu tton2.TabIndex" )));

this.button2.Te xt = resources.GetSt ring("button2.T ext");

this.button2.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on2.TextAlign") ));

this.button2.Vi sible = ((bool)(resourc es.GetObject("b utton2.Visible" )));

this.button2.Cl ick += new System.EventHan dler(this.butto n2_Click_1);

//

// button3

//

this.button3.Ac cessibleDescrip tion =
resources.GetSt ring("button3.A ccessibleDescri ption");

this.button3.Ac cessibleName = resources.GetSt ring("button3.A ccessibleName") ;

this.button3.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton3.Anchor")) );

this.button3.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button3.Backgro undImage")));

this.button3.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n3.Dock")));

this.button3.En abled = ((bool)(resourc es.GetObject("b utton3.Enabled" )));

this.button3.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n3.FlatStyle")) );

this.button3.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton3.Font"))) ;

this.button3.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button3.Image") ));

this.button3.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on3.ImageAlign" )));

this.button3.Im ageIndex =
((int)(resource s.GetObject("bu tton3.ImageInde x")));

this.button3.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button3 .ImeMode")));

this.button3.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button3.Locatio n")));

this.button3.Na me = "button3";

this.button3.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton3.RightToLef t")));

this.button3.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton3.Size"))) ;

this.button3.Ta bIndex = ((int)(resource s.GetObject("bu tton3.TabIndex" )));

this.button3.Te xt = resources.GetSt ring("button3.T ext");

this.button3.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on3.TextAlign") ));

this.button3.Vi sible = ((bool)(resourc es.GetObject("b utton3.Visible" )));

//

// Form1

//

this.Accessible Description =
resources.GetSt ring("$this.Acc essibleDescript ion");

this.Accessible Name = resources.GetSt ring("$this.Acc essibleName");

this.AutoScaleB aseSize =
((System.Drawin g.Size)(resourc es.GetObject("$ this.AutoScaleB aseSize")));

this.AutoScroll = ((bool)(resourc es.GetObject("$ this.AutoScroll ")));

this.AutoScroll Margin =
((System.Drawin g.Size)(resourc es.GetObject("$ this.AutoScroll Margin")));

this.AutoScroll MinSize =
((System.Drawin g.Size)(resourc es.GetObject("$ this.AutoScroll MinSize")));

this.Background Image =
((System.Drawin g.Image)(resour ces.GetObject(" $this.Backgroun dImage")));

this.ClientSize =
((System.Drawin g.Size)(resourc es.GetObject("$ this.ClientSize ")));

this.Controls.A dd(this.button3 );

this.Controls.A dd(this.button2 );

this.Controls.A dd(this.button6 );

this.Controls.A dd(this.button5 );

this.Controls.A dd(this.button4 );

this.Controls.A dd(this.button1 );

this.Controls.A dd(this.label1) ;

this.Controls.A dd(this.label2) ;

this.Controls.A dd(this.button7 );

this.Enabled = ((bool)(resourc es.GetObject("$ this.Enabled")) );

this.Font = ((System.Drawin g.Font)(resourc es.GetObject("$ this.Font")));

this.Icon = ((System.Drawin g.Icon)(resourc es.GetObject("$ this.Icon")));

this.ImeMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("$this.I meMode")));

this.Location =
((System.Drawin g.Point)(resour ces.GetObject(" $this.Location" )));

this.MaximumSiz e =
((System.Drawin g.Size)(resourc es.GetObject("$ this.MaximumSiz e")));

this.MinimumSiz e =
((System.Drawin g.Size)(resourc es.GetObject("$ this.MinimumSiz e")));

this.Name = "Form1";

this.RightToLef t =
((System.Window s.Forms.RightTo Left)(resources .GetObject("$th is.RightToLeft" )));

this.StartPosit ion =
((System.Window s.Forms.FormSta rtPosition)(res ources.GetObjec t("$this.StartP osition")));

this.Text = resources.GetSt ring("$this.Tex t");

this.ResumeLayo ut(false);

}

#endregion

/// <summary>

/// The main entry point for the application.

/// </summary>

[STAThread]

static void Main()

{

Form1 form1=new Form1();

//Application.Run (new Form1());

Application.Run (form1);

}

private void menuItem2_Click (object sender, System.EventArg s e)

{
}

private void button1_Click(o bject sender, System.EventArg s e)

{

tpsF=new TicketPartSelec tionForm();

tpsF.Show();

//bltler=new Biletler();

//bltler.Show();

}

private void button4_Click(o bject sender, System.EventArg s e)

{

//ctP=new CustomerTravelP rocesses();

//ctP.Show();

}

private void button2_Click(o bject sender, System.EventArg s e)

{

//cisF=new CustomerInfoSel ectionForm();

//cisF.Show();

}

private void button8_Click(o bject sender, System.EventArg s e)

{
}

public void OpenTicketDesig n()

{

tpF=new TicketPrintingF orm();

tdF=new TicketsDatabase Form();

tpF.label1.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["Airline
Data"].ColumnName;

tpF.label2.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["AllowA"].ColumnName;

tpF.label3.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["AllowB"].ColumnName;

tpF.label4.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["Baggage
Chk/UnChkA1"].ColumnName;

tpF.label5.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["Baggage
Chk/UnChkA2"].ColumnName;

tpF.label6.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["Baggage
Chk/UnChkB1"].ColumnName;

tpF.label7.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["Baggage
Chk/UnChkB2"].ColumnName;

tpF.label8.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["CarierA"].ColumnName;

tpF.label9.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["Carrier1"].ColumnName;

tpF.label10.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Carrier2"].ColumnName;

tpF.label11.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Carrier3"].ColumnName;

tpF.label12.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Carrier4"].ColumnName;

tpF.label13.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["CarrierB"].ColumnName;

tpF.label14.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["ClassA"].ColumnName;

tpF.label15.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["ClassB"].ColumnName;

tpF.label16.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Date
And Place Of Issue"].ColumnName;

tpF.label17.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["DateA"].ColumnName;

tpF.label18.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["DateB"].ColumnName;

tpF.label19.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Destinatio n"].ColumnName;

tpF.label20.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Fare"].ColumnName;

tpF.label21.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Fare
BasisA"].ColumnName;

tpF.label22.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Fare
BasisB"].ColumnName;

tpF.label23.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Form Of
Payment"].ColumnName;

tpF.label24.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["From"].ColumnName;

tpF.label25.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Location1"].ColumnName;

tpF.label26.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Location2"].ColumnName;

tpF.label27.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Location3"].ColumnName;

tpF.label28.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Location4"].ColumnName;

tpF.label29.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Mr/Mrs"].ColumnName;

tpF.label30.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Name"].ColumnName;

tpF.label31.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Not
Valid AfterA"].ColumnName;

tpF.label32.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Not
Valid AfterB"].ColumnName;

tpF.label33.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Not
Valid BeforeA"].ColumnName;

tpF.label34.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Not
Valid BeforeB"].ColumnName;

tpF.label35.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Passport
Number"].ColumnName;

tpF.label36.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["StatusA"].ColumnName;

tpF.label37.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["StatusB"].ColumnName;

tpF.label38.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Surname"].ColumnName;

tpF.label39.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["TimeA"].ColumnName;

tpF.label40.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["TimeB"].ColumnName;

tpF.label41.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["To"].ColumnName;

tpF.label42.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["To1"].ColumnName;

tpF.label43.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Total"].ColumnName;

//tpF.label44.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns[43].ColumnName;

//tpF.label45.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns[44].ColumnName;

//tpF.label46.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns[45].ColumnName;

//tpF.label1.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns[46].ColumnName;

tpF.Show();

}

private void button9_Click(o bject sender, System.EventArg s e)

{

//OpenTicketDesig n();

}

private void button10_Click( object sender, System.EventArg s e)

{
}

private void button2_Click_1 (object sender, System.EventArg s e)

{

RezervationForm rF=new RezervationForm ();

rF.Show();

}

private void button3_Click(o bject sender, System.EventArg s e)

{
}

}

}
Nov 17 '05 #3
Try dont change in design mode the text property, and put in the codebehind
when you Initialize the component:

this.Button.Tex t="Hello World";

"Arif Çimen" wrote:
Here My Codes:



using System;

using System.Drawing;

using System.Collecti ons;

using System.Componen tModel;

using System.Windows. Forms;

using System.Data;

namespace Cosmo

{

/// <summary>

/// Summary description for Form1.

/// </summary>

public class Form1 : System.Windows. Forms.Form

{

public TicketPartSelec tionForm tpsF;

public TicketsDatabase Form tdF;

public TicketPrintingF orm tpF;

public AboutBoxForm abF;

public CustomerInfoSel ectionForm cisF;

public CustomerTravelP rocesses ctP;

public Biletler bltler;

private System.Windows. Forms.Label label1;

private System.Windows. Forms.Button button1;

private System.Windows. Forms.Button button4;

private System.Windows. Forms.Button button5;

private System.Windows. Forms.Button button6;

private System.Windows. Forms.Label label2;

private System.Windows. Forms.Button button7;

private System.Windows. Forms.Button button2;

private System.Windows. Forms.Button button3;

/// <summary>

/// Required designer variable.

/// </summary>

private System.Componen tModel.Containe r components = null;

public Form1()

{

//

// Required for Windows Form Designer support

//

InitializeCompo nent();

//

// TODO: Add any constructor code after InitializeCompo nent call

//

button2.Text="R ezervasyon";

button5.Visible =false;

button4.Visible =false;

}

/// <summary>

/// Clean up any resources being used.

/// </summary>

protected override void Dispose( bool disposing )

{

if( disposing )

{

if (components != null)

{

components.Disp ose();

}

}

base.Dispose( disposing );

}

#region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeCompo nent()

{

System.Resource s.ResourceManag er resources = new
System.Resource s.ResourceManag er(typeof(Form1 ));

this.label1 = new System.Windows. Forms.Label();

this.button1 = new System.Windows. Forms.Button();

this.button4 = new System.Windows. Forms.Button();

this.button5 = new System.Windows. Forms.Button();

this.button6 = new System.Windows. Forms.Button();

this.label2 = new System.Windows. Forms.Label();

this.button7 = new System.Windows. Forms.Button();

this.button2 = new System.Windows. Forms.Button();

this.button3 = new System.Windows. Forms.Button();

this.SuspendLay out();

//

// label1

//

this.label1.Acc essibleDescript ion =
resources.GetSt ring("label1.Ac cessibleDescrip tion");

this.label1.Acc essibleName = resources.GetSt ring("label1.Ac cessibleName");

this.label1.Anc hor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("la bel1.Anchor"))) ;

this.label1.Aut oSize = ((bool)(resourc es.GetObject("l abel1.AutoSize" )));

this.label1.Bac kColor = System.Drawing. Color.RosyBrown ;

this.label1.Doc k =
((System.Window s.Forms.DockSty le)(resources.G etObject("label 1.Dock")));

this.label1.Ena bled = ((bool)(resourc es.GetObject("l abel1.Enabled") ));

this.label1.Fon t =
((System.Drawin g.Font)(resourc es.GetObject("l abel1.Font")));

this.label1.For eColor = System.Drawing. Color.Yellow;

this.label1.Ima ge =
((System.Drawin g.Image)(resour ces.GetObject(" label1.Image")) );

this.label1.Ima geAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("labe l1.ImageAlign") ));

this.label1.Ima geIndex = ((int)(resource s.GetObject("la bel1.ImageIndex ")));

this.label1.Ime Mode =
((System.Window s.Forms.ImeMode )(resources.Get Object("label1. ImeMode")));

this.label1.Loc ation =
((System.Drawin g.Point)(resour ces.GetObject(" label1.Location ")));

this.label1.Nam e = "label1";

this.label1.Rig htToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("lab el1.RightToLeft ")));

this.label1.Siz e =
((System.Drawin g.Size)(resourc es.GetObject("l abel1.Size")));

this.label1.Tab Index = ((int)(resource s.GetObject("la bel1.TabIndex") ));

this.label1.Tex t = resources.GetSt ring("label1.Te xt");

this.label1.Tex tAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("labe l1.TextAlign")) );

this.label1.Vis ible = ((bool)(resourc es.GetObject("l abel1.Visible") ));

//

// button1

//

this.button1.Ac cessibleDescrip tion =
resources.GetSt ring("button1.A ccessibleDescri ption");

this.button1.Ac cessibleName = resources.GetSt ring("button1.A ccessibleName") ;

this.button1.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton1.Anchor")) );

this.button1.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button1.Backgro undImage")));

this.button1.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n1.Dock")));

this.button1.En abled = ((bool)(resourc es.GetObject("b utton1.Enabled" )));

this.button1.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n1.FlatStyle")) );

this.button1.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton1.Font"))) ;

this.button1.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button1.Image") ));

this.button1.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on1.ImageAlign" )));

this.button1.Im ageIndex =
((int)(resource s.GetObject("bu tton1.ImageInde x")));

this.button1.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button1 .ImeMode")));

this.button1.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button1.Locatio n")));

this.button1.Na me = "button1";

this.button1.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton1.RightToLef t")));

this.button1.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton1.Size"))) ;

this.button1.Ta bIndex = ((int)(resource s.GetObject("bu tton1.TabIndex" )));

this.button1.Te xt = resources.GetSt ring("button1.T ext");

this.button1.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on1.TextAlign") ));

this.button1.Vi sible = ((bool)(resourc es.GetObject("b utton1.Visible" )));

this.button1.Cl ick += new System.EventHan dler(this.butto n1_Click);

//

// button4

//

this.button4.Ac cessibleDescrip tion =
resources.GetSt ring("button4.A ccessibleDescri ption");

this.button4.Ac cessibleName = resources.GetSt ring("button4.A ccessibleName") ;

this.button4.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton4.Anchor")) );

this.button4.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button4.Backgro undImage")));

this.button4.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n4.Dock")));

this.button4.En abled = ((bool)(resourc es.GetObject("b utton4.Enabled" )));

this.button4.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n4.FlatStyle")) );

this.button4.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton4.Font"))) ;

this.button4.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button4.Image") ));

this.button4.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on4.ImageAlign" )));

this.button4.Im ageIndex =
((int)(resource s.GetObject("bu tton4.ImageInde x")));

this.button4.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button4 .ImeMode")));

this.button4.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button4.Locatio n")));

this.button4.Na me = "button4";

this.button4.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton4.RightToLef t")));

this.button4.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton4.Size"))) ;

this.button4.Ta bIndex = ((int)(resource s.GetObject("bu tton4.TabIndex" )));

this.button4.Te xt = resources.GetSt ring("button4.T ext");

this.button4.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on4.TextAlign") ));

this.button4.Vi sible = ((bool)(resourc es.GetObject("b utton4.Visible" )));

this.button4.Cl ick += new System.EventHan dler(this.butto n4_Click);

//

// button5

//

this.button5.Ac cessibleDescrip tion =
resources.GetSt ring("button5.A ccessibleDescri ption");

this.button5.Ac cessibleName = resources.GetSt ring("button5.A ccessibleName") ;

this.button5.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton5.Anchor")) );

this.button5.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button5.Backgro undImage")));

this.button5.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n5.Dock")));

this.button5.En abled = ((bool)(resourc es.GetObject("b utton5.Enabled" )));

this.button5.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n5.FlatStyle")) );

this.button5.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton5.Font"))) ;

this.button5.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button5.Image") ));

this.button5.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on5.ImageAlign" )));

this.button5.Im ageIndex =
((int)(resource s.GetObject("bu tton5.ImageInde x")));

this.button5.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button5 .ImeMode")));

this.button5.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button5.Locatio n")));

this.button5.Na me = "button5";

this.button5.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton5.RightToLef t")));

this.button5.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton5.Size"))) ;

this.button5.Ta bIndex = ((int)(resource s.GetObject("bu tton5.TabIndex" )));

this.button5.Te xt = resources.GetSt ring("button5.T ext");

this.button5.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on5.TextAlign") ));

this.button5.Vi sible = ((bool)(resourc es.GetObject("b utton5.Visible" )));

//

// button6

//

this.button6.Ac cessibleDescrip tion =
resources.GetSt ring("button6.A ccessibleDescri ption");

this.button6.Ac cessibleName = resources.GetSt ring("button6.A ccessibleName") ;

this.button6.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton6.Anchor")) );

this.button6.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button6.Backgro undImage")));

this.button6.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n6.Dock")));

this.button6.En abled = ((bool)(resourc es.GetObject("b utton6.Enabled" )));

this.button6.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n6.FlatStyle")) );

this.button6.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton6.Font"))) ;

this.button6.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button6.Image") ));

this.button6.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on6.ImageAlign" )));

this.button6.Im ageIndex =
((int)(resource s.GetObject("bu tton6.ImageInde x")));

this.button6.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button6 .ImeMode")));

this.button6.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button6.Locatio n")));

this.button6.Na me = "button6";

this.button6.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton6.RightToLef t")));

this.button6.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton6.Size"))) ;

this.button6.Ta bIndex = ((int)(resource s.GetObject("bu tton6.TabIndex" )));

this.button6.Te xt = resources.GetSt ring("button6.T ext");

this.button6.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on6.TextAlign") ));

this.button6.Vi sible = ((bool)(resourc es.GetObject("b utton6.Visible" )));

//

// label2

//

this.label2.Acc essibleDescript ion =
resources.GetSt ring("label2.Ac cessibleDescrip tion");

this.label2.Acc essibleName = resources.GetSt ring("label2.Ac cessibleName");

this.label2.Anc hor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("la bel2.Anchor"))) ;

this.label2.Aut oSize = ((bool)(resourc es.GetObject("l abel2.AutoSize" )));

this.label2.Bac kColor = System.Drawing. Color.RosyBrown ;

this.label2.Doc k =
((System.Window s.Forms.DockSty le)(resources.G etObject("label 2.Dock")));

this.label2.Ena bled = ((bool)(resourc es.GetObject("l abel2.Enabled") ));

this.label2.Fon t =
((System.Drawin g.Font)(resourc es.GetObject("l abel2.Font")));

this.label2.For eColor = System.Drawing. Color.Yellow;

this.label2.Ima ge =
((System.Drawin g.Image)(resour ces.GetObject(" label2.Image")) );

this.label2.Ima geAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("labe l2.ImageAlign") ));

this.label2.Ima geIndex = ((int)(resource s.GetObject("la bel2.ImageIndex ")));

this.label2.Ime Mode =
((System.Window s.Forms.ImeMode )(resources.Get Object("label2. ImeMode")));

this.label2.Loc ation =
((System.Drawin g.Point)(resour ces.GetObject(" label2.Location ")));

this.label2.Nam e = "label2";

this.label2.Rig htToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("lab el2.RightToLeft ")));

this.label2.Siz e =
((System.Drawin g.Size)(resourc es.GetObject("l abel2.Size")));

this.label2.Tab Index = ((int)(resource s.GetObject("la bel2.TabIndex") ));

this.label2.Tex t = resources.GetSt ring("label2.Te xt");

this.label2.Tex tAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("labe l2.TextAlign")) );

this.label2.Vis ible = ((bool)(resourc es.GetObject("l abel2.Visible") ));

//

// button7

//

this.button7.Ac cessibleDescrip tion =
resources.GetSt ring("button7.A ccessibleDescri ption");

this.button7.Ac cessibleName = resources.GetSt ring("button7.A ccessibleName") ;

this.button7.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton7.Anchor")) );

this.button7.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button7.Backgro undImage")));

this.button7.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n7.Dock")));

this.button7.En abled = ((bool)(resourc es.GetObject("b utton7.Enabled" )));

this.button7.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n7.FlatStyle")) );

this.button7.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton7.Font"))) ;

this.button7.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button7.Image") ));

this.button7.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on7.ImageAlign" )));

this.button7.Im ageIndex =
((int)(resource s.GetObject("bu tton7.ImageInde x")));

this.button7.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button7 .ImeMode")));

this.button7.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button7.Locatio n")));

this.button7.Na me = "button7";

this.button7.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton7.RightToLef t")));

this.button7.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton7.Size"))) ;

this.button7.Ta bIndex = ((int)(resource s.GetObject("bu tton7.TabIndex" )));

this.button7.Te xt = resources.GetSt ring("button7.T ext");

this.button7.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on7.TextAlign") ));

this.button7.Vi sible = ((bool)(resourc es.GetObject("b utton7.Visible" )));

//

// button2

//

this.button2.Ac cessibleDescrip tion =
resources.GetSt ring("button2.A ccessibleDescri ption");

this.button2.Ac cessibleName = resources.GetSt ring("button2.A ccessibleName") ;

this.button2.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton2.Anchor")) );

this.button2.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button2.Backgro undImage")));

this.button2.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n2.Dock")));

this.button2.En abled = ((bool)(resourc es.GetObject("b utton2.Enabled" )));

this.button2.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n2.FlatStyle")) );

this.button2.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton2.Font"))) ;

this.button2.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button2.Image") ));

this.button2.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on2.ImageAlign" )));

this.button2.Im ageIndex =
((int)(resource s.GetObject("bu tton2.ImageInde x")));

this.button2.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button2 .ImeMode")));

this.button2.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button2.Locatio n")));

this.button2.Na me = "button2";

this.button2.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton2.RightToLef t")));

this.button2.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton2.Size"))) ;

this.button2.Ta bIndex = ((int)(resource s.GetObject("bu tton2.TabIndex" )));

this.button2.Te xt = resources.GetSt ring("button2.T ext");

this.button2.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on2.TextAlign") ));

this.button2.Vi sible = ((bool)(resourc es.GetObject("b utton2.Visible" )));

this.button2.Cl ick += new System.EventHan dler(this.butto n2_Click_1);

//

// button3

//

this.button3.Ac cessibleDescrip tion =
resources.GetSt ring("button3.A ccessibleDescri ption");

this.button3.Ac cessibleName = resources.GetSt ring("button3.A ccessibleName") ;

this.button3.An chor =
((System.Window s.Forms.AnchorS tyles)(resource s.GetObject("bu tton3.Anchor")) );

this.button3.Ba ckgroundImage =
((System.Drawin g.Image)(resour ces.GetObject(" button3.Backgro undImage")));

this.button3.Do ck =
((System.Window s.Forms.DockSty le)(resources.G etObject("butto n3.Dock")));

this.button3.En abled = ((bool)(resourc es.GetObject("b utton3.Enabled" )));

this.button3.Fl atStyle =
((System.Window s.Forms.FlatSty le)(resources.G etObject("butto n3.FlatStyle")) );

this.button3.Fo nt =
((System.Drawin g.Font)(resourc es.GetObject("b utton3.Font"))) ;

this.button3.Im age =
((System.Drawin g.Image)(resour ces.GetObject(" button3.Image") ));

this.button3.Im ageAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on3.ImageAlign" )));

this.button3.Im ageIndex =
((int)(resource s.GetObject("bu tton3.ImageInde x")));

this.button3.Im eMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("button3 .ImeMode")));

this.button3.Lo cation =
((System.Drawin g.Point)(resour ces.GetObject(" button3.Locatio n")));

this.button3.Na me = "button3";

this.button3.Ri ghtToLeft =
((System.Window s.Forms.RightTo Left)(resources .GetObject("but ton3.RightToLef t")));

this.button3.Si ze =
((System.Drawin g.Size)(resourc es.GetObject("b utton3.Size"))) ;

this.button3.Ta bIndex = ((int)(resource s.GetObject("bu tton3.TabIndex" )));

this.button3.Te xt = resources.GetSt ring("button3.T ext");

this.button3.Te xtAlign =
((System.Drawin g.ContentAlignm ent)(resources. GetObject("butt on3.TextAlign") ));

this.button3.Vi sible = ((bool)(resourc es.GetObject("b utton3.Visible" )));

//

// Form1

//

this.Accessible Description =
resources.GetSt ring("$this.Acc essibleDescript ion");

this.Accessible Name = resources.GetSt ring("$this.Acc essibleName");

this.AutoScaleB aseSize =
((System.Drawin g.Size)(resourc es.GetObject("$ this.AutoScaleB aseSize")));

this.AutoScroll = ((bool)(resourc es.GetObject("$ this.AutoScroll ")));

this.AutoScroll Margin =
((System.Drawin g.Size)(resourc es.GetObject("$ this.AutoScroll Margin")));

this.AutoScroll MinSize =
((System.Drawin g.Size)(resourc es.GetObject("$ this.AutoScroll MinSize")));

this.Background Image =
((System.Drawin g.Image)(resour ces.GetObject(" $this.Backgroun dImage")));

this.ClientSize =
((System.Drawin g.Size)(resourc es.GetObject("$ this.ClientSize ")));

this.Controls.A dd(this.button3 );

this.Controls.A dd(this.button2 );

this.Controls.A dd(this.button6 );

this.Controls.A dd(this.button5 );

this.Controls.A dd(this.button4 );

this.Controls.A dd(this.button1 );

this.Controls.A dd(this.label1) ;

this.Controls.A dd(this.label2) ;

this.Controls.A dd(this.button7 );

this.Enabled = ((bool)(resourc es.GetObject("$ this.Enabled")) );

this.Font = ((System.Drawin g.Font)(resourc es.GetObject("$ this.Font")));

this.Icon = ((System.Drawin g.Icon)(resourc es.GetObject("$ this.Icon")));

this.ImeMode =
((System.Window s.Forms.ImeMode )(resources.Get Object("$this.I meMode")));

this.Location =
((System.Drawin g.Point)(resour ces.GetObject(" $this.Location" )));

this.MaximumSiz e =
((System.Drawin g.Size)(resourc es.GetObject("$ this.MaximumSiz e")));

this.MinimumSiz e =
((System.Drawin g.Size)(resourc es.GetObject("$ this.MinimumSiz e")));

this.Name = "Form1";

this.RightToLef t =
((System.Window s.Forms.RightTo Left)(resources .GetObject("$th is.RightToLeft" )));

this.StartPosit ion =
((System.Window s.Forms.FormSta rtPosition)(res ources.GetObjec t("$this.StartP osition")));

this.Text = resources.GetSt ring("$this.Tex t");

this.ResumeLayo ut(false);

}

#endregion

/// <summary>

/// The main entry point for the application.

/// </summary>

[STAThread]

static void Main()

{

Form1 form1=new Form1();

//Application.Run (new Form1());

Application.Run (form1);

}

private void menuItem2_Click (object sender, System.EventArg s e)

{
}

private void button1_Click(o bject sender, System.EventArg s e)

{

tpsF=new TicketPartSelec tionForm();

tpsF.Show();

//bltler=new Biletler();

//bltler.Show();

}

private void button4_Click(o bject sender, System.EventArg s e)

{

//ctP=new CustomerTravelP rocesses();

//ctP.Show();

}

private void button2_Click(o bject sender, System.EventArg s e)

{

//cisF=new CustomerInfoSel ectionForm();

//cisF.Show();

}

private void button8_Click(o bject sender, System.EventArg s e)

{
}

public void OpenTicketDesig n()

{

tpF=new TicketPrintingF orm();

tdF=new TicketsDatabase Form();

tpF.label1.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["Airline
Data"].ColumnName;

tpF.label2.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["AllowA"].ColumnName;

tpF.label3.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["AllowB"].ColumnName;

tpF.label4.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["Baggage
Chk/UnChkA1"].ColumnName;

tpF.label5.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["Baggage
Chk/UnChkA2"].ColumnName;

tpF.label6.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["Baggage
Chk/UnChkB1"].ColumnName;

tpF.label7.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["Baggage
Chk/UnChkB2"].ColumnName;

tpF.label8.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["CarierA"].ColumnName;

tpF.label9.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns["Carrier1"].ColumnName;

tpF.label10.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Carrier2"].ColumnName;

tpF.label11.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Carrier3"].ColumnName;

tpF.label12.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Carrier4"].ColumnName;

tpF.label13.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["CarrierB"].ColumnName;

tpF.label14.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["ClassA"].ColumnName;

tpF.label15.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["ClassB"].ColumnName;

tpF.label16.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Date
And Place Of Issue"].ColumnName;

tpF.label17.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["DateA"].ColumnName;

tpF.label18.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["DateB"].ColumnName;

tpF.label19.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Destinatio n"].ColumnName;

tpF.label20.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Fare"].ColumnName;

tpF.label21.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Fare
BasisA"].ColumnName;

tpF.label22.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Fare
BasisB"].ColumnName;

tpF.label23.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Form Of
Payment"].ColumnName;

tpF.label24.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["From"].ColumnName;

tpF.label25.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Location1"].ColumnName;

tpF.label26.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Location2"].ColumnName;

tpF.label27.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Location3"].ColumnName;

tpF.label28.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Location4"].ColumnName;

tpF.label29.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Mr/Mrs"].ColumnName;

tpF.label30.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Name"].ColumnName;

tpF.label31.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Not
Valid AfterA"].ColumnName;

tpF.label32.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Not
Valid AfterB"].ColumnName;

tpF.label33.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Not
Valid BeforeA"].ColumnName;

tpF.label34.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Not
Valid BeforeB"].ColumnName;

tpF.label35.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Passport
Number"].ColumnName;

tpF.label36.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["StatusA"].ColumnName;

tpF.label37.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["StatusB"].ColumnName;

tpF.label38.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Surname"].ColumnName;

tpF.label39.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["TimeA"].ColumnName;

tpF.label40.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["TimeB"].ColumnName;

tpF.label41.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["To"].ColumnName;

tpF.label42.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["To1"].ColumnName;

tpF.label43.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns["Total"].ColumnName;

//tpF.label44.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns[43].ColumnName;

//tpF.label45.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns[44].ColumnName;

//tpF.label46.Tex t=tdF.ticketToP rintRecordsData Set1.Tables[0].Columns[45].ColumnName;

//tpF.label1.Text =tdF.ticketToPr intRecordsDataS et1.Tables[0].Columns[46].ColumnName;

tpF.Show();

}

private void button9_Click(o bject sender, System.EventArg s e)

{

//OpenTicketDesig n();

}

private void button10_Click( object sender, System.EventArg s e)

{
}

private void button2_Click_1 (object sender, System.EventArg s e)

{

RezervationForm rF=new RezervationForm ();

rF.Show();

}

private void button3_Click(o bject sender, System.EventArg s e)

{
}

}

}

Nov 17 '05 #4
Hi Arif,

If that button is button2, notice that you set button2.Text after InitializeCompo nent in your constructor.

--
Happy coding!
Morten Wennevik [C# MVP]
Nov 17 '05 #5

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

Similar topics

2
3424
by: Vinita Sharma | last post by:
Hi All, I have a strange problem. I have 2 text boxes and a button in my form. There is a function called on onchange event of the first text box. There is another function called on onclick event of the button. Things work fine if you move from one field to another using tab keys. But if you change something in the first text box and move to button using mouse, the onchange event of the text box is called but the onclick event of the...
14
5484
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net that works well as an html page. It brings up a modal popup window that I have been trying to work out for days now and this was the closest I have been able to come. I added a little asp.net code and an asp.net button and cannot get it to
0
1059
by: John Kievlan | last post by:
Make sure you set AutoPostBack=true for the control in question. That should fix the problem. >-----Original Message----- >If I have a button control that runat=server, then as soon >as user clicks on the button, server side event handler >get invoked. I want to have a effect that's similar to >that, but with other controls. Say, I have a text field. >What I want is, as soon as my front-end script put a
2
587
by: Dot net work | last post by:
Hello. I have an aspx page that changes an HTML label's text using javascript. After the label's text has been changed in this way, I redirect to another aspx page. If I then use the back button on the browser, the label has lost it's newly changed value.
4
4028
by: Mark Lingen | last post by:
I've found a problem with postback event handling and webcontrol buttons. Try out the following code in an ASP.Net project and you will see. Create a web project in VB.Net and drop this code ontop of the webform1: Public Class WebForm1 Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code "
3
2895
by: Jan Krouwer | last post by:
I have a problem that shows up only on some systems - the toolbar text in buttons is not visible (vb.net 2003 app, 1.1 framework). As a workaround, I changed the textalign property to "right". This solved the problem, but I don't know what's happening. I notice that there is a small "dot" in the first toolbar button that shows up in either of the textalign property choices. Perhaps this is why the text disappears but I didn't put the dot...
9
2781
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT IS IMPOSSIBLE TO PROGRAMMATICALLY ADD A BUTTON TO A DYNAMICALLY CREATED PAGE. Or, to be more precise, why it is impossible to have an onClick sub respond to that button’s Click event. My main page has only one line:
9
4745
by: mosscliffe | last post by:
I am sorry but I am all very new and slow at understanding all this ASP.NET2. I found some code which showed how to page with a repeater. All very excited as I had been looking for this all day. It worked wonderfully, but it was in C# So I converted it to VB with http://www.developerfusion.co.uk/utilities/convertcsharptovb.aspx It got upset about private and so I changed those to protected
1
2898
by: =?Utf-8?B?UmljaA==?= | last post by:
I placed a button on a form menustrip for the purpose of causing the horizontal scrollbar of my form to appear so that I can access controls outside of the form's current view (the controls are further to the right of the form than the form's default width - which may take up the entire screen for some users). The form contains panels which will contain either textboxes or datagridviews. The button is located on the menustrip towards...
0
9563
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
9383
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10139
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...
0
9989
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8819
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...
1
7364
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
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();...
1
3916
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
3
2790
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.