Results 1 to 2 of 2

Thread: Control Panel Applets

  1. #1

    Thread Starter
    Addicted Member bbosh's Avatar
    Join Date
    Oct 2000
    Location
    Hell (AKA New Mexico)
    Posts
    186
    How do I run them? Im using
    Code:
    Private Sub lstWinCP_DblClick
       FileMng.Run "C:\Windows\control.exe c:\windows\system\" + lstWinCP.List(lstWinCP.ListIndex) + ".cpl"
    End Sub
    Public Sub Run(CommandLine As String)
        Dim retval As Long, L As Single
        For x = 1 To Len(CommandLine)
            If Mid$(CommandLine, x, 1) = "\" Then ItsDir = Left(CommandLine, x)
            If Mid$(lcase$(CommandLine), x, 4) = ".exe" Then Exit For
        Next x
        Switchs = InStr(LCase$(CommandLine), ".exe")
        If Switchs > 0 And switches + 3 > Len(CommandLine) Then
            Param = Right(CommandLine, Len(CommandLine) - (Switchs + 5))
            CommandLine = Left(CommandLine, Switchs - 1)
        Else
            Param = ""
        End If
        retval = ShellExecute(frmMain.hwnd, "open", CommandLine, Param, ItsDir, SW_RESTORE)
        L = Timer
        While L + 4 > Timer
        DoEvents
        Wend
        frmTaskBar.Toolbar.Buttons.Clear
        frmTaskBar.LoadTaskList
    End Sub
    But that doesn't work. I've also tried calling the cpls w/o control.exe in front, but that doesn't seem to work either.

    [EDITED TO FIX TWO BUGS IN RUN PROCEDURE]

    [Edited by bbosh on 11-02-2000 at 08:31 PM]
    Brian
    Programming: VB5 Pro (SP3) - QBasic 1.1,4.5
    Internet: HTML 4, CSS, JavaScript
    Visit AltInt.com!

  2. #2
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    I believe the path used to call them is
    Code:
    c:\windows\rundll32.exe shell32.dll,Control_RunDLL FileName,Command Line Arguments
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

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