Solved

Display Properties API?

Posted on 2002-07-03
5
220 Views
Last Modified: 2008-02-01
Can anyone provide the API or even suggest the .dll from which I can call the Display Properties Window??

Will this call be affected by any NT access restrictions?

Thanks

Jell
0
Comment
Question by:James Elliott
  • 3
  • 2
5 Comments
 
LVL 11

Expert Comment

by:joekendall
ID: 7127152
Which tab are you wanting to display? You can do this without declaring a DLL. You just need to use the Shell command. Here are the options you have:

Background Tab:
Shell(" rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0")

ScreenSaver Tab:
Shell("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,1")

Appearance Tab:
Shell("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,2")

Settings Tab:
Shell("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,3")

Thanks!

Joe
0
 
LVL 11

Expert Comment

by:joekendall
ID: 7127156
There is a space in the first one that should not be there. It should be:

Background Tab:
Shell("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0")


Thanks!

Joe

0
 
LVL 12

Author Comment

by:James Elliott
ID: 7127178
Thanks Joe, thats great.

Will the code bring up the properties window regardless of any access restrictions set by an NT administrator?

Is their a list of the windows you can shell from the shell32.dll and their respective parameters?

Thanks

Jell
0
 
LVL 11

Accepted Solution

by:
joekendall earned 100 total points
ID: 7127220
I logon as an administrator so I'm not sure about restrictions.

The list of windows you mention are in this case called cpl's. They are applets. Yes, you can shell many more of them. I believe any that you find in the Control Panel can be shelled.

Thanks!

Joe
0
 
LVL 12

Author Comment

by:James Elliott
ID: 7127229
Thanks for your help
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now