06-03-2011, 08:51 AM
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.
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):
It doesn't handle DialogResults but you can handle it!
Step 4
Usage code from the screen:
Enjoy!
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.
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!
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!