Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. protected override void OnLoad(EventArgs e)
  2. {
  3. this.BaseModalSetup();
  4.  
  5. VisualManager.OverrideDesignerStyles(this);
  6.  
  7. base.OnLoad(e);
  8.  
  9. _hasInitialized = true;
  10.  
  11. this.MinimizeBox = true;
  12.  
  13. this.BorderStyle = MetroBorderStyle.None;
  14.  
  15. this.FormBorderStyle = FormBorderStyle.None;
  16. }
  17.  
  18. protected override CreateParams CreateParams
  19. {
  20. get
  21. {
  22. if (this.originalStyle == -1)
  23. {
  24. this.originalStyle = base.CreateParams.ExStyle;
  25. }
  26.  
  27. CreateParams cp = base.CreateParams;
  28.  
  29. if (!_hasInitialized)
  30. cp.ExStyle |= 0x02000000; // WS_EX_COMPOSITED
  31. else
  32. cp.ExStyle = this.originalStyle;
  33.  
  34. return cp;
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement