|
-
Jun 7th, 2006, 12:45 PM
#1
[RESOLVED] Shell II
-
Jun 7th, 2006, 01:01 PM
#2
Re: Shell II
hmmm does the same on mine.. and looking around the net.. thats the command!?
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jun 7th, 2006, 01:10 PM
#3
Re: Shell II
 Originally Posted by Static
hmmm does the same on mine.. and looking around the net.. thats the command!?
Hai static !
I just double checked now. result is same.
here i just copied the code again form the program.
VB Code:
Shell "RunDll32.exe shdocvw.dll,DoOrganizeFavDlg"
Any diffrents?
remark :- as soon as i launch the program it realy lists the favorites and next second it displays the desktop items.
-
Jun 7th, 2006, 01:19 PM
#4
Re: Shell II
Yep.. u are correct.. same thing happens here.
are u on a work pc? I wonder if its because of diff users... Very Odd!
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jun 7th, 2006, 01:30 PM
#5
Re: Shell II
No. it is my personal computer and only one account.
-
Jun 7th, 2006, 01:31 PM
#6
Re: Shell II
Got me!! lol.. ANyone else want to chime in on this one?
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jun 7th, 2006, 01:41 PM
#7
Re: Shell II
ok, this seems to work:
VB Code:
Private Const MAX_PATH As Long = 260
Private Const S_OK As Long = 0
Private Const SHGFP_TYPE_CURRENT As Long = &H0
Private Const CSIDL_FAVORITES As Long = &H6
Private Declare Function DoOrganizeFavDlg Lib "shdocvw" _
(ByVal hWnd As Long, _
ByVal lpszRootFolder As String) As Long
Private Declare Function SHGetFolderPath Lib "shfolder" _
Alias "SHGetFolderPathA" _
(ByVal hwndOwner As Long, _
ByVal nFolder As Long, _
ByVal hToken As Long, _
ByVal dwReserved As Long, _
ByVal lpszPath As String) As Long
Private Sub Command1_Click()
DoOrganizeFavDlg hWnd, GetFolderPath(CSIDL_FAVORITES)
End Sub
Private Function GetFolderPath(CSIDL As Long) As String
Dim sPath As String, sTmp As String
sPath = Space$(MAX_PATH)
If SHGetFolderPath(Me.hWnd, CSIDL, 0&, SHGFP_TYPE_CURRENT, sPath) = S_OK Then
GetFolderPath = Left$(sPath, InStr(sPath, Chr$(0)) - 1)
End If
End Function
Stripped down version of: http://vbnet.mvps.org/index.html?cod...shdocvwfav.htm
-
Jun 7th, 2006, 01:48 PM
#8
Re: Shell II
In fact, try just doing:
VB Code:
Private Declare Function DoOrganizeFavDlg Lib "shdocvw" ( _
ByVal hWnd As Long, _
ByVal lpszRootFolder As String) As Long
Private Sub Command1_Click()
DoOrganizeFavDlg Me.hWnd, vbNullString
End Sub
works on mine!
-
Jun 11th, 2006, 02:00 PM
#9
Re: Shell II
 Originally Posted by bushmobile
In fact, try just doing:
VB Code:
Private Declare Function DoOrganizeFavDlg Lib "shdocvw" ( _
ByVal hWnd As Long, _
ByVal lpszRootFolder As String) As Long
Private Sub Command1_Click()
DoOrganizeFavDlg Me.hWnd, vbNullString
End Sub
works on mine!
Hai bushmobile.
i feel i did not notify by mail of your last 2 posts. (but vbf is great)
i almost given up this thread. but unexpectedly i had to come with code from an out side forum. but i found your code (quoted) works just fine for me.
Thanks a lot!
Any way this is the code i bought from an outside forum.
VB Code:
Option Explicit
Private Const WM_COMMAND As Long = &H111
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetForegroundWindow Lib "user32.dll" (ByVal hwnd As Long) As Long
Private Sub Command1_Click()
Const lngMenuID As Long = 41330
Dim lngHWnd As Long
lngHWnd = FindWindow("IEFrame", vbNullString)
If lngHWnd Then
SetForegroundWindow lngHWnd
SendMessage lngHWnd, WM_COMMAND, lngMenuID, 0
End If
End Sub
This is the result on my XP - SPK1 machine.
after executing the code the Organize Favorites Dialog appears. then Hangs !!! an IExplorer Process is Created and It Utilizes CPU 100%.
any way i am stay with your code (coted above). it seems very simple. hope this would work in win9x as well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|