shaba
Jun 6th, 2000, 05:42 AM
Hi!
i am using the GetCursorPos API to create a very simple paint program. I have a picturebox in my form and i look for a mousedown event. As long as the mouse is down, the getcursorpos api tracks the location of the cursor. It worked when i had the x,y locations displaying to two labels. But then i tried to use the pset function to draw a pixel at each x,y location. This is the part that doesnt work. The dots drawn in the picture box are offset from the real position of my mouse pointer. It also seems that it is offset by a very specific amount. i have the scalemode property of the picture box set to pixels. I also tried the SetPixelV API, but i get the same exact problem. The dots are offset from the real cursor position.
please let me know whats wrong.
shaba
i am using the GetCursorPos API to create a very simple paint program. I have a picturebox in my form and i look for a mousedown event. As long as the mouse is down, the getcursorpos api tracks the location of the cursor. It worked when i had the x,y locations displaying to two labels. But then i tried to use the pset function to draw a pixel at each x,y location. This is the part that doesnt work. The dots drawn in the picture box are offset from the real position of my mouse pointer. It also seems that it is offset by a very specific amount. i have the scalemode property of the picture box set to pixels. I also tried the SetPixelV API, but i get the same exact problem. The dots are offset from the real cursor position.
please let me know whats wrong.
shaba