Quick Search for:  in language:    
API,RES,Handling,File,Paths,programmer,should
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,290,928. lines
 Jobs: 203. postings

 How to support the site

 
Sponsored by:

 
You are in:
 

Does your code think in ink?
Login





Latest Code Ticker for Visual Basic.
Click here to see a screenshot of this code!Taskbar Icon With a Borderless Form
By Immortal Tako on 12/24

(Screen Shot)

ErrorManager
By Cyber Chris on 12/24


Open and Compact Protected Db
By Nicola La Rocca on 12/24


Click here to see a screenshot of this code![Winsock Simple Multiplayer Game]
By andrej Kolla on 12/24

(Screen Shot)

soundex_functio n
By Joseph Varghese on 12/24


QSort Program
By Bill Adams on 12/24


Click here to see a screenshot of this code!Latest E-Santa Greeting
By anoopsihag on 12/24

(Screen Shot)

Click here to see a screenshot of this code!Matrix Inverse and Transpose Calculator
By Vagelis Plevris on 12/24

(Screen Shot)

Click here to see a screenshot of this code!Class to draw a shaded frame to a form/image/pict ure
By Fosters on 12/24

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

More API for Beginners

Print
Email
 
winzip icon
Submitted on: 11/7/2003 3:45:58 PM
By: MrBobo  
Level: Beginner
User Rating: By 5 Users
Compatibility:VB 6.0

Users have accessed this code 649 times.
 

(About the author)
 
     Handling File Paths. The VB programmer should try to use the API wherever possible. It is usually faster and more memory efficient than most VB methods. We should also make use of .RES files rather than hard coding to reduce the amount of memory consumed by our applications. This little demo attempts to illustrate these concepts in the simplest possible way.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
3)Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 60 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
11/7/2003 7:57:52 PM:
I'm luckily to see your code again. 
Thanks to you for your sharing code..!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/8/2003 7:58:33 AM:Norm Cook
Thanks for sharing.  However, (1) RES 
files conserve no memory since they are 
compiled into the exe, the same as hard 
coded resources.  Plus there's the 
overhead of the LoadResData/String 
calls.  (2) The PathOnly function in 
your screen shot can be replaced with 
PathOnly = Left$(mPath, InStrRev(mPath, 
"\") - 1), which, on my box is about 10 
times faster & saves resources.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/8/2003 9:01:55 AM:MrBobo
Norm - No and Yes...
No - Res files DO 
conserve memory usage,"Performance and 
capacity are increased because strings, 
bitmaps, icons, and data can be loaded 
on demand from the resource file, 
instead of all being loaded at once 
when a form or a module is loaded." 
MSDN - and experience.
Yes - there 
is no "PathOnly" function via the API - 
only a FileOnly (PathStripPath) so in 
order to demonstrate API usage I used 
the FileOnly function with a bit of 
parsing.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/8/2003 9:10:37 AM:MrBobo
Continued...
Normally I would not use 
the API for Pathonly but instead parse 
the path.
The parsing method you 
mention however needs some tweaking - 
"C:\text" for example would return "C:" 
instead of the slightly more preferable 
"C:\". But your point is taken none the 
less. Thanks for the feedback.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/8/2003 9:16:08 AM:MrBobo
Continued...
As to the speed of 
functionality - normally these sort of 
routines are called once only within a 
Sub/Function and not repeatedly so any 
lag is insignificant. If they exist 
within a loop you should not make calls 
to other functions but include the code 
within the loop itself.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/9/2003 11:23:57 PM:Roger Gilchrist
5 * just 'cause the demo form is so 
well laid out
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/10/2003 6:46:53 AM:
Simply : EXCELENT
Clear, simply and 
lighting functional.
Five Stars for 
you. Thanks for sharing.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.