I tried the code you provided on a WinXP system. The code was placed in
the action event of a pushbutton and ran without error...
I believe RB code is intellegent enough to know the desktop folder of
the current user, so I'm not sure why you received the error.
Dim I,n as integer
Dim f as folderitem
F=volume(0).desktopfolder
N=f.count
If n>0 then
for I =1 to n
listbox1.addrow f.item(i).name
next
End if
-----Original Message-----
From: gettingstarted-bounces at lists dot realsoftware dot com
[mailto:gettingstarted-bounces at lists dot realsoftware dot com] On Behalf Of
Joseph Claeys
Sent: Friday, October 29, 2004 10:37 AM
To: 'Getting Started'
Subject: RE: desktopfolder
Thanks,
So is desktop folder still a property of the folderitem class on Windows
as the language reference suggests?
~ joe
-----Original Message-----
From: gettingstarted-bounces at lists dot realsoftware dot com
[mailto:gettingstarted-bounces at lists dot realsoftware dot com] On Behalf Of
Phil
Mobley
Sent: Friday, October 29, 2004 10:12 AM
To: Getting Started
Subject: Re: desktopfolder
On Oct 29, 2004, at 7:46 AM, Joseph Claeys wrote:
> I tried the follow code (from the language reference) using RB 5.5.3
> on WinXP(SP2)
>
> ...
>
> F=volume(0).desktopfolder
The Desktop Folder is a Macintosh invention. On Windows (especially W2K
and
higher) there is no concept of a volume desktop folder, hense the Nil
object. Instead, there is only a user space desktop folder.
In fact, it is rare even on the Macintosh to need to explicitly access
the DesktopFolder of a Volume. Most of the time you would want to
access the User Desktop folder which will be the ~/Desktop for OS X.
For OS 9, the DesktopFolder object automatically defaults to the
Volume(0).DesktopFolder (unless Multiple Users is enabled).
As Will mentioned, just use the DesktopFolder object.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|