Greetings!

How to remove the X button in the upper right corner of VB forms?

You can't remove only the X button you have to remove the control box, like this:

this.ControlBox = false

Do it still display the title bar?
I already removed the Maximize/Minimized and Restore.

The title bar will stay just the minimize.maximize, and close buttons will go.

OK thanks!

Member Avatar for Rahul47

Upon using this.ControlBox = False
It Says " Name 'this' is not declared."

I also tried that, but you may change that in the from's properties at design tab.

should be me.controlbox = false, or when in design view set the ControlBox property to false.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.