Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Line command in Public Sub?

staceystacey Member Posts: 72
Hello all,

It seems that you cannot use the line, circle, pset etc. commands inside a public sub. I want to make a "library" of simple drawings (e.g. a square, an ellipse etc.) using these simple commands and then to just call them whenever i want to draw a shape on my form... How can i do this?
(I'm using Visual Basic 6)
Thanx...

- stacey

Comments

  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    : Hello all,
    :
    : It seems that you cannot use the line, circle, pset etc. commands inside a public sub. I want to make a "library" of simple drawings (e.g. a square, an ellipse etc.) using these simple commands and then to just call them whenever i want to draw a shape on my form... How can i do this?
    : (I'm using Visual Basic 6)
    : Thanx...
    :
    : - stacey
    :
    :
    You can use them anywhere as long as you've included the right headers. VB is VERY strange in the way it does things. I suggest writing a small demo in notepad, compiling it with the command-line compiler, and seeing if it works there. It should, and if it does it'll prove that VB is messing your app up somehow. I have friends who've sent me VB code that wouldn't work, I removed the VB-specific BS, compiled with Borland, and it works perfectly, yet they still couldn't get it working. I don't think the Visual series are perfect ANSI versions of the languages and you may need to check your help files for more info.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

Sign In or Register to comment.