Solved

BROWSE_FOR_PRINTER

Posted on 2000-03-03
3
246 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
[X]
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
  • 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JSON Response and request in VB6 application 11 1,032
vb6 connector to SQL Server 2 42
using web browser with BING 40 148
Collapse and expand table in Word 2010 2 154
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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 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…

737 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