Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.Net] Windows 7-like MessageBox [Win7]
#1
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
Reply
#2
Not bad, fairly useful Smile Good addition to the coding area for a message box enhancement
Reply
#3
WOW nice. I am totally using this in the rest of my VB applications. Thanks for the share!
[Image: t5BWm.png]
Reply
#4
Thanks both, don't forget to look up the other threads about this to!
Reply
#5
nice job, this could be really fun
Reply
#6
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.
Reply
#7
(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
[Image: iuyle.png]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [VB.NET] Advanced MessageBox Control BlackSpider 14 11,275 03-04-2015, 11:22 PM
Last Post: longwest
  [Preview] Windows 7 Tools [VB.NET] ƃu∀ ıʞƃu∀ 4 3,242 10-14-2014, 11:55 AM
Last Post: 'Onam
  MessageBox Code Generator [C#] Scream 4 1,477 08-15-2011, 02:47 AM
Last Post: Sam
  [VB.Net] Progress bar in the icon in the taskbar [Win7] The-One 10 5,275 06-19-2011, 03:08 PM
Last Post: The-One
  [VB.Net] Adding JumpListItems to your application [Win7] The-One 3 2,322 06-04-2011, 09:36 AM
Last Post: Inventor

Forum Jump:


Users browsing this thread: 1 Guest(s)