Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
UltraMessageBox Title Bar Icon
posted

Hi,

I want the icon for UltraMessageBox like WinForms title bar icon. I have seen the previous post http://ko.infragistics.com/community/forums/t/44081.aspx for the same and does the steps suggested by your team member but doesn't seem to work. Please Can anyone help me out of this. This is too much important an urgent. The sample code is here.

Dim sMessage As String = String.Empty

Dim ulMessageBoxManager As New UltraMessageBoxManager

Dim objMessageInfo As New UltraMessageBoxInfo

objMessageInfo.Buttons = MessageBoxButtons.OK

objMessageInfo.Icon = MessageBoxIcon.Information

objMessageInfo.Caption = "Message"

objMessageInfo.TextFormatted = " <a href='" + My.Application.Info.DirectoryPath + "\MyLog.log'> " + My.Application.Info.DirectoryPath + "\MyLog.log</a>"

objMessageInfo.ButtonAlignment = Infragistics.Win.HAlign.Center

objMessageInfo.Style = Infragistics.Win.UltraMessageBox.MessageBoxStyle.Standard

objMessageInfo.ShowHelpButton = Infragistics.Win.DefaultableBoolean.False

If i call ulMessageBoxManager.ShowMessageBox(objMessageInfo), it works fine but it doesn't have title bar icon.

Dim objAssembly As Assembly = Assembly.Load("Infragistics2.Win.v10.3")

Dim objType As Type = objAssembly.GetType("Infragistics.Win.UltraMessageBox.MessageBoxDialog")

Dim objMethodInfo As MethodInfo = objType.GetMethod("InitializeDialog")

Dim objReturn As Object

Dim objParams(0) As Object

objParams(0) = objMessageInfo

Dim ObjData As Object = objMethodInfo.Invoke(objReturn, objParams)

Dim objMsgBoxDialog As Form = DirectCast(Activator.CreateInstance(objType), Form)

objMsgBoxDialog.Text = "This is form text."

objMsgBoxDialog.Icon = My.Resources.MyIcon

objMsgBoxDialog.ShowDialog()

Thanks.