|
-
Jun 2nd, 2000, 05:38 PM
#1
hi, i know nothing about using graphics in vb, so i have a couple of questions:
- how do i create a simple paint program so i could pick brush (image file) and smear it all over the place?
- i want to use a grid, so i could later add right click options to a specific square (or hex)
- how do i save and load my image (but no in a graphic methood, a simple location of each square in the grid)?
- i want to be able to determain the grid's x and y.
- i want to be able to put text on the image.
any help will be appreceated, what ever you know how to do please tell me.
thanks ahead.
Boaz zemeR
-
Jun 2nd, 2000, 08:19 PM
#2
To scribble on the drawing, you could use the SetPixel and LineTo API calls.
Code:
Declare Function SetPixel Lib "gdi32" Alias "SetPixel" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
Declare Function LineTo Lib "gdi32" Alias "LineTo" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
-
Jun 3rd, 2000, 02:10 AM
#3
Frenzied Member
I have created a simple paint program, I will sort the code out and stick it on the web soon, but!! I cannot make it so it saves the file to .bmp or whatever, any help??
-
Jun 3rd, 2000, 06:31 AM
#4
Use the SavePicture method to save it.
Code:
SavePicture Picture1.Picture, "C:\MyPic.bmp"
-
Jun 3rd, 2000, 04:11 PM
#5
Frenzied Member
Thanks Mate, I will try it now!!
-
Jun 3rd, 2000, 10:22 PM
#6
Here's another note. ImageBox's only save in BMP format. PictureBox's save in whatever format the original Picture was.
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
|