Page 4 of 5

Posted: Sun Sep 07, 2003 7:58 pm
by dmoc
Andre, thanks for the code archive, it make's a great reference. Just one suggestion, how about a "What's new" section? Also noticed some graphics files missing (I'll take note which next time I use it).

Posted: Sun Sep 21, 2003 1:16 pm
by Andre
dmoc wrote:Andre, thanks for the code archive, it make's a great reference. Just one suggestion, how about a "What's new" section? Also noticed some graphics files missing (I'll take note which next time I use it).
Probably I will add a "new" symbol to newly added codes in future versions.

Graphics are only included in the download archive, but (still) not listed on the website...

Get Special folders

Posted: Fri Sep 26, 2003 10:47 am
by high key
I didn't find a code for special folders in André's CodeArchive, so I converted the example from the API-Guide:

Code: Select all

Declare.s GetSpecialfolder(CSIDL)


#CSIDL_DESKTOP = 0
#CSIDL_PROGRAMS = 2
#CSIDL_CONTROLS = 3
#CSIDL_PRINTERS = 4
#CSIDL_PERSONAL = 5
#CSIDL_FAVORITES = 6
#CSIDL_STARTUP = 7
#CSIDL_RECENT = 8
#CSIDL_SENDTO = 9
#CSIDL_BITBUCKET = $A
#CSIDL_STARTMENU = $B
#CSIDL_DESKTOPDIRECTORY = $10
#CSIDL_DRIVES = $11
#CSIDL_NETWORK = $12
#CSIDL_NETHOOD = $13
#CSIDL_FONTS = $14
#CSIDL_TEMPLATES = $15




Structure shItemID
    cb.l
    abID.b 
EndStructure

Structure ItemIDlist
    mkid.shItemID
EndStructure


a$= "Start menu folder: " + GetSpecialfolder(#CSIDL_STARTMENU)
b$= "Favorites folder: " + GetSpecialfolder(#CSIDL_FAVORITES)
c$= "Programs folder: " + GetSpecialfolder(#CSIDL_PROGRAMS)
d$= "Desktop folder: " + GetSpecialfolder(#CSIDL_DESKTOP)
e$= "Startup folder: " + GetSpecialfolder(#CSIDL_STARTUP)

   
MessageRequester("Info",a$+Chr(13)+b$+Chr(13)+c$+Chr(13)+d$+chr$(13)+e$,0)



Procedure.s GetSpecialfolder(CSIDL)
   
    r = SHGetSpecialFolderLocation_(0, CSIDL, @IDL.ITEMIDLIST)
    If r = #NOERROR
        Path$ = Space(512)
        r = SHGetPathFromIDList_(IDL\mkid\cb, Path$)
        folder$ = Trim(Path$)        
       Else
        folder$="" 
    EndIf
    
    ProcedureReturn folder$
    
EndProcedure

Posted: Sat Sep 27, 2003 4:44 pm
by Andre
Thanks for this one ! Will be included in next release... :D

Normally I'm reading all the posts on english & german PB forum and include good codes in the archive.

If anyone of you want to see more of his own code examples (probably with needed [small!] gfx,sound files) in the code-archive, simply send to andre@purebasic.com Thanks !

Posted: Thu Oct 02, 2003 6:23 pm
by TronDoc
@André:
Don't get TOO MANY of these EXCELLENT examples in
your code archive! We will not have a reason to visit
the forums anymore nor the time to learn them all!
<joking> :lol: Joe

Posted: Fri Oct 03, 2003 9:45 pm
by Andre
TronDoc wrote:@André:
Don't get TOO MANY of these EXCELLENT examples in
your code archive! We will not have a reason to visit
the forums anymore nor the time to learn them all!
<joking> :lol: Joe
Not my problem. :lol: I'm already collecting to reach the 1000... :D

Posted: Wed Oct 08, 2003 1:14 am
by eddy
Now... :!:
Code Archiv will become very (x3) usefull for me.
I really need some good examples to understand how to work the new PB features. (COM, interfaces, etc..) 8O

For example, I have a tip to use clipboard in a Webgadget by using PB function "CALLCOM".
Is this function obsolete ?
Is there new solution ?

Posted: Wed Oct 08, 2003 11:22 am
by freak
> For example, I have a tip to use clipboard in a Webgadget by using PB function "CALLCOM".

I made an example of using IWebBrowser2 and WebGadget with the new
Interface stuff.

Here:
viewtopic.php?p=35682#35682

It should be easy to use for the clipboard stuff.

Timo

Posted: Sun Nov 02, 2003 10:40 pm
by Andre
Just in case, you haven't noticed it: :wink:

CodeArchive is now available as V1.6 with 914 PureBasic code examples. Go to www.PureArea.net for downloading... :D

Posted: Sun Nov 02, 2003 11:51 pm
by dmoc
Great stuff Andre, well done and thanks!

Re: Get Special folders

Posted: Mon Nov 03, 2003 12:29 am
by TronDoc
high key wrote:I didn't find a code for special folders in André's CodeArchive, so I converted the example from the API-Guide:

Code: Select all

MessageRequester("Info",a$+Chr(13)+b$+Chr(13)+c$+Chr(13)+d$+chr$(13)+e$,0) 

Code: Select all

MessageRequester("Info",a$+Chr(13)+b$+Chr(13)+c$+Chr(13)+d$+chr(13)+e$,0) 
chr$
I make this "mistake" too! :wink:
Joe

Posted: Sun Dec 28, 2003 6:56 am
by eddy
@Andre
You can update or correct some codes ?

Posted: Wed Dec 31, 2003 2:14 am
by Andre
eddy wrote:@Andre
You can update or correct some codes ?
Normally the CodeArchive will be released every 5-6 weeks in a new version.

If you have any suggestions, corrections or new codes to be added, simply send them me per email to andre@purearea.net Thanks!

for the next release ...

Posted: Sun Mar 28, 2004 4:57 am
by eddy
add :
- treeview editable
- listbox editable

viewtopic.php?t=10064
In the same post there's a link to a lisbox tip

Posted: Sun Mar 28, 2004 4:38 pm
by Andre
@Eddy: already noticed. :wink:

Next version will be released in April, but don't ask for a specific date :P