Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm working on a Image application...

 

I'm putting the code in a class:

 

But get "declaration expected" for the variable "g"

 

 

Imports System

Imports System.Windows.Forms

Imports System.Drawing

Imports System.Net

Imports System.IO

 

 

Public Class Image

 

Dim bmp As Bitmap = New Bitmap("Image.tif")

Dim g As Graphics = Graphics.FromImage(bmp)

Dim boldFont As Font = New Font("Times New Roman", 10, FontStyle.Bold)

 

g.DrawString("I'm A Button!", boldFont, Brushes.Black, 10.0f, 10.0f)

 

End Class

 

any ideas?

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