Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Experts*
Posted

You could either calculate the width of a space, the width of the text, the width of the window, and pad the caption with spaces (which is the easiest thing to do), or owner-draw the form's border and caption bar by subclassing and capturing WM_NCPAINT.

 

If you want to do the first one, you need to use the Graphics.MeasureString method (use the Graphics object of the form, retrieved with Me.CreateGraphics()) to calculate the size of the text in the caption.

Posted
since it looks like ur just mimicing this Diablo thing, and it looks like the formborderstyle is set to non-resize why not just space it out manually unless the window is resizable
Posted

Winston: Because if you space it out manually then the title of the window on the tool bar will contain spaces as well.

 

Volte: I'm going to try out what you said right now.

"Reality is fake, Dreams are for real"
Posted
Winston: Because if you space it out manually then the title of the window on the tool bar will contain spaces as well.

 

Volte: I'm going to try out what you said right now.

 

 

no it doesnt

not for me it doesnt

it works perfectly

  • *Experts*
Posted
Actually, that was my suggestion too. And yes, you're right, it will contain spaces on the toolbar, but that's the price you pay. Why does it matter, anyway? That's not the way Windows isn't supposed to work.
Posted

Well screw Windows! lol :p

 

That price is too hard to pay :(

 

But in my screenshot, the guy doesn't have any spaces on the task bar. Now how could he have put spaces on the form, and not on the title of the taskbar?

"Reality is fake, Dreams are for real"
Posted

if ur judging just the screenshot

the window has no direct relation to the taskbar item

 

 

ok here's why

 

 

the text is different

the forms caption has different texts

taskbar is different too

 

the taskbar item has an icon

but the form doesnt

 

edit/

 

one more thing, are u sure this form isnt within the application itself

 

or is it entirely just the application itself

Posted

Well, I did it finally! You need Windows Media Player 9 though, because I used a WMP 9 codec I think. Well there's your evidence...(enjoy the mp3 I added too hehehe)

 

Evidence Video

 

Right-Click, and then hit Save As...

 

~2 MB by the way.

"Reality is fake, Dreams are for real"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...