Click here to Skip to main content
16,013,730 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How can i unBind the Textbox control Programtically Pin
Vimalsoft(Pty) Ltd28-Jun-07 0:30
professionalVimalsoft(Pty) Ltd28-Jun-07 0:30 
Questiondsn creation Pin
Sonia Gupta27-Jun-07 20:27
Sonia Gupta27-Jun-07 20:27 
AnswerRe: dsn creation Pin
Vimalsoft(Pty) Ltd27-Jun-07 21:17
professionalVimalsoft(Pty) Ltd27-Jun-07 21:17 
AnswerRe: dsn creation Pin
Dave Kreskowiak28-Jun-07 4:41
mveDave Kreskowiak28-Jun-07 4:41 
Questionhelp... Pin
jhyn27-Jun-07 20:26
jhyn27-Jun-07 20:26 
AnswerRe: help... Pin
Sathesh Sakthivel27-Jun-07 20:29
Sathesh Sakthivel27-Jun-07 20:29 
QuestionRe: help... Pin
CPallini27-Jun-07 20:34
mveCPallini27-Jun-07 20:34 
Questionset font Size Pin
Rupesh Kumar Swami27-Jun-07 19:57
Rupesh Kumar Swami27-Jun-07 19:57 
hi everyone,
i want to create a PNG image with user specified string. width of image is Fix(170).i want to accept only 14 character(including space) in one row in PNG image.since each font occupy different space.so i want to know how can i set the size of user-selected font so it occupy only 14 character in single row of PNG image
my code sagment is following

 Dim g As Drawing.Graphics = Nothing<br />
        Dim bm_width As Integer = 170<br />
        Dim bm_height As Integer = 200<br />
<br />
        Dim newBitmap As Bitmap = New Bitmap(bm_width, bm_height, Imaging.PixelFormat.Format24bppRgb)<br />
        g = Drawing.Graphics.FromImage(newBitmap)<br />
        g.PageUnit = GraphicsUnit.Pixel<br />
        g.DrawImage(newBitmap, 0, 0, bm_width, bm_height)<br />
<br />
        g.FillRectangle(Brushes.White, 0, 0, bm_width, bm_height)<br />
        Dim b As Font<br />
        Dim a As New FontDialog<br />
<br />
        If a.ShowDialog = Windows.Forms.DialogResult.OK Then<br />
            b = a.Font<br />
        End If<br />
'here i want to change the size of user selected Font <br />
<br />
        g.DrawString(txtString.Text.Trim, b, Brushes.Black, 0, 0)<br />
        newBitmap.Save("c:\1.png", Imaging.ImageFormat.Png)


any help will be appreciated.

Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)

AnswerRe: set font Size Pin
CPallini27-Jun-07 20:40
mveCPallini27-Jun-07 20:40 
Questionhow to use VSS--suggest the best approach Pin
pashitech27-Jun-07 19:48
pashitech27-Jun-07 19:48 
AnswerRe: how to use VSS--suggest the best approach Pin
koolprasad200327-Jun-07 20:41
professionalkoolprasad200327-Jun-07 20:41 
GeneralRe: how to use VSS--suggest the best approach Pin
pashitech27-Jun-07 20:56
pashitech27-Jun-07 20:56 
GeneralRe: how to use VSS--suggest the best approach Pin
pashitech27-Jun-07 20:57
pashitech27-Jun-07 20:57 
GeneralRe: how to use VSS--suggest the best approach Pin
pashitech27-Jun-07 20:57
pashitech27-Jun-07 20:57 
QuestionHow to control mouse and keyboard? Pin
re infecta27-Jun-07 19:47
re infecta27-Jun-07 19:47 
AnswerRe: How to control mouse and keyboard? Pin
Dave Kreskowiak28-Jun-07 4:38
mveDave Kreskowiak28-Jun-07 4:38 
QuestionName 'Listbox1' is not declared error Pin
jasontor27-Jun-07 19:47
jasontor27-Jun-07 19:47 
AnswerRe: Name 'Listbox1' is not declared error Pin
CPallini27-Jun-07 21:58
mveCPallini27-Jun-07 21:58 
AnswerRe: Name 'Listbox1' is not declared error Pin
Dave Kreskowiak28-Jun-07 4:28
mveDave Kreskowiak28-Jun-07 4:28 
QuestionThe syntax about IDataReader? [modified] Pin
cateyes9927-Jun-07 15:37
cateyes9927-Jun-07 15:37 
AnswerRe: The syntax about IDataReader? Pin
TwoFaced27-Jun-07 18:45
TwoFaced27-Jun-07 18:45 
GeneralRe: The syntax about IDataReader? Pin
cateyes9927-Jun-07 19:31
cateyes9927-Jun-07 19:31 
Questionuhm hey ive got a question Pin
ricebowl0927-Jun-07 14:17
ricebowl0927-Jun-07 14:17 
AnswerRe: uhm hey ive got a question Pin
Christian Graus27-Jun-07 14:32
protectorChristian Graus27-Jun-07 14:32 
AnswerRe: uhm hey ive got a question Pin
Rupesh Kumar Swami27-Jun-07 19:15
Rupesh Kumar Swami27-Jun-07 19:15 

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.