fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace WindowsFormsApplication1
  11. {
  12. public partial class Form1 : Form
  13. {
  14. public Form1()
  15. {
  16. InitializeComponent();
  17. }
  18.  
  19. private void button1_Click(object sender, EventArgs e)
  20. {
  21. Label label = new Label();
  22. Form form = new Form();
  23. form.Controls.Add(label);
  24. form.Show();
  25. form.TopLevel = false;
  26. form.FormBorderStyle = FormBorderStyle.None;
  27.  
  28. TabPage tab = new TabPage();
  29. tab.Controls.Add(form);
  30. tabControl1.TabPages.Add(tab);
  31. form.Dock = DockStyle.Fill;
  32. label.Text = "" + tabControl1.TabPages.Count;
  33. }
  34. }
  35. }
  36.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty