OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: velasquez on December 04, 2008, 02:01:01 PM

Title: Drawing in PictureBox - 4.1.2.2
Post by: velasquez on December 04, 2008, 02:01:01 PM
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?
Title: Re: Drawing in PictureBox - 4.1.2.2
Post by: velasquez on December 05, 2008, 05:13:35 AM
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?
Title: Re: Drawing in PictureBox - 4.1.2.2
Post by: velasquez on December 05, 2008, 11:30:45 AM
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. 
 
Title: Re: Drawing in PictureBox - 4.1.2.2
Post by: BazzaCAD on December 05, 2008, 05:45:47 PM
Thx I'll look into it.
Title: Re: Drawing in PictureBox - 4.1.2.2
Post by: owenwengerd on December 06, 2008, 10:52:41 AM
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?
Title: Re: Drawing in PictureBox - 4.1.2.2
Post by: velasquez on December 06, 2008, 12:50:32 PM
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.