SaveAs dialog

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

SaveAs dialog

Postby pvanmil » Mon Jul 21, 2008 7:15 pm

I am testing with VpeCtrl40.OCX and Visual DataFlex. With the SaveFile dialog I only want to use the PDF export option. Is is possible to disable the .vpe (and the/html) option??

Peter van Mil
pvanmil
 
Posts: 18
Joined: Tue Jun 06, 2006 3:59 pm
Location: Maasland (NL)

Postby IDEAL Software Support » Tue Jul 22, 2008 8:18 am

You can not disable the other file types, but you have two options:

1) With VPE.SaveFileName = "*.pdf" you can pre-select the PDF file type, or with VPE.SaveFileName = "myfile.pdf" you can even pre-configure the whole file name and file type.

2) You can create your own file save dialog by catching the event VPE_BEFORE_SAVE_FILE, which is fired when the user clicks onto the save-button in the toolbar.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby Bas » Thu Nov 27, 2008 1:02 am

IDEAL Software Support wrote:2) You can create your own file save dialog by catching the event VPE_BEFORE_SAVE_FILE, which is fired when the user clicks onto the save-button in the toolbar.

Could you give an example of this in VB.NET?
There is some info in Chapter 29 of the DLL-reference.
But I can't figure out how to do it.

There are 2 things I would like to accomplish:
1) Showing only PDf as an option in the Save Dialog.
2) Make the right and left-click behave the same as in versions prior to v4.
(right to zoom out /left to zoom in)
Bas
 
Posts: 18
Joined: Mon Nov 07, 2005 3:35 pm
Location: Hellevoetsluis

Postby IDEAL Software Support » Thu Nov 27, 2008 9:43 am

1) Showing only PDf as an option in the Save Dialog.


This is beyond the scope of our free support. We are all C++ guys and would need to find out for ourselves.

2) Make the right and left-click behave the same as in versions prior to v4.
(right to zoom out /left to zoom in)


This is not possible by features provided by VPE. Maybe you can achieve that by hooking the window procedure of your form.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby Bas » Thu Nov 27, 2008 10:07 am

Could you then give a working example in C++, where this messages are catched?
Bas
 
Posts: 18
Joined: Mon Nov 07, 2005 3:35 pm
Location: Hellevoetsluis

Postby IDEAL Software Support » Thu Nov 27, 2008 8:30 pm

Examples on how to generically catch and handle events can be found in the demo source codes, which are shipped with VPE. There are examples in the .NET C# and VB.NET demo sources, as well as for C++. The samples do catch the RequestPrint event, but this is the same like catching the BeforeSaveFile event.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby Bas » Mon Dec 01, 2008 5:56 pm

I cannot find this in the demos.

None of the sources in all languages uses something like: RegisterWindowMessage

Also, RequestPrint is not one of the unmanaged messages.
Like the ones prefixed with: ")/$%" in chapter 29
Bas
 
Posts: 18
Joined: Mon Nov 07, 2005 3:35 pm
Location: Hellevoetsluis

Postby IDEAL Software Support » Mon Dec 01, 2008 6:34 pm

You can not find a call to RegisterWindowMessage() in the demo sources, because this function is only called by VPE to register the messages.

For using the VPE DLL, see vpedemo.cpp and search for "VpeMapMessage".

For the VPE ActiveX, search for "RequestPrint" in vpedemo.frm (in the Visual Basic directory).

For the VPE .NET component we have only demonstrated the handling of the AfterDestroyWindow event (since event handling is so common in .NET). Search for example for "AfterDestroyWindow" in Form1.cs of the C# .NET demo source codes.
IDEAL Software Support
 
Posts: 1633
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

cron