Support Forums

Full Version: [VB.Net] Windows 7-like MessageBox [Win7]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Not bad, fairly useful Smile Good addition to the coding area for a message box enhancement
WOW nice. I am totally using this in the rest of my VB applications. Thanks for the share!
Thanks both, don't forget to look up the other threads about this to!
nice job, this could be really fun
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.
(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