Click here to Skip to main content
15,915,757 members
Home / Discussions / C#
   

C#

 
AnswerRe: Arguments! C# Pin
Pete O'Hanlon3-Jun-09 3:59
mvePete O'Hanlon3-Jun-09 3:59 
GeneralRe: Arguments! C# Pin
Baeltazor3-Jun-09 4:04
Baeltazor3-Jun-09 4:04 
GeneralRe: Arguments! C# Pin
Nagy Vilmos3-Jun-09 4:12
professionalNagy Vilmos3-Jun-09 4:12 
GeneralRe: Arguments! C# Pin
Pete O'Hanlon3-Jun-09 4:28
mvePete O'Hanlon3-Jun-09 4:28 
GeneralRe: Arguments! C# Pin
Nagy Vilmos3-Jun-09 4:37
professionalNagy Vilmos3-Jun-09 4:37 
GeneralRe: Arguments! C# Pin
Luc Pattyn3-Jun-09 6:09
sitebuilderLuc Pattyn3-Jun-09 6:09 
GeneralRe: Arguments! C# Pin
0x3c03-Jun-09 4:18
0x3c03-Jun-09 4:18 
AnswerRe: Arguments! C# [modified] Pin
Luc Pattyn3-Jun-09 4:06
sitebuilderLuc Pattyn3-Jun-09 4:06 
GeneralRe: Arguments! C# Pin
Nagy Vilmos3-Jun-09 4:14
professionalNagy Vilmos3-Jun-09 4:14 
GeneralRe: Arguments! C# Pin
Luc Pattyn3-Jun-09 4:16
sitebuilderLuc Pattyn3-Jun-09 4:16 
GeneralRe: Arguments! C# Pin
Nagy Vilmos3-Jun-09 4:22
professionalNagy Vilmos3-Jun-09 4:22 
GeneralRe: Arguments! C# Pin
Baeltazor3-Jun-09 4:20
Baeltazor3-Jun-09 4:20 
GeneralRe: Arguments! C# Pin
Baeltazor3-Jun-09 4:28
Baeltazor3-Jun-09 4:28 
Questionthis.Refresh Pin
gwithey3-Jun-09 3:50
gwithey3-Jun-09 3:50 
AnswerRe: this.Refresh Pin
NickPace3-Jun-09 4:00
NickPace3-Jun-09 4:00 
GeneralRe: this.Refresh Pin
gwithey3-Jun-09 4:15
gwithey3-Jun-09 4:15 
GeneralRe: this.Refresh Pin
S. Senthil Kumar3-Jun-09 5:08
S. Senthil Kumar3-Jun-09 5:08 
QuestionAutomatically sizing a button based off data source Pin
EliottA3-Jun-09 3:46
EliottA3-Jun-09 3:46 
AnswerRe: Automatically sizing a button based off data source Pin
Henry Minute3-Jun-09 5:32
Henry Minute3-Jun-09 5:32 
1) Get a Graphics object from the control that will host the text
Graphics gr = menuButton1.CreateGraphics();


2) Use the MeasureString method of the Graphics object obtained above
SizeF buttonTextSize = gr.MeasureString("yourstring", menuButton1.Font, etc......);


Can't remember all params, look it up.

Add required margin size to buttonTextSize.Width, and Bobs your Aunties' SO.

[Edit]
Don't forget to dispose the Graphics object when done
[/Edit]

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

GeneralRe: Automatically sizing a button based off data source Pin
EliottA3-Jun-09 5:39
EliottA3-Jun-09 5:39 
AnswerRe: Automatically sizing a button based off data source Pin
Moreno Airoldi3-Jun-09 5:40
Moreno Airoldi3-Jun-09 5:40 
GeneralRe: Automatically sizing a button based off data source Pin
EliottA3-Jun-09 5:54
EliottA3-Jun-09 5:54 
QuestionTransform non english words to a unique representation Pin
HZ_793-Jun-09 2:30
HZ_793-Jun-09 2:30 
AnswerRe: Transform non english words to a unique representation Pin
Uwe Keim3-Jun-09 2:36
sitebuilderUwe Keim3-Jun-09 2:36 
GeneralRe: Transform non english words to a unique representation Pin
HZ_793-Jun-09 2:48
HZ_793-Jun-09 2:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.