[Request] UserAccounts.CommonDialog - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Request] UserAccounts.CommonDialog (/showthread.php?tid=62491)
[Request] UserAccounts.CommonDialog by Rene on 07-04-2006 at 08:27 AM
Hi,
I know how to Select one File from you'r own PC,
But how can i select an Folder from you'r own PC ?
I can't find any way to do this with
new ActiveXObject('UserAccounts.CommonDialog')
I'm sorry, but i'm not an professional with ActiveXObjects
RE: [Request] UserAccounts.CommonDialog by Volv on 07-04-2006 at 02:18 PM
quote: Originally posted by Eljay
code: var BrowseInfo = Interop.Allocate(32);
BrowseInfo.WriteDWORD(0, 0); //hOwner
BrowseInfo.WriteDWORD(4, 0); //pidlRoot
var foldertitle = Interop.Allocate((255+1) * 2);
BrowseInfo.WriteDWORD(8, foldertitle.DataPtr);
var sTitle = 'Test Window Title';
var pTitle = Interop.Allocate((sTitle.length+1) * 2);
pTitle.WriteString(0, sTitle, false);
BrowseInfo.WriteDWORD(12, pTitle.DataPtr);
BrowseInfo.WriteDWORD(16, 1); //ulFlags
BrowseInfo.WriteDWORD(20, 0); //lpfn
BrowseInfo.WriteDWORD(24, 0); //lparam
BrowseInfo.WriteDWORD(28, 0); //iImage
var pidl = Interop.Call('shell32', 'SHBrowseForFolder', BrowseInfo);
var folderpath = Interop.Allocate((255+1) * 2);
Interop.Call('shell32', 'SHGetPathFromIDList', pidl, folderpath);
Debug.Trace('Folder Path: ' + folderpath.ReadString(0, false));
Debug.Trace('Folder Title: ' + foldertitle.ReadString(0, false));
RE: [Request] UserAccounts.CommonDialog by Eljay on 07-04-2006 at 02:25 PM
much simpler way i found not long after i first posted that, although it uses activex not windows api
code: var objShell = new ActiveXObject("Shell.Application");
var objFolder = objShell.BrowseForFolder(0, "Select a folder:", 0, "C:\\");
RE: RE: [Request] UserAccounts.CommonDialog by Rene on 07-04-2006 at 03:01 PM
quote: Originally posted by Eljay
much simpler way i found not long after i first posted that, although it uses activex not windows api
code: var objShell = new ActiveXObject("Shell.Application");
var objFolder = objShell.BrowseForFolder(0, "Select a folder:", 0, "C:\\");
And how i know what of Folder is selected ..?
RE: RE: RE: [Request] UserAccounts.CommonDialog by craig2k5 on 07-04-2006 at 03:10 PM
quote: And how i know what of Folder is selected ..?
the part that says
quote: (0, "Select a folder:", 0, "C:\\");
maybe
RE: RE: RE: RE: [Request] UserAccounts.CommonDialog by Rene on 07-04-2006 at 03:12 PM
quote: Originally posted by craig2k5
quote: And how i know what of Folder is selected ..?
the part that says
quote: (0, "Select a folder:", 0, "C:\\");
maybe
When the user clicks on 'Ok' orso, then i must know what of director the user chose.
--
the one of Volv works fine
Thanx
RE: [Request] UserAccounts.CommonDialog by J-Thread on 07-04-2006 at 04:21 PM
People should learn to use MSDN
RE: RE: [Request] UserAccounts.CommonDialog by Rene on 07-04-2006 at 04:57 PM
quote: Originally posted by J-Thread
People should learn to use MSDN
I'm dutch my friend
And not the best in English.
RE: [Request] UserAccounts.CommonDialog by J-Thread on 07-04-2006 at 06:43 PM
I am Dutch too my friend, and it seems like you do know enough english to be able to understand the posts here. That implies you actually do have enough knowledge to be able to understand the MSDN too.
If you don't, you are IMHO not "good enough" to be a programmer.
RE: RE: [Request] UserAccounts.CommonDialog by Rene on 07-04-2006 at 06:48 PM
quote: Originally posted by J-Thread
I am Dutch too my friend, and it seems like you do know enough english to be able to understand the posts here. That implies you actually do have enough knowledge to be able to understand the MSDN too.
If you don't, you are IMHO not "good enough" to be a programmer.
Mm, not realy true, i'm programmer for 5 Years, so i can read a little bit english, but MSDN i don't know all of.
But i forget every time the MSDN orso, but i will add him on my bookmarks
And this discussion is not realy ontopic.
|