Results 1 to 6 of 6

Thread: [RESOLVED] old PAINT BASIC graphics function equivalent in VB?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Resolved [RESOLVED] old PAINT BASIC graphics function equivalent in VB?

    I am editing an UserControl, And the perfect function I am looking for is to PAINT, the old BASIC PAINT function.

    like UserControl.paint (100,100), color, limitcolor

    any idea? how to fix the lack of PAINTING support?

  2. #2
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: old PAINT BASIC graphics function equivalent in VB?

    Hi flyguille,

    When in a Windows GUI environment, you have to decide what "object" you're drawing to, such as a form or a PictureBox.

    You can easily use a PictureBox and set its ScaleMode to pixels, and get very close. I believe, at that point, you'd just need to explore using the .LINE method of the PictureBox.

    Maybe that'll get you going. Also, there are other drawing methods for these types of things. I'd recommend exploring MSDN for the methods available on a PictureBox.

    Good Luck,
    Elroy
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: old PAINT BASIC graphics function equivalent in VB?

    Quote Originally Posted by Elroy View Post
    Hi flyguille,

    When in a Windows GUI environment, you have to decide what "object" you're drawing to, such as a form or a PictureBox.

    You can easily use a PictureBox and set its ScaleMode to pixels, and get very close. I believe, at that point, you'd just need to explore using the .LINE method of the PictureBox.

    Maybe that'll get you going. Also, there are other drawing methods for these types of things. I'd recommend exploring MSDN for the methods available on a PictureBox.

    Good Luck,
    Elroy
    you didn't understand, I already have an UserControl object.

    But, I want to use the old's BASIC FILL "PAINT" method, but it is not supported, only can draw LINES or RECTANGLES, or the border of CIRCLES!.

    I didn't find, how to drop paint in an area. fill it until the previous drawing outlines. that can be any shape figure.

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: old PAINT BASIC graphics function equivalent in VB?

    Sounds like the FloodFill API may be what you are after? Can you search the forum for that API name? Likely to find examples like this one, though that is a very simple example
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: old PAINT BASIC graphics function equivalent in VB?

    Ahhh, so you're wanting a "Fill" method?

    I'll let you search, but I've seen several of those developed in these forums.

    If it were me, I'd do a Google search with something like: site:vbforums.com "Visual Basic 6" fill draw

    I'd search for you, but I'm a bit busy at the moment.

    Good Luck With It,
    Elroy

    p.s. I see LaVolpe posted while I was typing. I'm glad, as he's quite good will all things related to drawing/painting.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: old PAINT BASIC graphics function equivalent in VB?

    thanks very much!

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