Advertisement

Results for "Author: sparq"

7_2009-2012 #221199
Get the UNC Path

Networked drives. They're an administrative nightmare. In fact, the average user changes his networked drive letters more often than his underwear. But you can solve this problem of binding an application to a particular drive by using a Universal Naming Convention (UNC) path. This still references a network area, but doesn’t tie it to any one drive letter. And you can retrieve and check the UNC of a particular path in code using this neat little function. To use it, simply call GetUNCPath, passing it your drive letter along with a pre-declared empty string. If a problem occurs, the relevant number is passed back with the function. These can be matched with the possible return code constants. However if everything goes swimmingly, the function returns a zero (a constant value of NO_ERROR) and places the UNC path into the ByRef-passed variable. This code works by making a call to the WNetGetConnection function in MPR.DLL. It's essentially a neat wrapper for a regular API call.

7_2009-2012 #221200
Access all aspects of your control panel from VB

Access all different aspects of your control panel (Add/Remove Programs, Mouse Control, etc..).

7_2009-2012 #221201
Get Hours, Minutes, AND Seconds between 2 Dates (or of total seconds)

This code will enable you to take two dates, find the total seconds in between them, and calculate the Hours, Minutes, and Seconds.

7_2009-2012 #221202
Distance Between Two Zip Codes. VERY LITTLE CODE!

This code allows you to input two zip codes, and find out the Distance (In Miles, Kilometers, and Nautical Miles). The Access Database was aqcuired on this site some time ago.. so thank you to whoever it was that posted it. :) Feedback is appreciated.. and Vote if you like it.

Languages
Top Categories
Global Discovery