Results 1 to 1 of 1

Thread: Custom MsgBox

  1. #1

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,689

    Custom MsgBox

    This is a custom dialog, msgbox that i redeveloped from some SO code from this thread - https://www.vbforums.com/showthread....Adjusting-Code

    Name:  19-07-2024 05.25.27.png
Views: 410
Size:  6.2 KB

    CustomMessageBox.zip

    To create custom msgboxes in your app. add the icons (png) from My.Resources...

    Name:  18-07-2024 23.35.08.png
Views: 424
Size:  5.2 KB

    Add the CustomMessageBox Module to your app., then to create msgboxes with custom buttons...

    Code:
    Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        Dim result As String = CustomMessageBox.Show( _
            New String() {"Include", "Exclude"}, frmIcon.iconQuestion, _
            "'frame_0070.jpg' is classified as a Blank Frame. Do you wish to include it in the Image Library, or exclude it?", _
            "Include frame")
        MessageBox.Show(result)
    End Sub
    result will return either one of your buttons text, or "cancel" depending on which button you click, or don't...
    Last edited by .paul.; Jul 18th, 2024 at 11:33 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width