943,704 Members | Top Members by Rank

Ad:
Nov 14th, 2008
0

Remove the "x" in the window at runtime

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
MichaelSammels is offline Offline
36 posts
since Nov 2008
Nov 14th, 2008
0

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

Hi,

Set this property for the form :
ControlBox = False

Regards
Veena
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Nov 16th, 2008
0

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

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.
Reputation Points: 10
Solved Threads: 2
Junior Poster
squidd is offline Offline
100 posts
since Nov 2007
Nov 16th, 2008
0

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

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?
Reputation Points: 10
Solved Threads: 0
Light Poster
MichaelSammels is offline Offline
36 posts
since Nov 2008
Nov 16th, 2008
0

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

Yes. Just set Form1.controlbox = false
Last edited by jbennet; Nov 16th, 2008 at 4:56 pm.
Moderator
Featured Poster
Reputation Points: 1764
Solved Threads: 574
Moderator
jbennet is offline Offline
16,501 posts
since Apr 2005

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: (calc) Subtraction code with VB6
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: simple data combo doubt!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC