Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Is there a way to centralize the text inside a msgbox automaticaly?

 

like this:

       The second line appears in the middle of
               the messagebox

 

and not this:

       The second line appears on the left side
of the messagebox.

 

thanks!

Posted

i dont like the idea of fake msgboxes i fink its not controllable

i mean ull have a label obviously

 

and the thing is wat happens if the scale of the amount of text is so much then wouldnt the text be unseen , i mean the other half of it, cause how would the form automatically resize itself to the right size for the text

  • *Experts*
Posted

You would need to code in the resizing yourself...

 

Also, you don't NEED to use a label; you could use the GDI+ (System.Drawing)

to draw the text and image.

  • *Experts*
Posted

You say you don't like the idea of "fake" messagebox's, but what you want is a non-standard messagebox. Or, to put it differently, you really don't want a message box at all :)

 

If you decide to code your own, you can use the Graphics object's measurestring method to get the size of text to make sure your label will be big enough. Actually, you can change the size of your form and assuming you set the anchor property of the label, the label will resize automatically.

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

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...