Enhancing the SHBrowseForFolder API Function

This code shows how to use the standard SHBrowseForFolder API function with a callback routine to set the initial directory.

Screen-shot

After reading the MSDN knowledge base article Q179378 "HOWTO: Browse for Folders from the Current Directory", I was able to figure out how to add a callback function that sets the starting directory and displays the currently selected path in the "Browse For Folder" dialog.

I used VB 6.0 (SP3) to compile this code. Should work in VB 5.0. However, because it uses the AddressOf operator this code will not work with versions below 5.0.

This code works in Window 95a so I assume it will work with later versions.


(Tested also under Win98/NT - works fine)


Usage:


    Dim folder as string
    '
    folder = BrowseForFolder(me, "Select A Directory", _
             "C:\startdir\anywhere")
    '
    If len(folder) = 0 then Exit Sub  'User Selected Cancel
    '

Download Zipped Files (5k)



Comments

  • Erectile Dysfunction (ED) Pills- Is Miss Your Eyesight Definitely Worth The Risk?

    Posted by acaeffifielm on 06/21/2013 08:03am

    Do That You Understand Permanent Cure for Erectile Dysfunction and Premature Orgasm? Naorem is a freelancer who writes on diverse aspects of male sexual health [url=http://rxhealth.pw ] danger of taking expired viagra [/url] read far more Precious Truths Regarding Herbal Treatments for Erectile Dysfunction

    Reply
  • vtkaKt BH to Wqu EHMu Ft

    Posted by WcGUSbYQCy on 06/20/2013 08:27pm

    buy tramadol no prescription overnight buy ultram online - tramadol hcl acetaminophen par

    Reply
  • Interesting

    Posted by snareenactina on 12/12/2012 04:31pm

    vance This alert also includes information on emerging issues such as: The course will aid students in understanding the linkages between the various sectors of the Nigerian economy. It also evaluates how each sector can be developed. Next time you make a prediction, please ensure you state that interest rate forecasts can change on a monthly basis. It is true in January we predicted a rise in interest rates, NOT TO 2% but up to 1%. After the events that took place in Japan and the turmoil in the middle east (some factors which have had an effect on trade and commerce), experts now predict a small rise of 0.25% by the end of the year. My prediction, no rise in 2011. But predictions change according to world events chochma My real estate agent, Bea Meriwether, is one of those real estate people who thrived in the days when the business was all about personality and people skills, like selling houses face-to-face and negotiating like a poker star. She still bakes chocolate chip cookies just to scent the air at open houses and carries an extra hanky for teary sellers saying good-bye to the family home. peibiao The Singapore Government and the NTUC have tried a range of programs to increase lagging productivity and boost the labour force participation rates of women and older workers. But labour shortages persist in the service sector and in many low-skilled positions in the construction and electronics industries. Foreign workers help make up this shortfall. In 2000, there were about 600,000 foreign workers in Singapore, constituting 27% of the total work force. As a result, wages are relatively suppressed or do not rise for all workers. In order to have some controls, the government imposes a foreign worker levy payable by employers for low end workers like domestic help and construction workers. theftif The Government initiated a policy of import substitution for industrialization to overcome unemployment and reduce the countries dependence on entrepot trade. The Economic Development Board (EDB) was formed in 1961; similarly Singapore Tourism Promotion Board (STPB) was started in 1964.The Jurong Industrial Estate was also established in 1961. groupwhite I reserved an economy car, since I am on a very tight budget. Received a compact car. I have to worry about gas costs. The car was dirty, and had a red stain on the front passenger floorboard, and one in the back on the same side.I had to wait at the counter for 5 min. for someone to come out of the back to wait on me.Luckily, 3 guys who work at the airport came up to talk to the clerk at the car rental counter right next to mine, and then they asked if I had been waited on.They were going to see where the clerk was, and about that time she came out. She acted bored to death, uncaring, and uninterested. She asked if I had rented from them before and while I took 2 seconds to think if I had , she put the contract in my face and told me where the car was.Next time I will ask what kind of car it is before I walk all the way out there dragging two suitcases and a backpack!I had no problem with the car or checking back in, or with paying for it. ekonomických Making the regulations is a proportionate way to address that effect. plasters PRINCETON, NJ -- The Gallup Economic Confidence Index was negative in all 50 states in the first half of 2012, but positive in the District of Columbia. West Virginia was by far the most negative, at -44. Minnesota edged out South Dakota and Maryland as the least negative state in the U.S., with an index score of -6, while the residents of the District of Columbia were solidly positive, at +29. households Looking specifically at economic globalization, it can be measured in different ways. These centre around the four main economic flows that characterize globalization:

    Reply
  • gIfBX qzv aywn

    Posted by bZCFBPEMfz on 11/16/2012 11:43am

    buy soma carisoprodol soma overdose - where to buy soma bikes

    Reply
  • eJwYh uts EtwU

    Posted by KpomCVSWdi on 11/14/2012 03:33am

    buy soma online can overdose carisoprodol - caridoxen naproxeno carisoprodol side effects

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • On-demand Event Event Date: October 29, 2014 It's well understood how critical version control is for code. However, its importance to DevOps isn't always recognized. The 2014 DevOps Survey of Practice shows that one of the key predictors of DevOps success is putting all production environment artifacts into version control. In this webcast, Gene Kim discusses these survey findings and shares woeful tales of artifact management gone wrong! Gene also shares examples of how high-performing DevOps …

Most Popular Programming Stories

More for Developers

RSS Feeds