new splash screen logo file (with transparency), new splash screen drawing method
This commit is contained in:
1 parent
bd36b3d1d4
commit
848f5b62aa
2 files changed
+16
-3
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 65 KiB |
+16
-3
@@ -192,6 +192,8 @@ namespace Vocaluxe
|
||||
|
||||
class SplashScreen : Form
|
||||
{
|
||||
Bitmap logo;
|
||||
|
||||
public SplashScreen()
|
||||
{
|
||||
string path = Path.Combine(Environment.CurrentDirectory, Path.Combine(CSettings.sFolderGraphics, CSettings.sLogo));
|
||||
@@ -199,9 +201,8 @@ namespace Vocaluxe
|
||||
{
|
||||
try
|
||||
{
|
||||
Bitmap logo = new Bitmap(path);
|
||||
logo = new Bitmap(path);
|
||||
this.ClientSize = new Size(logo.Width, logo.Height);
|
||||
this.BackgroundImage = logo;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -230,8 +231,20 @@ namespace Vocaluxe
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Text = CSettings.sProgramName;
|
||||
this.CenterToScreen();
|
||||
this.TransparencyKey = this.BackColor; //thx to Klafhor :>
|
||||
this.Show();
|
||||
}
|
||||
|
||||
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnPaintBackground(System.Windows.Forms.PaintEventArgs e)
|
||||
{
|
||||
if (logo == null)
|
||||
return;
|
||||
|
||||
Graphics g = e.Graphics;
|
||||
g.DrawImage(logo, new Rectangle(0, 0, this.Width, this.Height));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user