Click here to Skip to main content
15,920,956 members
Home / Discussions / C#
   

C#

 
AnswerRe: Registry or Special Folders? Pin
Heath Stewart22-Dec-03 4:21
protectorHeath Stewart22-Dec-03 4:21 
Generalkeyboard event listener Pin
hazzem elrefai22-Dec-03 1:48
hazzem elrefai22-Dec-03 1:48 
GeneralRe: keyboard event listener Pin
hazzem elrefai22-Dec-03 1:49
hazzem elrefai22-Dec-03 1:49 
GeneralRe: keyboard event listener Pin
Heath Stewart22-Dec-03 4:16
protectorHeath Stewart22-Dec-03 4:16 
GeneralRe: keyboard event listener Pin
hazzem elrefai22-Dec-03 20:20
hazzem elrefai22-Dec-03 20:20 
GeneralRe: keyboard event listener Pin
Heath Stewart23-Dec-03 2:33
protectorHeath Stewart23-Dec-03 2:33 
Questionhow to set 8 px gap at front and back of the button's caption Pin
my_res22-Dec-03 1:27
my_res22-Dec-03 1:27 
AnswerRe: how to set 8 px gap at front and back of the button's caption Pin
Heath Stewart22-Dec-03 4:15
protectorHeath Stewart22-Dec-03 4:15 
If you need a Graphics object while not doing any painting, use the Button.CreateGraphics method (inherited from Control.CreateGraphics). See the documentation for MeasureString. It is an easy method to use and will calculate the SizeF (convert members to int when setting the appropriate properties) of the string, taking the Font into account:
Graphics g = button1.CreateGraphics;
SizeF s = g.MeasureString("Some Text", button1.Font);
button1.Width = (int)s.Width;
button1.Height = (int)s.Height;


 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralCSharp Certification Pin
Member 33502222-Dec-03 0:07
Member 33502222-Dec-03 0:07 
GeneralRe: CSharp Certification Pin
Kannan Kalyanaraman22-Dec-03 0:09
Kannan Kalyanaraman22-Dec-03 0:09 
GeneralRe: CSharp Certification Pin
Heath Stewart22-Dec-03 4:11
protectorHeath Stewart22-Dec-03 4:11 
GeneralProblem in opening Crystal Report after deploying with C# application in windows 98 Pin
KRathor21-Dec-03 20:09
KRathor21-Dec-03 20:09 
GeneralRe: Problem in opening Crystal Report after deploying with C# application in windows 98 Pin
Heath Stewart22-Dec-03 4:02
protectorHeath Stewart22-Dec-03 4:02 
GeneralEditor - HTML Pin
Member 37804121-Dec-03 18:29
Member 37804121-Dec-03 18:29 
GeneralRe: Editor - HTML Pin
Heath Stewart22-Dec-03 3:46
protectorHeath Stewart22-Dec-03 3:46 
GeneralRe: Editor - HTML Pin
Member 37804122-Dec-03 14:00
Member 37804122-Dec-03 14:00 
GeneralRe: Editor - HTML Pin
Heath Stewart23-Dec-03 2:31
protectorHeath Stewart23-Dec-03 2:31 
QuestionHow to make my program run in IE? Pin
nichen100121-Dec-03 14:17
nichen100121-Dec-03 14:17 
AnswerRe: How to make my program run in IE? Pin
Heath Stewart22-Dec-03 3:34
protectorHeath Stewart22-Dec-03 3:34 
GeneralRe: How to make my program run in IE? Pin
nichen100123-Dec-03 2:06
nichen100123-Dec-03 2:06 
GeneralRe: How to make my program run in IE? Pin
Heath Stewart23-Dec-03 2:41
protectorHeath Stewart23-Dec-03 2:41 
GeneralLooking for good C# book suggestions Pin
Flack21-Dec-03 14:12
Flack21-Dec-03 14:12 
GeneralRe: Looking for good C# book suggestions Pin
Colin Angus Mackay21-Dec-03 15:00
Colin Angus Mackay21-Dec-03 15:00 
GeneralRe: Looking for good C# book suggestions Pin
Nick Seng21-Dec-03 16:11
Nick Seng21-Dec-03 16:11 
GeneralRe: Looking for good C# book suggestions Pin
Charlie Williams21-Dec-03 17:26
Charlie Williams21-Dec-03 17:26 

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.