Forum Discussion
HKosova
14 years agoSmartBear Alumni (Retired)
Hi Rajesh,
Yes, you can do this. You'll need to create the OnShow event handler for your form (see Handling Events in User Forms for steps). In the event handling routine, set the Sender.BorderIcons property to 0 or an empty string. For example:
However, if you do this, make sure that you have added the close buttons to the form itself, otherwise, you'll end up with an unclosable form. For example, for the OK button, use TcxButton with the ModalResult property value of mrOk and the Default property set to True. For the Cancel button, you can use TcxButton with ModalResult of mrCancel and Cancel set to True.
Is it possible to remove the Close button from the screen (X - at right top corner).
Yes, you can do this. You'll need to create the OnShow event handler for your form (see Handling Events in User Forms for steps). In the event handling routine, set the Sender.BorderIcons property to 0 or an empty string. For example:
Sub UserForm1_OnShow(Sender)
Sender.BorderIcons = 0
' -- or --
Sender.BorderIcons = ""
End Sub
However, if you do this, make sure that you have added the close buttons to the form itself, otherwise, you'll end up with an unclosable form. For example, for the OK button, use TcxButton with the ModalResult property value of mrOk and the Default property set to True. For the Cancel button, you can use TcxButton with ModalResult of mrCancel and Cancel set to True.
Related Content
- 5 years ago
- 14 years ago
- 11 years ago
Recent Discussions
- 22 hours ago