PureBasic Code-Archive v1.6
- Andre
- PureBasic Team
- Posts: 2137
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Probably I will add a "new" symbol to newly added codes in future versions.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).
Graphics are only included in the download archive, but (still) not listed on the website...
Get Special folders
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
- Andre
- PureBasic Team
- Posts: 2137
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Thanks for this one ! Will be included in next release...
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 !

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 !
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 ?

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 ?

> 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
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
quidquid Latine dictum sit altum videtur
- Andre
- PureBasic Team
- Posts: 2137
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Just in case, you haven't noticed it:
CodeArchive is now available as V1.6 with 914 PureBasic code examples. Go to www.PureArea.net for downloading...

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

Re: Get Special folders
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)
I make this "mistake" too!

Joe
peace
[pI 166Mhz 32Mb w95]
[pII 350Mhz 256Mb atir3RagePro WinDoze '98 FE & 2k]
[Athlon 1.3Ghz 160Mb XPHome & RedHat9]
[pI 166Mhz 32Mb w95]
[pII 350Mhz 256Mb atir3RagePro WinDoze '98 FE & 2k]
[Athlon 1.3Ghz 160Mb XPHome & RedHat9]
- Andre
- PureBasic Team
- Posts: 2137
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Normally the CodeArchive will be released every 5-6 weeks in a new version.eddy wrote:@Andre
You can update or correct some codes ?
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 ...
add :
- treeview editable
- listbox editable
viewtopic.php?t=10064
In the same post there's a link to a lisbox tip
- treeview editable
- listbox editable
viewtopic.php?t=10064
In the same post there's a link to a lisbox tip
