How can I get a Sizable window with only Close button (without Icon)?

F

FU.U.NA

How can I get a Sizable window with only Close button (without Icon)?




I know this question was duplicated many times.
But there is no clean answer at any question. (at least that I saw)

Please anybody answer this clearly!
This window style is using in OpenFileDialog window too. This must be
possible.

I don't want to use SizableToolWindow, it is not just fit to my
window's purpose. My window have to get the style "Iconless +
Closeable + Sizable".

Or any non-dotNet methods?
WIN32 API or NativeWindow class... and etcs.

I believe somebody knows this.
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (FU.U.NA) scripsit:
But there is no clean answer at any question. (at least that I saw)

Please anybody answer this clearly!
This window style is using in OpenFileDialog window too. This must be
possible.

I don't want to use SizableToolWindow, it is not just fit to my
window's purpose. My window have to get the style "Iconless +
Closeable + Sizable".

Or any non-dotNet methods?
WIN32 API or NativeWindow class... and etcs.

I am not sure if that's possible in a managed way. Maybe you will have
to set the window's style bits. You can find out the style bits you
will have to set using the Spy++ tool which comes with VS.NET.
 
S

Stoitcho Goutsev \(100\) [C# MVP]

Hi,

AFAIK there is no easy way to do that for normal window.
You can have only close button but you have to have system menu also. There
are window styles for maximize and minimize buttons, but not for the close
button.
IMHO the only way is to draw the caption bar yourself.
DrawFrameControl API can be used to make things a bit less painful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top