Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Printed Form Interception

Forum

Search UsersRules
Printed Form Interception
#1
Active user
Points:: 0
Joined:: Sep 16, 2011

I have the following task: There is a command which should handle opened printed forms, how can I enumerate them?

Profile
#2
Active user
Points:: 1
Joined:: Jul 20, 2011

There is a solution for the managed application mode. You can use GetWindows() function to enumerate the opened windows and then check in some way if this window contains the printed form. For example you can add a caption part “PrintedForm” for all windows with printed forms.
The part of the printed form generation code:

Code
//{{_PRINT_WIZARD(Print)
Spreadsheet = New SpreadsheetDocument;
...
Spreadsheet.Show("PrintedForm");
//}}
The command to handle opened windows:
&AtClient
Procedure ProcessPrintedFormWindows(Command)
    OpenedWindows = GetWindows();
    For Each Window In OpenedWindows Do
        WindowCaption = Left(Window.Caption, 11);
        If WindowCaption = "PrintedForm" Then
            // Your code here
        EndIf;
    EndDo;
EndProcedure

This won't work in the Ordinary Application mode.

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.