Programmatically Accessing Windows Control Panel Options

Last reviewed: June 27, 1995
Article ID: Q105047
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a

In the Windows environment, colors, printers, and networks are accessed through the Windows Control Panel. You can directly open the dialog box for these items through your FoxPro programs by using the RUN /N command.

Below are some examples of the syntax you would use to access the Control Panel options. The text (name) below the Control Panel icons is what is typed following "CONTROL.EXE" in the commands.

NOTE: These commands will not work with Windows version 3.0. For example, the RUN /N CONTROL.EXE PRINTERS command will only run the Control Panel; it will not open the Printers dialog box.

To Change Printer Setup

   RUN /N CONTROL.EXE PRINTERS

To Change System Date and/or Time

   RUN /N CONTROL.EXE DATE/TIME

To Change Windows Desktop Colors and Screen Savers

   RUN/N CONTROL.EXE DESKTOP

To Connect or Change Network Drives

   RUN/N CONTROL.EXE NETWORK

REFERENCES

Online Help file, RUN command


Additional reference words: FoxWin 2.50 2.50a
KBCategory: kbprg kbenv kbcode
KBSubcategory: FxnetworkGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.