Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [STAThread]
- static void Main()
- {
- Application.EnableVisualStyles();
- Button button;
- TextBox textbox;
- using (Form form = new Form
- {
- Controls ={
- new TabControl { Dock = DockStyle.Fill, TabPages = {
- new TabPage { Text = "Tab Page", Controls = {
- (textbox = new TextBox { Text = "I'm a graph control...",
- Multiline = true, Dock = DockStyle.Fill})
- }}
- }},
- (button = new Button { Text = "Maximize", Dock = DockStyle.Bottom }),
- }}) {
- button.Click += delegate
- {
- textbox.Parent.Controls.Remove(textbox);
- form.Controls.Add(textbox);
- textbox.BringToFront();
- };
- Application.Run(form);
- }
- }
Add Comment
Please, Sign In to add comment