Telerik Forums
UI for WinForms Forum
1 answer
18 views
We are currently working with Telerik Winforms 2021.1.223.40
and We'd like to seek advice on.

In our Winforms application, we call the Click event of RadRepeatButton.
When occurs the click event of this button, we show Telerik messagebox after certain data checks.

When showing Telerik messagebox, we make layout of RadMessageBox through a method named "SetDesing()".
To this end we call a method name ""RadMessageBox.Show".

The problem occurs after calling "RadMessageBox.Show()". Even though we wrote the code that return after this call, the return does not occur. Instead, It repeatedly triggers the Click event of the RadRepeatButton. (It almost like a recursive function.)

Below are the detailed codes and the call stacks.
Nadya | Tech Support Engineer
Telerik team
 answered on 05 Feb 2024
1 answer
18 views

Hi,

I'm wondering if it could be possible to add an auto close functionnality on RadMessageBox ?

- With a formattable string like this : "Popup will close in {0} seconds"

- We should be able to specify a duration in seconds

- It would only be useable if the MessageBox is not a YesNo(Cancel)

Using an internal timer, the MessageBox would update the formattable string at each tick.

I think it can easily be achieved.

Thanks.

Dinko | Tech Support Engineer
Telerik team
 answered on 22 Dec 2023
1 answer
116 views

Here is some sample code:

Imports Telerik.WinControls
Imports Telerik.WinControls.UI

Public Class RadForm1
    Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        RadOverlayManager.Show(Me)
        For x = 0 To 1999999999

        Next
        RadOverlayManager.Close()
        RadMessageBox.Show("You will never see this.", "Nope", MessageBoxButtons.OK, RadMessageIcon.Info)
    End Sub
End Class

What you'll see is, the overlay will appear and disappear as expected.  However the radmessagebox will never appear. 

If you comment out the overlay lines, then the message box will appear.

Looks like a threading issue, but I'll leave that to the professionals to figure out. =)

Dinko | Tech Support Engineer
Telerik team
 answered on 02 Jan 2023
1 answer
87 views

I did a search and found this thread from... 13 years ago: https://www.telerik.com/forums/radmessagebox-focus-on-buttons-in-mdi-app

Wasn't sure if I should necro it or not, but regardless, is there a way around this?  For example, when I do a .Show on it I expect it to have focus and also that a button on there have focus.  Especially if its just an "ok" button, as with the default .NET msgbox I could just hit the spacebar to continue.  As it is, you HAVE to use your mouse to select the button.

Also, there's no TAG for the radmessagebox here on the forum so I used "messageBox"

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Aug 2022
1 answer
190 views
Hello community!!!

My question is really simple I think... Is there any way to use RadMessageBox as input dialog? Something like this...



If yes, how can I do that? Is there any document or example online?

Thank you for your time!!!
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Aug 2022
1 answer
54 views

Hi,

I'm having issues in my application when displaying and moving RadMessageBox from HD screen to 4K screen. The size of the default icon is very small when shown on the 4K monitor also the location of the buttons seems to go awrywhen moving dialog between monitors. I also get a strange sizing issue when showing a custom bitmap for an image, it's not scaling at all when shown on the 4K monitor.

Luckily the scaling / layout issues can be easily reproduced using the latest Demo Application (Demo Application - Telerik UI for WinForms R2 2022 SP1) by following these steps.

On the HD monitor - start demo app, select Explore all controls, select "Message Box"

Change message type to "Info" and set buttons to "Yes, No, Cancel"

Click "Show RadMessageBox" - Message box is displayed as expected

Drag to 4K monitor - size and layout is wrong and icon image is small

Press cancel whilst its shown on 4K monitor

Click "Show RadMessageBox" - Message box is displayed on HD monitor with overlapping buttons and large image icon

Press Close / cancel and try again - this time it shows correctly

Sometimes when playing with the demo I get also see 

and

I'm aware that RadMessageBox is persistant throughout the life of the applicationso you might have to shut down the demo app and restart it.

And another issue, this time starting in my own HDPI aware application on 4K monitor - this time the size of the message text is too large.

Kind regards

Toby

 

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 29 Jul 2022
1 answer
526 views

Hi,

I'd like to customize the location of a MessageBox. Ideally, I would just set a parent control and the MessageBox would center itself to the parent.

I tried this ((0,0) to make it obvious) but it doesn't work:  


  'Dim pt As Point = New Point(Me.Parent.Location.X + Me.Location.X, Me.Parent.Location.Y + Me.Location.Y)
  'Telerik.WinControls.RadMessageBox.Instance.Location = New Point((pt.X + Me.Width / 2) - (Telerik.WinControls.RadMessageBox.Instance.Width / 2), (pt.Y + Me.Height / 2))
  Telerik.WinControls.RadMessageBox.Instance.Location = New Point(0, 0)
  Dim ds As DialogResult = Telerik.WinControls.RadMessageBox.Show(Me, "Are you sure?", "Clear form",
                                                                        MessageBoxButtons.YesNo, RadMessageIcon.Question,
                                                                        MessageBoxDefaultButton.Button1)

I've also found this bit of code (modified it according to my needs) from an older answer to someone else's similar question:

Private Sub Instance_LocationChanged(sender As Object, e As EventArgs)
        RemoveHandler RadMessageBox.Instance.LocationChanged, AddressOf Instance_LocationChanged

        Dim box As RadMessageBoxForm = sender
        Dim pt As Point = New Point(Me.Parent.Location.X + Me.Location.X, Me.Parent.Location.Y + Me.Location.Y)
        box.Location = New Point((pt.X + Me.Width / 2) - (box.Width / 2), (pt.Y + Me.Height / 2))

        AddHandler RadMessageBox.Instance.LocationChanged, AddressOf Instance_LocationChanged
    End Sub

But the problem here is that the MessageBox is then static and can't be moved.

Suggestions?

Using version 2021.1.326.40.

Jure

Dinko | Tech Support Engineer
Telerik team
 answered on 05 Nov 2021
2 answers
133 views

Ok, this one's just weird. The Close (X) button on MessageBox's  TitleBar is not working. I click on it and nothing happens.

ds = Telerik.WinControls.RadMessageBox.Show(Me, "Are you sure?", "Clear form", MessageBoxButtons.YesNo, RadMessageIcon.Question, MessageBoxDefaultButton.Button1)

Help.

Edit: interestingly, it's the same with regular (native) MessageBox. As if the button is disabled. But why even show it then?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Oct 2021
13 answers
400 views
Hello:

Our users noticed today that RadMessageBox throws an error if additional calls to Show are made while the original dialog is still open. Our application uses BackgroundWorker, so processes alerting the user to their completion is a normal activity. This can result in multiple modal dialogs showing up all at the same time, which is acceptable.

Until recently, we used the built-in WinForm MessageBox. We switched over to get the common look and feel. However, now we are getting this error: Form that is already visible cannot be displayed as a modal dialog box. Set the form's visible property to false before calling showDialog.

We don't want to go back to the ugly MessageBoxes, so it would be nice if there was a way for RadMessageBox to overcome this problem.

Thanks,
Travis Parks
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Apr 2021
7 answers
270 views

Hi everyone,

when a radmessagebox pops up , its not exactly on the center of screen .

How to align it to the center of screen?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 Dec 2018
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
Menu
RichTextEditor
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
Tabstrip (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Barcode
Styling
ColorBox
PictureBox
Callout
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
CalculatorDropDown
Localization
TimePicker
ValidationProvider
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?