Results 1 to 6 of 6

Thread: Custom Messagebox with background

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2006
    Location
    In my head
    Posts
    913

    Custom Messagebox with background

    I was kind of toying around with a program that a customer wants that follows a theme. The only problem was that the messageboxes did not match the theme. So I created a little messagebox - it is sort of limited at the moment but it works and works well!! It allows you to set a background image or enter "Nothing" to have it be the default color. I will try to enter more functionality as I go.

    EDITED: After adding overloads and fixing some bugs, etc. I had to put into a zip file.

    Added as of 6/19/2007:
    • Basic Overloads such as message only, message and title only, added an option for specifying font in one overload.

    • Background Overloads also now have an option for Layout.

    • Added Code for when form closes, this was an oversight on my part originally, and I apologize.

    • Added 3rd button along with enhanced button options - mirroring original messagebox

    • Added DialogResults


    Any comments, suggestions, etc. are welcome and appreciated!!

    I hope you enjoy this!!

    D
    Attached Files Attached Files
    Last edited by dminder; Jun 19th, 2007 at 11:18 AM.
    Platforms of choice: Visual Studio 2005/2008 Professional : Visual Studio 2010 Enterprise : PHP - Notepad++/WAMP

    Please Rate If I helped you.
    Please remember to mark threads as closed if your issue has been resolved.

    Reserved Words in Access | Connection Strings

  2. #2
    New Member helderpinto79's Avatar
    Join Date
    Jun 2007
    Location
    Porto, Portugal
    Posts
    5

    Re: Custom Messagebox with background

    Hello,
    i've made some changes to your code and added a picture box to simulate the messagebox type as a question, info, exclamation, etc... This is working fine.. But i'm having a problem...
    How can i access to the dialog results?
    i tried to do a=b.msgbox(.......) and it dont work...
    tried a=b.dialogresults and it dont work...
    Can you tell me how can i do it please?
    Thanks

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2006
    Location
    In my head
    Posts
    913

    Re: Custom Messagebox with background

    Here is an example:
    Code:
        Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
            If m.Show("Are you sure you want to exit?", "Confirm Exit", msgbox._Buttons.YesNo, Me.BackgroundImage, ImageLayout.Stretch) = msgbox.DialogResult.Yes Then
                Application.Exit()
            End If
        End Sub
    I am also working on adding the picturebox icon to it. If you have any other questions or problems, let me know.

    Thanks!

    D
    Platforms of choice: Visual Studio 2005/2008 Professional : Visual Studio 2010 Enterprise : PHP - Notepad++/WAMP

    Please Rate If I helped you.
    Please remember to mark threads as closed if your issue has been resolved.

    Reserved Words in Access | Connection Strings

  4. #4
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    694

    Re: Custom Messagebox with background

    What is this Glass.Glassbutton? Is there something I'm missing?
    Thanks
    Godwin

    Help someone else with what someone helped you!

  5. #5
    New Member
    Join Date
    Jan 2008
    Posts
    1

    Re: Custom Messagebox with background

    What is this Glass.Glassbutton? It gets errors when including in a project on glass.glassbutton.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2006
    Location
    In my head
    Posts
    913

    Re: Custom Messagebox with background

    Glassbutton is a 3rd party control I found/downloaded on CodeProject.com - The .dll is attached. I have not updated it at all, it is a c# project and is too large to post as attachment. I thought the .dll had been included in the original .zip file......

    Good Luck all!

    P.S. Pls accept my apologies because I have not had the time to enhance this project further.

    D
    Attached Files Attached Files
    Platforms of choice: Visual Studio 2005/2008 Professional : Visual Studio 2010 Enterprise : PHP - Notepad++/WAMP

    Please Rate If I helped you.
    Please remember to mark threads as closed if your issue has been resolved.

    Reserved Words in Access | Connection Strings

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