Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Opening Printers Container from VB app

Posted on 2003-11-09
3
179 Views
Last Modified: 2010-05-01
I wrote a VB app that does all kinds of stuff.

I want to add an option to click on a button and have the printers container (from control panel) open up, preferable in the same window.

How can this be done?
0
Comment
Question by:visitmeoo
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
zzzzzooc earned 100 total points
ID: 9709542
The below works in XP. I'm not sure about other OS'.

Private Sub Form_Load()
    Call Shell("control.exe printers", vbMaximizedFocus)
End Sub
0
 
LVL 17

Expert Comment

by:zzzzzooc
ID: 9709548
This may work in Win9x:

Private Sub Form_Load()
    Call Shell("rundll32.exe shell32.dll,Control_RunDLL main.cpl @2", vbMaximizedFocus)
End Sub
0
 

Author Comment

by:visitmeoo
ID: 9709794
The solution that I accepted works in W2K.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

837 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