mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
close buttons glow when moused over in xp
This commit is contained in:
parent
6418fad8eb
commit
609deb1c4e
8 changed files with 55 additions and 6 deletions
|
@ -221,6 +221,8 @@
|
|||
<Content Include="Resources\Win95PlusTravelWallpaper.jpg" />
|
||||
<Content Include="Resources\WinXP\Window\WinXP_Bottom.png" />
|
||||
<Content Include="Resources\WinXP\Window\WinXP_Close.png" />
|
||||
<None Include="Resources\WinXP\Window\WinXP_CloseHover.png" />
|
||||
<None Include="Resources\WinXP\Window\WinXP_ClosePress.png" />
|
||||
<Content Include="Resources\WinXP\Window\WinXP_LBCorner.png" />
|
||||
<Content Include="Resources\WinXP\Window\WinXP_LeftSide.png" />
|
||||
<Content Include="Resources\WinXP\Window\WinXP_Max.png" />
|
||||
|
|
20
Histacom2.Engine/Properties/Resources.Designer.cs
generated
20
Histacom2.Engine/Properties/Resources.Designer.cs
generated
|
@ -1160,6 +1160,26 @@ public static System.Drawing.Bitmap WinXP_Close {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap WinXP_CloseHover {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("WinXP_CloseHover", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap WinXP_ClosePress {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("WinXP_ClosePress", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
|
|
@ -499,4 +499,10 @@
|
|||
<data name="Win95PlusTravelWallpaper" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\win95plustravelwallpaper.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WinXP_CloseHover" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WinXP\Window\WinXP_CloseHover.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WinXP_ClosePress" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WinXP\Window\WinXP_ClosePress.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
Histacom2.Engine/Resources/WinXP/Window/WinXP_CloseHover.png
Normal file
BIN
Histacom2.Engine/Resources/WinXP/Window/WinXP_CloseHover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
Histacom2.Engine/Resources/WinXP/Window/WinXP_ClosePress.png
Normal file
BIN
Histacom2.Engine/Resources/WinXP/Window/WinXP_ClosePress.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 984 B |
16
Histacom2.Engine/Template/WinXP.Designer.cs
generated
16
Histacom2.Engine/Template/WinXP.Designer.cs
generated
|
@ -55,8 +55,8 @@ private void InitializeComponent()
|
|||
// program
|
||||
//
|
||||
this.program.BackColor = System.Drawing.Color.OldLace;
|
||||
this.program.Controls.Add(this.flowLayoutPanel1);
|
||||
this.program.Controls.Add(this.bottomleftcorner);
|
||||
this.program.Controls.Add(this.flowLayoutPanel1);
|
||||
this.program.Controls.Add(this.toprightcorner);
|
||||
this.program.Controls.Add(this.bottomrightcorner);
|
||||
this.program.Controls.Add(this.topleftcorner);
|
||||
|
@ -82,9 +82,10 @@ private void InitializeComponent()
|
|||
//
|
||||
this.bottomleftcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.bottomleftcorner.BackgroundImage = global::Histacom2.Engine.Properties.Resources.WinXP_BottomLeft;
|
||||
this.bottomleftcorner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||
this.bottomleftcorner.Location = new System.Drawing.Point(0, 296);
|
||||
this.bottomleftcorner.Name = "bottomleftcorner";
|
||||
this.bottomleftcorner.Size = new System.Drawing.Size(5, 4);
|
||||
this.bottomleftcorner.Size = new System.Drawing.Size(4, 4);
|
||||
this.bottomleftcorner.TabIndex = 10;
|
||||
//
|
||||
// toprightcorner
|
||||
|
@ -120,6 +121,7 @@ private void InitializeComponent()
|
|||
// bottom
|
||||
//
|
||||
this.bottom.BackgroundImage = global::Histacom2.Engine.Properties.Resources.WinXP_Bottom;
|
||||
this.bottom.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.bottom.Cursor = System.Windows.Forms.Cursors.SizeNS;
|
||||
this.bottom.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.bottom.Location = new System.Drawing.Point(4, 296);
|
||||
|
@ -131,6 +133,7 @@ private void InitializeComponent()
|
|||
//
|
||||
this.top.BackColor = System.Drawing.Color.Transparent;
|
||||
this.top.BackgroundImage = global::Histacom2.Engine.Properties.Resources.WinXP_TopBar;
|
||||
this.top.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.top.Controls.Add(this.programIcon);
|
||||
this.top.Controls.Add(this.maximizebutton);
|
||||
this.top.Controls.Add(this.minimizebutton);
|
||||
|
@ -178,11 +181,11 @@ private void InitializeComponent()
|
|||
//
|
||||
this.programname.AutoSize = true;
|
||||
this.programname.BackColor = System.Drawing.Color.Transparent;
|
||||
this.programname.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.programname.Font = new System.Drawing.Font("Trebuchet MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.programname.ForeColor = System.Drawing.Color.White;
|
||||
this.programname.Location = new System.Drawing.Point(25, 7);
|
||||
this.programname.Location = new System.Drawing.Point(25, 6);
|
||||
this.programname.Name = "programname";
|
||||
this.programname.Size = new System.Drawing.Size(112, 16);
|
||||
this.programname.Size = new System.Drawing.Size(110, 18);
|
||||
this.programname.TabIndex = 3;
|
||||
this.programname.Text = "Application Title";
|
||||
this.programname.MouseDown += new System.Windows.Forms.MouseEventHandler(this.top_MouseDown);
|
||||
|
@ -197,6 +200,9 @@ private void InitializeComponent()
|
|||
this.closebutton.TabIndex = 4;
|
||||
this.closebutton.TabStop = false;
|
||||
this.closebutton.Click += new System.EventHandler(this.closebutton_Click);
|
||||
this.closebutton.MouseDown += new System.Windows.Forms.MouseEventHandler(this.closebutton_MouseDown);
|
||||
this.closebutton.MouseEnter += new System.EventHandler(this.closebutton_MouseEnter);
|
||||
this.closebutton.MouseLeave += new System.EventHandler(this.closebutton_MouseLeave);
|
||||
//
|
||||
// right
|
||||
//
|
||||
|
|
|
@ -45,6 +45,21 @@ private const int
|
|||
HTBOTTOMLEFT = 16,
|
||||
HTBOTTOMRIGHT = 17;
|
||||
|
||||
private void closebutton_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
closebutton.BackgroundImage = Properties.Resources.WinXP_ClosePress;
|
||||
}
|
||||
|
||||
private void closebutton_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
closebutton.BackgroundImage = Properties.Resources.WinXP_Close;
|
||||
}
|
||||
|
||||
private void closebutton_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
closebutton.BackgroundImage = Properties.Resources.WinXP_CloseHover;
|
||||
}
|
||||
|
||||
private void closebutton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!closeDisabled) this.Close();
|
||||
|
|
|
@ -112,7 +112,7 @@ public WinXP InitXP(UserControl content, string title, Image icon, bool MaxButto
|
|||
{
|
||||
app.programIcon.Hide();
|
||||
app.programIcon.Image = Properties.Resources.nullIcon;
|
||||
app.programname.Location = new Point(6, 7);
|
||||
app.programname.Location = new Point(6, 6);
|
||||
}
|
||||
else app.programIcon.Image = icon;
|
||||
|
||||
|
|
Loading…
Reference in a new issue