Results 1 to 2 of 2

Thread: Num Lock...

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    Canada
    Posts
    8

    Question

    That little Icon thingie is really really kewl! Kudos to whoever came up with that idea and make it happen! It's PURE GOODNESS... but this has nothing to do with my problem, so moving right along.......
    I have written a VB program that is an alarm to rouse me in the wee hours of the morn! To do this it makes a shell call to Winamp (one of the best pieces of software I have ever seen!!!) and then uses the "Sendkeys" function to open the "Open File" dialogue in Winamp and to 'type' out the path and name of the file which is to be played in the morning! This is all well and good, and it works like a charm, but when SendKeys does send keys it turns off Num Locks and doesn't turn it back on. When I go to turn it back on, it takes some time and playing with the keys to get it back, it also seems to affect Caps & Scroll locks - keeping them both off! Does anyone know a way around this, or possibly a better way of telling winamp which file to play?
    Thanx,
    Jonathan
    Jonathan (Co President - Big Berdie International)
    Karl Moore RULEZ!
    "Pipers Do It With Amazing Grace!"

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    this way works as well....

    'don't use long file names...it won't work...'open a file with associated app can be done this way [using API]

    'open a file with it's associated application
    'this example opens an mp3 file with winamp


    'put this in a bas module
    '
    Public Declare Function ShellEx Lib "shell32.dll" Alias _
    "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
    ByVal lpFile As String, ByVal lpParameters As Any, _
    ByVal lpDirectory As Any, ByVal nShowCmd As Long) As Long
    '
    Sub ShellDef(strFileName)
    x = ShellEx(Form1.hwnd, "open", strFileName, "", "", 1)
    End Sub

    'this goes in your form

    Private Sub Command1_Click()
    ' >>> code for event on form <<<
    '
    Dim strYourFileVariable$
    strYourFileVariable = "c:\myfolder\myFile.mp3"
    ShellDef strYourFileVariable
    '=====================================
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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