1 Attachment(s)
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
Any comments, suggestions, etc. are welcome and appreciated!!
I hope you enjoy this!! :thumb:
D
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
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. :wave:
Thanks!
D
Re: Custom Messagebox with background
What is this Glass.Glassbutton? Is there something I'm missing?
Thanks
Re: Custom Messagebox with background
What is this Glass.Glassbutton? It gets errors when including in a project on glass.glassbutton.
1 Attachment(s)
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......:blush:
Good Luck all!
P.S. Pls accept my apologies because I have not had the time to enhance this project further.
D