Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UNC Path in ListBox - HowTo?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00345388
Message ID:
00345861
Views:
19
>>>It's actually for selecting printers using the APRINTERS() array to populate a listbox. We've just identified a further problem that I'm posting for. SET PRINTER TO NAME \\server\path doesn't seem to work.
>>
>>Nigel,
>>
>>The Shell.Application's browse for folder method can be controlled to allow you to return just printers. Interested?
>
>I will be interested but not for this. We're close to phase 1 beta release for the product (end of March) and can't implement big changes at this stage.
>
After playing around I found that this doesn't want to work as I'd thought. If you do:
#define BIF_BROWSEFORPRINTER   0x2000
#define ssfPRINTERS 0x4
oShell = CREATEOBJECT('Shell.Application')
oShell.BrowseForFolder(0, "Select Printer", BIF_BROWSEFORPRINTER, ssfPRINTERS)
You'll get the printers folder, but you can't select anything.

However, if you use:
oFolder = oShell.BrowseForFolder(0, "Select Printer", BIF_BROWSEFORPRINTER)
? oFolder.Title
You have to select the printer from the Network Neighborhood and you get the cue name.

Either something's futzed with my machine or I don't understand this as well as I should. Nevermind...Sorry
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform