-
Aug 17th, 2017, 12:47 PM
#1
Thread Starter
Fanatic Member
[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?
-
Aug 17th, 2017, 01:11 PM
#2
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.
-
Aug 17th, 2017, 01:22 PM
#3
Thread Starter
Fanatic Member
Re: old PAINT BASIC graphics function equivalent in VB?
Originally Posted by Elroy
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.
-
Aug 17th, 2017, 01:35 PM
#4
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
-
Aug 17th, 2017, 01:35 PM
#5
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.
-
Aug 17th, 2017, 01:39 PM
#6
Thread Starter
Fanatic Member
Re: old PAINT BASIC graphics function equivalent in VB?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|