Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling the Printer Setup (sys1037)
Message
From
06/10/1997 12:47:06
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00053068
Message ID:
00053416
Views:
25
>>>>In my vfp50 program and in one of my menu options,
>>>>I make a called to sys(1037) which is my Printer
>>>>Setup function. The Printer Setup FORM opens,
>>>>but it is not centered on the screen. Does anybody
>>>>know how to center this FORM?
>>>
>>>Robert,
>>>
>>>I don't believe you can control the behavior of SYS(1037). However, if you were to use the Common Dialogs ActiveX control, you can (somewhat) control the positioning of the Printer Setup Dialog (it's the same one you get with SYS(1037)). It's (the dialog) position will be relative to the position of the control (even though the control is invisible). You also can retrieve information from it (something you can't do with the SYS() function).
>>>
>>>HTH.
>>>
>>>George
>>Hi George and thanks for answering.. Would you please give
>>me an example of how to use the Common Dialogs ActiveX
>>control... thanks ... :)
>
>Robert,
>
>It's really rather simple. Create a form with .Visible, .ControlBox, .MaxButton, .MinButton all equalling .F. Drop the Common Dialogs control on it. Give the form a name, like DlgsForm. The position of the form/control will dictate where on the screen it will appear. It will be to the right and below it. Then save it to a class library with an appropriate name, say, CmmnDlgs. Now once the class library is set, use:
>
>oDlgs = CREATEOBJECT("CmmnDlgs")
>
>Set the flags to display the printer setup, rather than Page Setup.
>
>oDlgs.DlgsForm.Flags = 64
>
>To display the printer setup dialog: oDlgs.DlgsForm.ShowPrinter()
>
>HTH,
>
>George
I did what you said and could not get it to work. Maybe you left out a step.

1. I made my FORM call dlgsform with the buttons you said.
2. Save AS class called "Cmmmdlgs
3. put oDlgs = CREATEOBJECT("cmmndlgs") into my main.prg and added PUBLIC oDlgs
4. put oDlgs .dlgsform.flags=64 - I get an error when compiling that says UNKNOW MEMBER dlgsform.
5. in the click event of a comand buton, I coded oDlgs.Dlgsform.showprinter()
Do you know what is wrong?

Thanks rob
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform