Guest User

Untitled

a guest
Dec 15th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. private void treeView1_MouseDown(object sender, MouseEventArgs e)
  2. {
  3. if (e.Button == MouseButtons.Right)
  4. {
  5. var myForm = new Form {Text = "My Form"};
  6. myForm.SetBounds(10, 10, 200, 200);
  7.  
  8. myForm.Show();
  9. // Determine if the form is modal.
  10. if (myForm.Modal == false)
  11. {
  12. // Change borderstyle and make it not a top level window.
  13. myForm.FormBorderStyle = FormBorderStyle.FixedToolWindow;
  14. myForm.TopLevel = false;
  15. }
  16. }
  17. }
Add Comment
Please, Sign In to add comment