RSS Forums RSS

Remove the "x" in the window at runtime

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Reply
Posts: 2
Reputation: MichaelSammels is an unknown quantity at this point 
Solved Threads: 0
MichaelSammels's Avatar
MichaelSammels MichaelSammels is offline Offline
Newbie Poster

Remove the "x" in the window at runtime

  #1  
Nov 14th, 2008
Hello,

This is my first post on DaniWeb, so I hope I did it OK.

Anyway, you'll notice that in the top of every window you have standard close button (the x in the red box).

I was wondering if it was possible to remove at this runtime, using VB6, so all I can see is the title bar?

Thanks
AddThis Social Bookmark Button
Reply With Quote  
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 119
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: Remove the "x" in the window at runtime

  #2  
Nov 14th, 2008
Hi,

Set this property for the form :
ControlBox = False

Regards
Veena
Reply With Quote  
Posts: 100
Reputation: squidd is an unknown quantity at this point 
Solved Threads: 1
squidd squidd is offline Offline
Junior Poster

Re: Remove the "x" in the window at runtime

  #3  
Nov 16th, 2008
What Veena said will work just fine, but you could also completely remove the entire border including the X at runtime by simply going to the BorderStyle property when your form is chosen and setting it to 0-None. This would also achieve the same result and then some...

Good luck.
Reply With Quote  
Posts: 2
Reputation: MichaelSammels is an unknown quantity at this point 
Solved Threads: 0
MichaelSammels's Avatar
MichaelSammels MichaelSammels is offline Offline
Newbie Poster

Re: Remove the "x" in the window at runtime

  #4  
Nov 16th, 2008
Ah yes - that is a very good idea, except I needed a border.

Out of interest, is it possible to set this style using code at runtime?
Thanks,

Michael
Reply With Quote  
Posts: 15,216
Reputation: jbennet is a glorious beacon of light jbennet is a glorious beacon of light jbennet is a glorious beacon of light jbennet is a glorious beacon of light jbennet is a glorious beacon of light jbennet is a glorious beacon of light 
Solved Threads: 455
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Remove the "x" in the window at runtime

  #5  
Nov 16th, 2008
Yes. Just set Form1.controlbox = false
Last edited by jbennet : Nov 16th, 2008 at 3:56 pm.
Master of puppets Im pulling your strings - blinded by me, you cant see a thing. Master! Master!

If i am helpful, please give me reputation points.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Views: 604 | Replies: 4 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:21 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC