Remove the "x" in the window at runtime

Thread Solved
Reply

Join Date: Nov 2008
Posts: 11
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

 
0
  #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
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

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

 
0
  #2
Nov 14th, 2008
Hi,

Set this property for the form :
ControlBox = False

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 100
Reputation: squidd is an unknown quantity at this point 
Solved Threads: 2
squidd squidd is offline Offline
Junior Poster

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

 
0
  #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 Quick reply to this message  
Join Date: Nov 2008
Posts: 11
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

 
0
  #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 Quick reply to this message  
Join Date: Apr 2005
Posts: 15,986
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 507
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is online now Online
Moderator

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

 
0
  #5
Nov 16th, 2008
Yes. Just set Form1.controlbox = false
Last edited by jbennet; Nov 16th, 2008 at 4:56 pm.
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC