OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: velasquez on February 11, 2011, 11:19:25 AM

Title: Question PictureBox_LoadPictureFile
Post by: velasquez on February 11, 2011, 11:19:25 AM
OpenDCL 6.0.1.3 Windows 7

I am working with the method PictureBox_LoadPictureFile see below.

;;;(dcl_PictureBox_LoadPictureFile ControlBar-6_Form2_PictureBox1 Filename [as String] {Stretch [as Boolean]})
Code (autolisp) Select

(dcl_PictureBox_LoadPictureFile ControlBar-6_Form2_PictureBox1 "C:\\fundo.bmp" T)


When the stretch value for T is the smaller image should not fit a larger PictureBox?
This is not happening.
Title: Re: Question PictureBox_LoadPictureFile
Post by: Fred Tomke on February 16, 2011, 10:45:17 PM
Hello, velasquez,

I have no experience in that topic, that's why I didn't answer yet.
Would you be so kind to create a small sample that explains it?
So it can be helpful for debugging, troubleshooting and maybe bugfixing in the Runtime source code.

Thanks, Fred
Title: Re: Question PictureBox_LoadPictureFile
Post by: krunch on February 17, 2011, 01:32:06 AM
Just a remark : to change the Picture of a PBox it's simpler tu load them in the .odcl then to use the Picture property
Title: Re: Question PictureBox_LoadPictureFile
Post by: Fred Tomke on February 17, 2011, 03:37:52 AM
Hello, krunch,

yes, you are right for the case, that the images do not vary and they are very small in their file size that the odcl project wouldn't get so huge that loading the project file would would cause a recognizable delay.
I use the LoadPicture method, too, for such a very special case, but I do not stretch them.

Regards,
Fred
Title: Re: Question PictureBox_LoadPictureFile
Post by: velasquez on February 17, 2011, 04:54:20 AM
Hello Fred,
I posted an example.
See the image is adjusted in width but is not adjusted in height.
This is the correct function to stretch.

Regards,
Velasquez
Title: Re: Question PictureBox_LoadPictureFile
Post by: velasquez on February 17, 2011, 05:11:30 AM
Quote from: velasquez on February 17, 2011, 04:54:20 AM
Hello Fred,
I posted an example.
See the image is adjusted in width but is not adjusted in height.
This is the correct function to stretch.

Regards,
Velasquez

Sorry.
This is the correct function to stretch?
velasquez


Title: Re: Question PictureBox_LoadPictureFile
Post by: Fred Tomke on February 17, 2011, 05:23:11 AM
Hi vela, I'm missing the background.bmp.
Fred
Title: Re: Question PictureBox_LoadPictureFile
Post by: Fred Tomke on February 17, 2011, 05:57:19 AM
Hi, vela, have a look at my sample and resize the form. I cannot find any problem with 6.0.2.1.
Fred
Title: Re: Question PictureBox_LoadPictureFile
Post by: velasquez on February 17, 2011, 08:37:29 AM
Quote from: Fred Tomke on February 17, 2011, 05:23:11 AM
Hi vela, I'm missing the background.bmp.
Fred

Sorry Fred.
I posted the picture now.

Velasquez
Title: Re: Question PictureBox_LoadPictureFile
Post by: Fred Tomke on February 17, 2011, 01:55:48 PM
Hi velasquez, have you already tried my sample?

Fred
Title: Re: Question PictureBox_LoadPictureFile
Post by: velasquez on February 18, 2011, 03:38:27 AM
Quote from: Fred Tomke on February 17, 2011, 01:55:48 PM
Hi velasquez, have you already tried my sample?

Fred


Yes Fred,
I expected the image to be resized to the entire space of PictureBox.

Thanks
Velasquez
Title: Re: Question PictureBox_LoadPictureFile
Post by: velasquez on February 18, 2011, 03:58:13 AM
Quote from: velasquez on February 18, 2011, 03:38:27 AM
Quote from: Fred Tomke on February 17, 2011, 01:55:48 PM
Hi velasquez, have you already tried my sample?

Fred


Yes Fred,
I expected the image to be resized to the entire space of PictureBox.

Thanks
Velasquez

Thanks for the replies Fred.
I wanted to work with a background image to any size of PictureBox.
But I think this will not be possible with Stretch in PictureBox_LoadPictureFile.

Best Regards






Title: Re: Question PictureBox_LoadPictureFile
Post by: Fred Tomke on February 18, 2011, 05:47:47 AM
Hi velasquez, ah you expected the image to be stretched not proportional but OpenDCL only stretches the image proportional.

Fred