Click here to Skip to main content
15,890,946 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Replace-Funktion for controlcollection Pin
Dave Kreskowiak28-Apr-09 8:57
mveDave Kreskowiak28-Apr-09 8:57 
AnswerRe: Replace-Funktion for controlcollection Pin
Alan Burkhart28-Apr-09 18:46
Alan Burkhart28-Apr-09 18:46 
QuestionInserting into a link table when inserting using a grid Pin
Ekjon28-Apr-09 6:59
Ekjon28-Apr-09 6:59 
AnswerRe: Inserting into a link table when inserting using a grid Pin
Ekjon28-Apr-09 8:05
Ekjon28-Apr-09 8:05 
QuestionDataGridView - Date column [Get Input format dd/MM/yyyy] Pin
Paramu197328-Apr-09 6:39
Paramu197328-Apr-09 6:39 
AnswerRe: DataGridView - Date column [Get Input format dd/MM/yyyy] Pin
Mycroft Holmes28-Apr-09 15:57
professionalMycroft Holmes28-Apr-09 15:57 
QuestionResize text to fill textbox? Pin
Garfunkiel28-Apr-09 6:34
Garfunkiel28-Apr-09 6:34 
AnswerRe: Resize text to fill textbox? Pin
Dave Kreskowiak28-Apr-09 6:53
mveDave Kreskowiak28-Apr-09 6:53 
I've done soemthing like this before. Basically, there's no function that will do this for you and no way to tell what has been drawn and what hasn't. What I did was use MeasureString with a starting font size, see if it fit in an available space, and if not, reduce the font size and measure it again. Keep going until you reach either a minimum acceptable font size or the drawn text finally fits.

Warning! This method can be slow and reduce your app's performance.

In a second version of the app I did, I ended up drawing the text to a bitmap in a fixed-size, but larger, font, then drawing that bitmap to the screen scaled to the proper size. The final drawn text quality suffered a little bit from the scaling, but the performance was much better.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




AnswerRe: Resize text to fill textbox? Pin
Luc Pattyn28-Apr-09 6:55
sitebuilderLuc Pattyn28-Apr-09 6:55 
QuestionHow to implement UNDO/REDO in vb.net windows Pin
dilipmca0428-Apr-09 5:06
dilipmca0428-Apr-09 5:06 
AnswerRe: How to implement UNDO/REDO in vb.net windows Pin
Henry Minute28-Apr-09 5:14
Henry Minute28-Apr-09 5:14 
AnswerRe: How to implement UNDO/REDO in vb.net windows Pin
0x3c028-Apr-09 5:45
0x3c028-Apr-09 5:45 
AnswerRe: How to implement UNDO/REDO in vb.net windows Pin
Dave Kreskowiak28-Apr-09 6:48
mveDave Kreskowiak28-Apr-09 6:48 
QuestionX - Key as a shortcut creates problem when typing. Pin
Atul Kharecha28-Apr-09 2:38
Atul Kharecha28-Apr-09 2:38 
AnswerRe: X - Key as a shortcut creates problem when typing. Pin
Jay Royall28-Apr-09 2:44
Jay Royall28-Apr-09 2:44 
GeneralRe: X - Key as a shortcut creates problem when typing. Pin
Atul Kharecha28-Apr-09 2:51
Atul Kharecha28-Apr-09 2:51 
GeneralRe: X - Key as a shortcut creates problem when typing. Pin
Jay Royall28-Apr-09 2:58
Jay Royall28-Apr-09 2:58 
AnswerRe: X - Key as a shortcut creates problem when typing. Pin
Tom Deketelaere28-Apr-09 2:46
professionalTom Deketelaere28-Apr-09 2:46 
GeneralRe: X - Key as a shortcut creates problem when typing. Pin
Atul Kharecha28-Apr-09 3:58
Atul Kharecha28-Apr-09 3:58 
GeneralRe: X - Key as a shortcut creates problem when typing. Pin
Luc Pattyn28-Apr-09 4:05
sitebuilderLuc Pattyn28-Apr-09 4:05 
GeneralRe: X - Key as a shortcut creates problem when typing. Pin
Tom Deketelaere28-Apr-09 4:16
professionalTom Deketelaere28-Apr-09 4:16 
QuestionCropping a High Resolution Image in VB.Net 2008 Pin
wkitlam28-Apr-09 1:22
wkitlam28-Apr-09 1:22 
AnswerRe: Cropping a High Resolution Image in VB.Net 2008 Pin
Luc Pattyn28-Apr-09 1:27
sitebuilderLuc Pattyn28-Apr-09 1:27 
GeneralRe: Cropping a High Resolution Image in VB.Net 2008 Pin
wkitlam29-Apr-09 22:37
wkitlam29-Apr-09 22:37 
GeneralRe: Cropping a High Resolution Image in VB.Net 2008 Pin
Luc Pattyn30-Apr-09 0:56
sitebuilderLuc Pattyn30-Apr-09 0:56 

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.