|
-
Jul 17th, 2003, 03:02 AM
#1
Thread Starter
Member
Change Message Box properties
Dear All
I like to change the MessageBox properties in VB.NET code
such as; Font,Text Color,Back Color,Fore Color ect.
Many Thanks for any Reply
salih
-
Jul 17th, 2003, 03:16 AM
#2
Addicted Member
Just with any other object in .Net you can sub class it to create your own variant. Just create a class cMsgBox which inherits from the messagebox object then play away! This is an example of a treenode
Public Class cTreeNode
'Subclass by inheriting the TreeNode
Inherits TreeNode
'each of the below public declarations will be "visible" to the outside
Public m_caType As Catergories
Public m_sName As String
Public m_sExtra As String
Public m_iChildren As Int32
Public m_iDBID As Int32
Sub New(ByVal caType As Catergories, ByVal sName As String, ByVal iDBID As Int32, ByVal iImageIndex As Int32, ByVal iSelectedImageIndex As Int32, Optional ByVal sExtra As String = Nothing, Optional ByVal iChildren As Int32 = Nothing)
MyBase.New()
'transfer all incoming parameters to your local storage
m_caType = caType
m_sName = sName
m_sExtra = sExtra
m_iChildren = iChildren
m_iDBID = iDBID
'and finally, pass back the TreeNode.Text property
Me.Text = m_sName & m_sExtra
Me.SelectedImageIndex = iImageIndex
Me.ImageIndex = iSelectedImageIndex
End Sub
End Class
Wind and waves resolves all problems.
-
Jul 17th, 2003, 04:14 AM
#3
Thread Starter
Member
Change MessageBox Properties
Hi cim3
Thank you very much for your reply
but is there any chance to modify to MessageBox Class
that would be very very helpful
I am new to .NET
SALIH
-
Jul 17th, 2003, 04:45 AM
#4
Addicted Member
Can't seem to do it using the method i posted. I'm intrigued now, anyone shed any light on this subject. Get the message on mybase.new, does this mean that the messagebox object can't be inherited?
'System.Windows.Forms.MessageBox.Private Overloads Sub New()' is not accessible in this context because it is 'Private'.
Wind and waves resolves all problems.
-
Jul 31st, 2003, 03:05 PM
#5
Lively Member
Does anyone have any additional information on this? The message box that comes up on my app looks terrible - out of place since the form behind has it's back color changed. Any way to make this look better?
Thanks
-
Aug 1st, 2003, 07:18 AM
#6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|