Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.21 KB | None | 0 0
  1. private void viewscreen_MouseHover(object sender, EventArgs e)
  2. {
  3. statuspnl.Enabled = true;
  4. statuspnl.Visible = true;
  5. }
  6.  
  7. // viewscreen
  8. //
  9. this.viewscreen.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
  10. this.viewscreen.Controls.Add(this.statuspnl);
  11. this.viewscreen.Location = new System.Drawing.Point(208, 16);
  12. this.viewscreen.Name = "viewscreen";
  13. this.viewscreen.Size = new System.Drawing.Size(370, 290);
  14. this.viewscreen.TabIndex = 0;
  15. this.viewscreen.MouseHover += new System.EventHandler(this.viewscreen_MouseHover);
  16.  
  17. namespace panelvisible
  18. {
  19. partial class Form1
  20. {
  21. /// <summary>
  22. /// Required designer variable.
  23. /// </summary>
  24. private System.ComponentModel.IContainer components = null;
  25.  
  26. /// <summary>
  27. /// Clean up any resources being used.
  28. /// </summary>
  29. /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
  30. protected override void Dispose(bool disposing)
  31. {
  32. if (disposing && (components != null))
  33. {
  34. components.Dispose();
  35. }
  36. base.Dispose(disposing);
  37. }
  38.  
  39. #region Windows Form Designer generated code
  40.  
  41. /// <summary>
  42. /// Required method for Designer support - do not modify
  43. /// the contents of this method with the code editor.
  44. /// </summary>
  45. private void InitializeComponent()
  46. {
  47. this.panel1 = new System.Windows.Forms.Panel();
  48. this.label1 = new System.Windows.Forms.Label();
  49. this.panel2 = new System.Windows.Forms.Panel();
  50. this.panel1.SuspendLayout();
  51. this.SuspendLayout();
  52. //
  53. // panel1
  54. //
  55. this.panel1.BackColor = System.Drawing.Color.Red;
  56. this.panel1.Controls.Add(this.panel2);
  57. this.panel1.Controls.Add(this.label1);
  58. this.panel1.Location = new System.Drawing.Point(101, 36);
  59. this.panel1.Name = "panel1";
  60. this.panel1.Size = new System.Drawing.Size(200, 100);
  61. this.panel1.TabIndex = 0;
  62. this.panel1.MouseHover += new System.EventHandler(this.panel1_MouseHover);
  63. //
  64. // label1
  65. //
  66. this.label1.AutoSize = true;
  67. this.label1.Location = new System.Drawing.Point(49, 42);
  68. this.label1.Name = "label1";
  69. this.label1.Size = new System.Drawing.Size(31, 13);
  70. this.label1.TabIndex = 0;
  71. this.label1.Text = "Hello";
  72. this.label1.Visible = false;
  73. //
  74. // panel2
  75. //
  76. this.panel2.BackColor = System.Drawing.Color.Gray;
  77. this.panel2.Location = new System.Drawing.Point(33, 70);
  78. this.panel2.Name = "panel2";
  79. this.panel2.Size = new System.Drawing.Size(118, 10);
  80. this.panel2.TabIndex = 1;
  81. this.panel2.Visible = false;
  82. //
  83. // Form1
  84. //
  85. this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
  86. this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  87. this.ClientSize = new System.Drawing.Size(494, 205);
  88. this.Controls.Add(this.panel1);
  89. this.Name = "Form1";
  90. this.Text = "Form1";
  91. this.panel1.ResumeLayout(false);
  92. this.panel1.PerformLayout();
  93. this.ResumeLayout(false);
  94.  
  95. }
  96.  
  97. #endregion
  98.  
  99. private System.Windows.Forms.Panel panel1;
  100. private System.Windows.Forms.Label label1;
  101. private System.Windows.Forms.Panel panel2;
  102. }
  103. }
  104.  
  105. using System;
  106. using System.Windows.Forms;
  107.  
  108. namespace panelvisible
  109. {
  110. public partial class Form1 : Form
  111. {
  112. public Form1()
  113. {
  114. InitializeComponent();
  115. }
  116.  
  117. private void panel1_MouseHover(object sender, EventArgs e)
  118. {
  119. this.label1.Visible = true;
  120. this.label1.Enabled = true;
  121. this.panel2.Visible = true;
  122. this.panel2.Enabled = true;
  123. }
  124.  
  125.  
  126. }
  127. }
  128.  
  129. this.viewscreen.MouseHover += new System.EventHandler(this.viewscreen_MouseHover);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement