Drawing in PictureBox - 4.1.2.2

Started by velasquez, December 04, 2008, 02:01:01 PM

Previous topic - Next topic

velasquez

Hi 
I am having a great problem with drawing in PictureBox I worked with dcl_PictureBox_DrawRect and later dcl_PictureBox_StoreImage. 
I posted two images to show before and after a picture is dragged on the other. 
Did anybody already see this?

velasquez

Hi 
I discovered that the problem with dcl_PictureBox_StoreImage aconte why am I working inside with dcl_PictureBox_DrawRect of the event of OnPaint of PictureBox. 
The dcl_PictureBox_DrawRect event doesn't work inside of OnInitialize. 
Does anybody know a form to deceive this?

velasquez

Hi 
I found a way for dcl_PictureBox_DrawRect and dcl_PictureBox_StoreImage they work when a ModalForm is shown. 
See the functions below in the files that I posted. 
 
(defun c:Methods_DemoMethods_OnInitialize... 
(defun c:Methods_DemoMethods_PictureBox4_OnPaint... 
(defun c:Methods_ViewHtm_OnClose... 
(defun c:Methods_ViewHtm_OnInitialize... 
(defun c:Methods_DemoMethods_Dragging_OnClicked... 

 
I changed Methods.odcl and lsp to show this.

Attention -> PictureBox after the tests should have 1x1 pixel and to be transparent.

I hope this can help in some work. 
 

BazzaCAD

a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

owenwengerd

Have you determined whether there is a bug with respect to picture box drawing, or is it just a case of doing things in the correct context?
Owen Wengerd (Outside The Box) / ManuSoft

velasquez

This was a way that I found to use the drawing functions correctly in PictureBox when a form is opened. 
They don't work in OnInitialize.