Advertisement
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: |
using System;
using System.Drawing;
using System.Windows.Forms;
public delegate void onStartDelegate();
class GUI : Form
{
public TextBox myBox = new TextBox();
public RichTextBox myTextArea = new RichTextBox();
public event onStartDelegate onGUIStart;
public GUI()
{
/* Define form layout */
this.Height = 500;
this.Width = 600;
this.Text = "Bills Program Alpha 1.0";
this.MaximizeBox = false;
this.CenterToScreen();
this.MaximumSize = new Size(600, 500);
this.MinimumSize = new Size(600, 500);
this.BackColor = Color.DarkGoldenrod;
/* Create textbox */
myBox.Parent = this;
myBox.Size = new Size(ClientSize.Width + 5, 10);
myBox.Location = new Point(-2, (ClientSize.Height - myBox.Height));
myBox.BackColor = Color.Black;
myBox.ForeColor = Color.LightGreen;
myBox.Font = new Font("Courier New", 12);
myBox.MaxLength = 30;
myBox.TabStop = true;
myBox.TabIndex = 0;
myBox.Text = "Enter commands here";
/* Create text area */
myTextArea.Parent = this;
myTextArea.Size = new Size(ClientSize.Width + 2, (ClientSize.Height - myBox.Height) + 4);
myTextArea.Multiline = true;
myTextArea.BackColor = Color.Black;
myTextArea.ForeColor = Color.LightGreen;
myTextArea.ReadOnly = true;
myTextArea.Font = new Font("Verdana", 15);
myTextArea.Text = "this is some testing text";
myTextArea.ScrollBars = RichTextBoxScrollBars.Horizontal;
myTextArea.TabStop = false;
onGUIStart += new onStartDelegate(focusText);
onGUIStart();
}
public void focusText()
{
myBox.Focus();
myBox.Select();
}
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new GUI());
}
|
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
|
Loading Advertisement... |
| Open Discussion |