Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Win Display and Printer Settings
Message
From
08/03/1999 16:43:07
 
 
To
08/03/1999 15:45:42
Ian Matthews
Up & Running Technologies Inc
Chestermere, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00195227
Message ID:
00195350
Views:
14
>>>I would like to know code that will allow a user call the Windows Display Settings dialog box from a VFP button. Further, it would be nice if someone knew how to set the focus on the APPEARANCE tab.
>>>
>>>I would also like to know how to call the PRINTERS window and NETWORK NEIGHBOURHOOD.
>>>
>>
>>You can use several methods, none of them must use API calls. The Display Settings Dialog is a .CPL files, which can be launched by the internal RUN command (there was a thread on this several weeks back; the display applet would be RUN /N CONTROL DESK.CPL); the easiest way to access the Network Neighborhood (not the Network Properties sheet) is via the Shell.Application automation object's BrowseForFolder method (see my FAQ entry on an Enhanced GETDIR using the Shell.Application object). I suspect that the Printer Dialog is available from Shell.Application or Wscript.Shell, but I'm not certain of this; check the Shell Object and WshShell Object entries in the MSDN.
>>
>Thanx for the info.
>
>I now have the .CPL calls functioning. I have spent about 30 mins looking into SHELL.APP and BROWSEFORFOLDER but I can not figure out how to use it.
>

It's not Shell.App, it's Shell.Application, and there's sample code in the FAQ that I wrote under the heading Enhanced GETDIR() using Shell Object that shows how to use the BrowseForFolder method, and the meanings of the standard flags for controlling the dialog.

You might want to look at the Shell Object and its related topics in the MSDN; the methods ControlPanelItem, NameSpace and Open, and the ShellSpecialFolder constants can be used to access the Printers Folder. For example, to open the Printers Folder:

ox=CREATEOBJ('Shell.Application')
ox.open(4) && Opens the Printers Folder
ox.open(0x12) && Opens Network Neighborhood

It might be worthwhile to actually do some reading, since there's a tremendous capability in the Shell.Application object. IOW, RTFM.

>If someone knows the syntax that for getting NETWORK NEIGHBOURHOOD and/or PRINTERS windows to appear I would love to read it but these are not critical functions, so I am not going to spend anymore time on it myself.
>
>Thanx for the assistance.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform