Page 1 of 1

backbrush

Posted: Fri Aug 07, 2009 12:45 pm
by ConvertFromOldNGs
by anon >> Wed, 5 Jan 2005 7:58:25 GMT

Hello all

What can i use to have a backbrush sit as is and not multiply to fit the screen and stay this way whatever screen size it may be viewed on ( i suppose that also incorporates screen resolution also)

Cheers everyone

Re: backbrush

Posted: Fri Aug 07, 2009 12:45 pm
by ConvertFromOldNGs
by Ray >> Mon, 10 Jan 2005 20:40:44 GMT

Hi,

If you're referring to a non-MDI Frame form, then one way to place a background without having it multiply is to place it using a Picture control, just remember to set its 'borderStyle' property to 0, which will remove all the borders.

You can manipulate the position of the Picture control in the resize event method on the form if you would like to center the Picture in the form, or by changing the 'stretch' property of the Picture, you can make the background image stretch to the size of the form.

Unfortunately, this does not seem to work if your form is an MDI Frame, as it imposes on the MDI child area of the frame. You could try using the drawPictureAt/drawPictureIn methods in the 'paint' method of the form to draw the image though.

Ray

Re: backbrush

Posted: Fri Aug 07, 2009 12:45 pm
by ConvertFromOldNGs
by allistar >> Tue, 11 Jan 2005 1:00:00 GMT

You can get around this limitation by using the Form::setBackDrop method.

Before this method was available it was possible to create an MDI child form that contains the picture, created like this:

backWashForm.zOrder(1);
backWashForm.width := clientWidth;
backWashForm.height := clientHeight;
backWashForm.enabled := false;
backWashForm.show();

This can also be used as a mechanism to place controls (such as graphs, buttons etc) on the MDI frame form without them chewing into the area other MDI child forms use. This also prevents the backwash form from appearing in the "Window" menu.

Regards,
Allistar.
--
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------