|
-
Oct 30th, 2002, 01:05 PM
#1
Thread Starter
New Member
Windows Media Player
how can i check to see if there is a copy of windows media player running and then receive a message when it is done playing a file?
-
Oct 30th, 2002, 01:28 PM
#2
Frenzied Member
Well the first one is easy. Just check the registry for this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaPlayer
The second one, Im not so sure about Im afraid.
[edit] Hold on, I thought you wanted to check for an instalation directory. I have the api you need hold on...[/edit]
Last edited by TomGibbons; Oct 30th, 2002 at 01:44 PM.
-
Oct 30th, 2002, 01:34 PM
#3
Frenzied Member
VB Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_SHOWNORMAL = 1
Private Sub Command1_Click()
Dim WinWnd As Long
WinWnd = FindWindow(vbNullString, "Calculator") 'Put window captio here
If WinWnd > 0 Then
'This means it is running
ShowWindow WinWnd, SW_SHOWNORMAL 'Give it focus
End If
End Sub
That should do you.
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
|