Results 1 to 5 of 5

Thread: simple question!!1

  1. #1

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606

    Unhappy

    How can i read from the start menu????

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    Try going to the directory where the start menu is kept. e.g. "c:\windows\start menu"
    Iain, thats with an i by the way!

  3. #3
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    You can scan c:\windir\start menu with the dir function. This explains how to use the dir function: http://msdn.microsoft.com/library/de...8/vafctDir.htm

  4. #4
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    You read it with your eyes.

    Actually, you can read files from the Start Menu directory, like the other said.
    This is usually C:\Windows\Start Menu.
    But sometimes it is not, for example, on localized versions of windows, the directory name is "Start Menu" in another language.

    Here's a fail-proof way to get the correct Start Menu directory:
    Code:
    Option Explicit
    
    Private Declare Function SHGetSpecialFolderLocation Lib "Shell32" (ByVal hWndOwner As Long, ByVal nFolder As Long, ppIDList As Long) As Long
    Private Declare Function SHGetPathFromIDList Lib "Shell32" Alias "SHGetPathFromIDListA" (ByVal pIDList As Long, ByVal pszPath As String) As Long
    
    Private Const CSIDL_STARTMENU = &HB
    Private Const MAX_PATH = 260
    Private Const NOERROR = 0
    
    Function GetStartMenuPath() As String
        Dim pIDList As Long, lPos As Long
        
        If SHGetSpecialFolderLocation(0, CSIDL_STARTMENU, pIDList) = NOERROR Then
            GetStartMenuPath = String(MAX_PATH, vbNullChar)
            If SHGetPathFromIDList(pIDList, GetStartMenuPath) Then
                lPos = InStr(GetStartMenuPath, vbNullChar)
                If lPos > 0 Then GetStartMenuPath = Left(GetStartMenuPath, lPos - 1)
                If Not Right(GetStartMenuPath, 1) = "\" Then GetStartMenuPath = GetStartMenuPath & "\"
            End If
        End If
    End Function

  5. #5

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606

    who ooo

    tanx a lot YONATAN

    That's what i was looking for.
    You're right cuz me i work with windows NT and the start menu is in c:\winnt\profiles\sebastien\startmenu

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