Results 1 to 5 of 5

Thread: Line, Circle, Scale and PSet Methods

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    I'm Making a Controll similar to the Picturebox Control but with more stuff, I'm trying to add the line circle, scale etc methods to it.

    The Line Method Works if you use this code

    Code:
    Public Sub Line(ByVal Flags As Integer, ByVal X1 As Single, ByVal Y1 As Single, ByVal X2 As Single, ByVal Y2 As Single, ByVal Color As Long)
    Picture1.Line (X1, Y1)-(X2, Y2), Color
    End Sub
    Meaning you can call it like this
    Code:
    usrExtendedPctBox.Line(0,0)-(100,100),vbWhite
    or using any other method that works with the standard line method

    Does anyone know how I can do this for the PSet, Scale and Circle Methods?

    Thanks

    [Edited by Sam Finch on 06-21-2000 at 11:55 AM]

  2. #2
    Guest
    I'm guessing that you can make a Circle with the same method as the Line but omit the X2 and Y2. Replace it with the Radius instead.

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    By the way, i think There's optional BF flags following the color in line method, how do you get those into function? Also there's the optional keyword STEP before each (
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    554
    Kedaman:
    The BF tag is for BOX-FILLED and when you specify different values for both the X1, X" and Y1, Y2 values (think of it as type RECT) then you get a FILLED box as opposed to just a border.

    And the step is for stepping - basic method for drawing
    dotted/dashed lines, and even columns/rows


    Sam:
    The PSET value SETS-PIXEL, and therefore if you wish to draw lines must use a loop to loop to through the inbetween values...

    'draw horzontal line 100 pixels long
    for x=1 to 100
    pset(x,10)
    next

    ps I don't know if PRESET is still about or whether its supported by VB but one sets a pixel foreground color and the other a pixel background color.

    DocZaf
    {;->

    Question:
    Hey guy's how are your skills with regards to creating dll's? I use vb5 with sp3 and want to know how to create dll or active dll and can i use an active-x dll the same way as a winapi dll?

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Zaf Khan! What? I know that! Heheh, Were talking about making methods work like that, not how to use them

    You create a dll by starting an activeX dll project, work on it, and then compile it. To use it in other project, add it in project references.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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