Solved

BROWSE_FOR_PRINTER

Posted on 2000-03-03
3
243 Views
Last Modified: 2012-08-13
I have all the code necessary to browse for folders using the SHBrowseForFolder API call.  Works great!

All I have currently is:
Public Const BIF_RETURNONLYFSDIRS = &H1

I would like to have these too:
Public Const BIF_BROWSEFORCOMPUTER = ???
Public Const BIF_BROWSEFORPRINTER = ???

Shouldn't this information be found within API Viewer?  Anyways, does anyone have the hex codes to fill in my constants please?
0
Comment
Question by:PBuck
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
ocpgmbh earned 30 total points
ID: 2581263
Some API constant that ship with VB are not documented in the API Viewer.
To look up the constants you will need the header file shipped in Visual Studio 97 or in Visual C++ or in the Platform SDK.
Constant for the SH_BrowseForFolder API are in the file shlobj.h and are:

BIF_BROWSEFORCOMPUTER = &H1000
BIF_BROWSEFORPRINTER = &H2000

Good work.
0
 
LVL 4

Author Comment

by:PBuck
ID: 2581589
Thanks for the speedy response.  This is excellent information - found the shlobj.h

I have Visual Studio 6.0, is there a viewer (such as API Viewer within VB) for this header file?  Or is my only option is to load VC ++ to view this code?
0
 
LVL 4

Author Comment

by:PBuck
ID: 2581748
I hate to keep bugging you, but what I thought I had I didn't.  I have all the code present to browse for folders, I was thinking (or hoping) that all I had to do was replace the

Public Const BIF_RETURNONLYFSDIRS = &H1
    with
Public Const BIF_BROWSEFORPRINTER = &H2000

But, this did not work as planned.  Could you send some code that performs a Browse for printer.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

805 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