This is a migrated thread and some comments may be shown as answers.

RadMessageBox and SplashScreen

4 Answers 219 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
OD
Top achievements
Rank 1
OD asked on 01 Aug 2016, 08:22 AM

Hi, 

I'm using RadMessgeBox during the load of my application (SpashScreen).The messages box appears behind the splash.

Is there a way to show them in topmost ?

NB : I don't want to use the shown event of the form, cause the messages box are in objects, not directly in the class form.

thanx :)

4 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 01 Aug 2016, 10:38 AM
Hi ,

Thank you for writing. 

You can subscribe to the Shown event of the message box and make it TopMost:
private void RadButton1_Click(object sender, EventArgs e)
{
    RadMessageBox.Instance.Shown += Instance_Shown;
    RadMessageBox.Show(this, "Test");
}
 
void Instance_Shown(object sender, EventArgs e)
{
    RadMessageBoxForm form = sender as RadMessageBoxForm;
    form.TopMost = true;
 
}

I hope this will be useful. 

Regards,
Dimitar
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
0
OD
Top achievements
Rank 1
answered on 05 Sep 2016, 09:16 AM
Thanks for your help :)
0
Jan
Top achievements
Rank 1
answered on 30 Apr 2020, 05:15 AM
Could you add the code for VB to, please?
0
Nadya | Tech Support Engineer
Telerik team
answered on 30 Apr 2020, 03:44 PM

Hello Jan,

Please refer to the code sample in VB:

Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
        AddHandler RadMessageBox.Instance.Shown, AddressOf Instance_Shown
        RadMessageBox.Show(Me, "Test")
    End Sub

    Private Sub Instance_Shown(ByVal sender As Object, ByVal e As EventArgs)
        Dim form As RadMessageBoxForm = TryCast(sender, RadMessageBoxForm)
        form.TopMost = True
    End Sub

Feel free to use our online converter.

I hope this information helps. If you need further assistance do not hesitate to contact us.

Regards,
Nadya
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
General Discussions
Asked by
OD
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
OD
Top achievements
Rank 1
Jan
Top achievements
Rank 1
Nadya | Tech Support Engineer
Telerik team
Share this question
or