Results 1 to 2 of 2

Thread: Graphics at form load with VB.Net

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2004
    Posts
    62

    Unhappy Graphics at form load with VB.Net


    Can anyone help with a graphics problem when using VB.net 2003.
    I wrote code using VB6 which generated a "Magic Circle".


    [Highlight=VB]
    Private Sub Command1_Click()
    Dim dblNumbers(1 To 11) As Double
    Dim dblPairs(1 To 5) As Double
    For n = 1 To 11
    dblNumbers(n) = n

    Next n
    n = 1
    Select Case n
    Case Is = 1
    x = 1
    Y = 2
    For z = 11 To 7 Step -1
    dblPairs(x) = Y + z
    Debug.Print x

    Debug.Print Y
    Debug.Print z
    Debug.Print dblPairs(x)
    x = x + 1
    Y = Y + 1
    Next z
    End Select






    End Sub

    Private Sub Form_Load()
    Circle (88.5032, 88.5032), 10
    Circle (88.5032, 88.5032), 50
    Circle (88.5032, 88.5032), 60
    Line (88.5032, 78.5032)-(88.5032, 38)
    Line (88.5032, 98.5032)-(88.5032, 138.5032)

    Line (117.893, 48.052)-(94.381, 80.413)
    Line (136.056, 73.052)-(98.014, 85.413)
    Line (136.056, 103.954)-(98.014, 91.953)
    Line (117.893, 128.954)-(94.381, 96.593)
    Line (59.114, 128.954)-(82.625, 96.593)
    Line (40.95, 103.954)-(78.993, 91.593)
    Line (40.95, 73.052)-(78.993, 85.413)
    Line (59.114, 48.052)-(82.625, 80.413)
    End Sub

    I tried converting this to VB.Net. But only the text is visible at form load but non of the graphics.

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Graphics are COMPLETELY different in VB.net.

    You'd be better of finding a VB.Net book and learning graphics aspects that way just to get the basics down.

    I recommend "VB.Net Tips and Tricks".

Posting Permissions

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



Click Here to Expand Forum to Full Width