an child form alway on top , or always on bottom

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

an child form alway on top , or always on bottom

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:14 pm

by Didier >> Mon, 12 Nov 2007 2:00:28 GMT

Hi:
In a MDI framework,is possible to keep a child form always on bottom? If can how to implement ?
didier
2007.11.12

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: an child form alway on top , or always on bottom

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:14 pm

by Allistar >> Mon, 12 Nov 2007 3:17:17 GMT

You could try this:

create form transient;
form.zOrder(1);
form.enabled := false;
form.show();

This should force a form to the background. One disadvantage is that it will not respond to any user events like click and keydown, so you won't be able to do much with it.

Allistar.
--
A.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: an child form alway on top , or always on bottom

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:14 pm

by BeeJay >> Mon, 12 Nov 2007 3:45:41 GMT

I have to ask, why do you want to do this?

ie: What are you actually wanting to achieve?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: an child form alway on top , or always on bottom

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:14 pm

by Didier >> Mon, 12 Nov 2007 5:38:20 GMT

We need one form works as background form--call it backform.

Put icons on the backform to illustrate the business workflow( eg. Purchase Order Icon, Goods Receipt Icon, Invoice Icon ...etc )

To Luanch Puchase Order Entry Form( which is a mdi child form too) only to click Purchase Order Icon on the backform.

now there are two child form--backform and purchase order entry form. we want backform always stays on bottom even it is actived( by clicking or keydowning the backform) .

The way Allistar provided cannot fulfil the requirement, for the backform is disabled.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: an child form alway on top , or always on bottom

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:14 pm

by BeeJay >> Mon, 12 Nov 2007 20:33:57 GMT

Assuming all your child forms inherit from a common parent, you could have your "workflow" form unload when one of the icon's is used. Then in the Form::unload event of the common parent form all your child forms inherit from ensure you redisplay your "workflow" form if there are no other child forms open currently.

Alternately, have you considered having your workflow icons on a toolbar on the main MDI frame instead? This may not work if you want to prevent your users working on more than one "workflow" at a time.

Cheers,
BeeJay.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: an child form alway on top , or always on bottom

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:14 pm

by Allistar >> Mon, 12 Nov 2007 21:05:20 GMT

I'd recommend taking a look at the Windows API function called SetWindowLong. This allows you to define more properties of a window than Jade exposes. Calling this from Jade is relatively straight forward. The trick is in knowing which values for "style" and "exStyle" to use. Google will assist, as will the MSDN documentation.

Allistar.
--
A.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 29 guests