diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-05-01 10:19:09 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-05-01 10:19:09 +0100 |
| commit | 33373a873ffb0717cb153b5613514fe4478a0ec1 (patch) | |
| tree | a27d8aa1874c65fa7c72e9e330d04db6f0af6963 /TimeHACK.Engine/WindowManager.cs | |
| parent | 93c445239c7d28a6cee7147d7b6dbe3c7f0974f9 (diff) | |
| parent | 0a7c2d4dc020b58dacf1d0cf50403d101f176d72 (diff) | |
| download | histacom2-33373a873ffb0717cb153b5613514fe4478a0ec1.tar.gz histacom2-33373a873ffb0717cb153b5613514fe4478a0ec1.tar.bz2 histacom2-33373a873ffb0717cb153b5613514fe4478a0ec1.zip | |
Merge pull request #58 from Alex-TIMEHACK/master
Finished my taskbar!!!
Diffstat (limited to 'TimeHACK.Engine/WindowManager.cs')
| -rw-r--r-- | TimeHACK.Engine/WindowManager.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/TimeHACK.Engine/WindowManager.cs b/TimeHACK.Engine/WindowManager.cs index 0ba5d99..6bb7cc5 100644 --- a/TimeHACK.Engine/WindowManager.cs +++ b/TimeHACK.Engine/WindowManager.cs @@ -10,7 +10,6 @@ namespace TimeHACK.Engine { public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection(); - public WinClassic startWin95(UserControl content, String title, Image icon, Boolean MaxButton, Boolean MinButton) { // Setup Window @@ -52,6 +51,21 @@ namespace TimeHACK.Engine app.minimizebutton.Location = new Point(app.minimizebutton.Location.X, app.minimizebutton.Location.Y); } + // Time for the taskbar + + // Convert an image to an icon (for the taskbar) + if (icon != null) + { + Bitmap theBitmap = new Bitmap(icon, new Size(icon.Width, icon.Height)); + IntPtr Hicon = theBitmap.GetHicon(); // Get an Hicon for myBitmap. + Icon newIcon = Icon.FromHandle(Hicon); // Create a new icon from the handle. + app.Icon = newIcon; + } + + // Set some values (for the taskbar) + app.Tag = TaskBarController.AvalibleApplicationID; + app.Text = title; + // Show the app app.Show(); app.BringToFront(); |
