Is it possible to set a title bar icon in an UltraMessageBoxManager dialog? If not, there's a feature request.
Hello,
Unfortunately, it is not possible to set the caption's icon on the UltraMessageBox. To demonstrate your interest in this functionality, I would suggest entering a feature request so our product management will consider this feature for a future release.
While I don't recommend using it, you should be able to use reflection if this functionality is a requirement of your application. There are four steps to achieving it:
I hope this helps.
Thanks.
Chris
Hello Chris,
I have tried with these steps but not able to do it. Can you elaborate this please because? This is too much require for my application and its much and much urgent.
Please provide me some explanation with this post.
Thnank Your
Hello.
Here is the code for a method that assigns the Icon from the current form to the UltraMessageBox.
private DialogResult ShowMessage(UltraMessageBoxInfo info) { // assume the UltraMessageBoxInfo has been passed in as 'info' Assembly asm = Assembly.GetAssembly(typeof(UltraMessageBoxManager));
// create an instance of the dialog Type type = asm.GetType("Infragistics.Win.UltraMessageBox.MessageBoxDialog"); using (Form dialog = asm.CreateInstance(type.FullName) as Form) { // initialize the dialog MethodInfo mi = type.GetMethod("InitializeDialog", BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { info.GetType() }, null); object[] parameters = new object[] { info }; mi.Invoke(dialog, parameters);
// assign whatever icon you want dialog.ShowIcon = true; dialog.Icon = this.Icon;
return dialog.ShowDialog(this); } }
Hopefully this helps.