Add Controls Manually to a Screen

You can add controls manually to a screen by using the Visual Studio Form Designer, or by editing the Form*.designer.cs file.

To add controls from the designer, open the form in Visual Studio Form Designer, and drag and drop controls from the toolbox to the form.

Another method for adding controls is to open and edit Form*.designer.cs.

//
// myEditBox
//
this.myEditBox.Anchor = ((System.Windows.Forms.AnchorStyles)
(System.Windows.Forms.AnchorStyles.None |
System.Windows.Forms.AnchorStyles.Top |
System.Windows.Forms.AnchorStyles.Left |
System.Windows.Forms.AnchorStyles.Right)) ;
this.myEditBox.BackColor = System.Drawing.Color.FromArgb(
    0xFF,0xFF,0xFF);
this.myEditBox.Font = 
    new System.Drawing.Font("Tahoma", 9F ,
        ((System.Drawing.FontStyle)
         (System.Drawing.FontStyle.Regular)));
this.myEditBox.ForeColor = 
    System.Drawing.Color.FromArgb(0x00,0x00,0x00);
this.myEditBox.LogicalType =
    Sybase.UnwiredPlatform.Windows.Forms.LogicalType.Phone;
this.myEditBox.Size = new System.Drawing.Size(150,20);
this.myEditBox.TabIndex = 16;
this.myEditBox.Tag = "16";
this.myEditBox.Text = "";
this.myEditBox.BorderStyle =
    Sybase.UnwiredPlatform.Windows.Forms.BorderStyle.BottomLine;
this.myEditBox.Location = new System.Drawing.Point(87,180);
this.myEditBox.Name = "myEditBox";
this.displayMainPanel.SetColumn(this.myEditBox, 1);
this.displayMainPanel.SetRow(this.myEditBox, 7);
this.displayMainPanel.SetRowSpan(this.myEditBox, 1);
this.displayMainPanel.SetColumnSpan(this.myEditBox, 1);
this.displayMainPanel.SetCellAnchorStyles(this.myEditBox,
    ((System.Windows.Forms.AnchorStyles)
     (System.Windows.Forms.AnchorStyles.None |
      System.Windows.Forms.AnchorStyles.Top |
      System.Windows.Forms.AnchorStyles.Left |
      System.Windows.Forms.AnchorStyles.Right)));
this.displayMainPanel.Controls.Add(this.myEditBox);

private Sybase.UnwiredPlatform.Windows.Forms.TextBox myEditBox;