Results 1 to 3 of 3

Thread: Windows Start Menu

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    23

    Unhappy

    Hi. I am currently making a replacment shell for windows. In visual basic. Now i've like looked at every replacment shell arround to see if they could import the start menu but know one can. I need to be able to load up the start menu in my shell. Otherwise ther is no point really is there? Please help as soon as possible.

    Thanks Bye... xxx...

    Shell Beta available at http://www.c-interactive.co.uk under Bubbles...
    Rember to visit my website at www.c-interactive.co.uk

  2. #2
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    554
    Okay, firstly this is not y code, and therefore UNTESTED by yours truly, but i'm sure it'll help....


    Dev. Library - Code - Get Special Folder Paths
    Please note that folders that are virtual (such as the Control Panel) will not return a path


    Module Code
    Name: Module1


    Option Explicit
    Declare Function SHGetSpecialFolderLocation Lib "Shell32.dll" _
    (ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As ITEMIDLIST) As Long
    Declare Function SHGetPathFromIDList Lib "Shell32.dll" Alias "SHGetPathFromIDListA" _
    (ByVal pidl As Long, ByVal pszPath As String) As Long
    Public Type SHITEMID
    cb As Long
    abID As Byte
    End Type

    Public Type ITEMIDLIST
    mkid As SHITEMID
    End Type
    Public Const MAX_PATH As Integer = 260

    Public Function fGetSpecialFolder(CSIDL As Long) As String
    Dim sPath As String
    Dim IDL As ITEMIDLIST
    '
    ' Retrieve info about system folders such as the "Recent Documents" folder.
    ' Info is stored in the IDL structure.
    '
    fGetSpecialFolder = ""
    If SHGetSpecialFolderLocation(Form1.hwnd, CSIDL, IDL) = 0 Then
    '
    ' Get the path from the ID list, and return the folder.
    '
    sPath = Space$(MAX_PATH)
    If SHGetPathFromIDList(ByVal IDL.mkid.cb, ByVal sPath) Then
    fGetSpecialFolder = Left$(sPath, InStr(sPath, vbNullChar) - 1) & "\"
    End If
    End If
    End Function


    Form Code
    Name: Form1


    Private Const CSIDL_DESKTOP = &H0 '// The Desktop - virtual folder
    Private Const CSIDL_PROGRAMS = 2 '// Program Files
    Private Const CSIDL_CONTROLS = 3 '// Control Panel - virtual folder
    Private Const CSIDL_PRINTERS = 4 '// Printers - virtual folder
    Private Const CSIDL_DOCUMENTS = 5 '// My Documents
    Private Const CSIDL_FAVORITES = 6 '// Favourites
    Private Const CSIDL_STARTUP = 7 '// Startup Folder
    Private Const CSIDL_RECENT = 8 '// Recent Documents
    Private Const CSIDL_SENDTO = 9 '// Send To Folder
    Private Const CSIDL_BITBUCKET = 10 '// Recycle Bin - virtual folder
    Private Const CSIDL_STARTMENU = 11 '// Start Menu
    Private Const CSIDL_DESKTOPFOLDER = 16 '// Desktop folder
    Private Const CSIDL_DRIVES = 17 '// My Computer - virtual folder
    Private Const CSIDL_NETWORK = 18 '// Network Neighbourhood - virtual folder
    Private Const CSIDL_NETHOOD = 19 '// NetHood Folder
    Private Const CSIDL_FONTS = 20 '// Fonts folder
    Private Const CSIDL_SHELLNEW = 21 '// ShellNew folder

    Private Sub form_load()
    MsgBox "Desktop Folder " & fGetSpecialFolder(CSIDL_DESKTOPFOLDER)
    MsgBox "Recent Folder " & fGetSpecialFolder(CSIDL_RECENT)
    '// etc...
    End Sub


    Class Code
    Name: Class1


    (None)

    DocZaf
    {;->

  3. #3
    Guest
    mhh... i don't have tested this , but you can try to find the handle of the startmenu, if you got the handle -> use the SETPARENT - API and set the startmenues parent to the form, which replace the shell. now you can use the movewindow API to set the pos of the startmenu.


    hope that helps


    taLON

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width