Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove icon from VB6 form but leave Close

Status
Not open for further replies.

RookPSU

Programmer
Jan 9, 2003
20
US
How do you achieve this?

I want to remove the icon from my VB6 form without removing the control box, specifically the close (X) button.

API Call?

 
Hi RookPSU

Change the Borderstyle on the form in question to one of:
4 - Fixed ToolWindow
5 - Sizable ToolWindows

As an alternative (havent tried this but think it should still work) - create a transparent icon file with nothing in it and associate this as the icon on the form ...

Hope this helps ...
 
Thanks, but I'm confident there is a legitimate way to achieve this.

I don't want the thin border style nor do I want the form title to be seemingly indented due to a transparent icon.

 
>I'm confident there is a legitimate way to achieve this

What makes you confidant of this?

>legitimate

What is 'illegitimate' about the settings PS42 mentions? I'll grant the suggestions may not be what you want. But illegitimate?
 
I preface by saying I genuinely appreciate PS42's contributions however the are in a sense "work arounds" which, while coming close, don't achieve the appearance I am looking for.

I'm confident because I've seen the form presentation before.
 
Sure, the presentation you've seen before is described in Microsoft's 'Official Guidelines for User Interface Developers and Designers' - it is what they describe as a 'secondary' window. But secondary windows theoretically have certain limitations. The settings you can make in VB reflect the legal (in the sense that they adhere to the guidelines) options.

Just eliminating the System menu icon (i.e the form icon) requires disabling the system menu (or eliminatin all the menu entries). Either way, the rest of the Windows title furniture is affected - specifically the close X will be eliminated

You'll probably have to resort to an ownerdraw control to achieve what you want ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top