Solved

BROWSE_FOR_PRINTER

Posted on 2000-03-03
3
241 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

762 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

19 Experts available now in Live!

Get 1:1 Help Now