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


Messages In This Thread
[VB.Net] Windows 7-like MessageBox [Win7] - by The-One - 06-03-2011, 08:51 AM

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

Forum Jump:


Users browsing this thread: 3 Guest(s)