Solved

Opening Printers Container from VB app

Posted on 2003-11-09
3
178 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

785 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