Focusing a preview

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Focusing a preview

Postby Bengt » Fri Sep 05, 2014 8:24 am

I would like to bring a preview that is behind another window to the front. How can that be done?

For choosing between several printouts, I open a panel from my order entry view and press a button on the panel for previewing the desired document. To minimize mouse clicking, I then close the panel by a program statement which means that the order entry view will be focused hiding the preview. Is there a way to bring the preview to the front in this situation?

Bengt
Bengt
 
Posts: 89
Joined: Fri Jan 27, 2006 5:29 pm

Re: Focusing a preview

Postby IDEAL Software Support » Mon Sep 08, 2014 12:27 pm

I don't know, what programming language you are using.

If you are using the VPE Control (i.e. for .NET, Delphi VCL, Java or as ActiceX), see the method Focus(). An alternative way is, to embed the VPE preview within a form window of your application, and to handle the focus of the form with the methods provided by your development language / framework.

When using the VPE DLL, retrieve the Window handle of the VPE preview window with VpeWindowHandle() and call the Windows API function BringWindowToTop().
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: Focusing a preview

Postby Bengt » Mon Sep 08, 2014 4:23 pm

I use VisualDataflex 17.1 and DPE4VDF. Retrieving the Window handle of the VPE preview window with VpeWindowHandle() works, but it doesn't seem to be possible to call BringWindowToTop() fore some reasons. I tried with SetFocus() instead but it had no effect.
Bengt
 
Posts: 89
Joined: Fri Jan 27, 2006 5:29 pm

Re: Focusing a preview

Postby IDEAL Software Support » Mon Sep 08, 2014 4:33 pm

We are no experts for the Visual DataFlex development environment. I recommend you contact a forum or a person with such skills.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 14 guests