Graphics class

Results 1 to 2 of 2

Thread: Graphics class

  1. #1
    Join Date
    Dec 1969

    Default Graphics class

    I have code to create a graphic dynamically on a page. Only problem is that for some reason Visual Studio will not recognise the Graphics class. I have included the System.Drawing namespace.<BR><BR>Any ideas? <BR><BR>Dim objBitMap As New Bitmap(800, 600)<BR>Dim objGraphics As Graphics<BR><BR>Dim i As Integer<BR>Dim objGraphics As Graphics = Graphics.FromImage (objBitMap)<BR><BR>objGraphics = Graphics.FromImage(objBitMap)<BR>objGraphics.Clear (Color.Black)<BR>Dim p As New Pen(Color.Salmon, 4)<BR>objGraphics.DrawLine(p, 10, 10, 100, 100)

  2. #2
    Join Date
    Dec 1969

    Default RE: add System.Drawing.Imaging

    Try adding both of the following namespaces:<BR><BR>&#060;%@ Import NameSpace= "System.Drawing" %&#062;<BR>&#060;%@ Import Namespace = "System.Drawing.Imaging" %&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts