Solved

BROWSE_FOR_PRINTER

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
Updates not working for MS Windows 7 12 183
Spell Check in VB6 13 127
Create Files based on Cell Values in a Range in Excel 12 43
Sub or Function is not defined 6 43
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

821 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