Support Forums
[VB.Net] Windows 7-like MessageBox [Win7] - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: [VB.Net] Windows 7-like MessageBox [Win7] (/showthread.php?tid=19260)



[VB.Net] Windows 7-like MessageBox [Win7] - The-One - 06-03-2011

Hello,

Its me again, with the last thread of the .dll pack. This is the last thing i'm posting on this pack. The Windows Messagebox.

[Image: 1306154861-370.png]

The .dll's: http://www.multiupload.com/FDKNSPL53Y

Step 1
Add the .dll's as reference.

Step 2
Import the following elements: Microsoft.WindowsAPICodePack.Dialogs

Step 3
Add this structure (Somewhere in your code):

Code:
Structure Mes
        Public Shared Sub Show(ByVal Caption As String, ByVal InstructionText As String, ByVal Text As String, Optional ByVal Icon As TaskDialogStandardIcon = TaskDialogStandardIcon.None, Optional ByVal StandardButtons As TaskDialogStandardButtons = TaskDialogStandardButtons.Ok, Optional ByVal FooterText As String = "", Optional ByVal FooterIcon As TaskDialogStandardIcon = TaskDialogStandardIcon.None)
            Dim dialog As New TaskDialog
            dialog.InstructionText = InstructionText
            dialog.Text = Text
            dialog.Caption = Caption
            dialog.Icon = Icon
            dialog.FooterText = FooterText
            dialog.FooterIcon = FooterIcon
            dialog.StandardButtons = StandardButtons
            dialog.Show()
        End Sub
    End Structure

It doesn't handle DialogResults but you can handle it! Thumbsup

Step 4
Usage code from the screen:

Code:
Mes.Show("Warning!", "YOU HAVE BEEN HACKEDDDDDDDD", "RUUUUUUUUUUUUUUUUUUUUUN", TaskDialogStandardIcon.Shield, TaskDialogStandardButtons.Ok, "No crap, you really should", TaskDialogStandardIcon.Error)

Enjoy! Pirate


RE: [VB.Net] Windows 7-like MessageBox [Win7] - AceInfinity - 06-03-2011

Not bad, fairly useful Smile Good addition to the coding area for a message box enhancement


RE: [VB.Net] Windows 7-like MessageBox [Win7] - Resistance - 06-03-2011

WOW nice. I am totally using this in the rest of my VB applications. Thanks for the share!


RE: [VB.Net] Windows 7-like MessageBox [Win7] - The-One - 06-04-2011

Thanks both, don't forget to look up the other threads about this to!


RE: [VB.Net] Windows 7-like MessageBox [Win7] - Bigandrewgold - 06-06-2011

nice job, this could be really fun


RE: [VB.Net] Windows 7-like MessageBox [Win7] - Black Demon - 06-06-2011

This is a very HQ message box,lol. Perfect for errors, I'm sure thats why you made it in the first place Big Grin

Thanks.


RE: [VB.Net] Windows 7-like MessageBox [Win7] - The-One - 06-07-2011

(06-06-2011, 04:45 PM)Gnizama Wrote: This is a very HQ message box,lol. Perfect for errors, I'm sure thats why you made it in the first place Big Grin

Thanks.

You got it. Pirate There's also this checkbox function. Kewl to check that out to Big Grin