i need to detect of an onother appcliaction is open or closed
is there a way to know this
if yes please help me
Printable View
i need to detect of an onother appcliaction is open or closed
is there a way to know this
if yes please help me
you could find its window to see if it is present. do you know the program that you want to find? you may be able to just open the .exe. if it works, then it's not locked (in use)
yes i tought the same thing but
won't this be anoying for the user ???
can they see that the prgram opens or won't they zee anything???
and how do you close another apllication???
i know witch program i need to detect and i want to create some sort of online status so it wil be executed with a timer
What about the FindWindow API?
k please explain to me how to use it because i'm not very good with using dll files
if i just can detect of the file CoDMP.exe is open or not then i have evrything i need
this file contains a game
VB Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Dim Ret as String Dim WinWnd as long Ret = InputBox("Enter the exact window title:" + Chr$(13) + Chr$(10) + "Note: must be an exact match") 'Search the window WinWnd = FindWindow(vbNullString, Ret) If WinWnd = 0 Then MsgBox "Couldn't find the window ..."
k thanx
this works
but wath about programs that are active but has no open windows icon in taskbar
I'm guessing now but this might help
Create a new project and add a multiline textbox with a scrollbar.
VB Code:
'Add this code to a form Private Sub Form_Load() 'KPD-Team 2000 'URL: [url]http://www.allapi.net/[/url] 'E-Mail: [email][email protected][/email] 'Set the form's graphics mode to persistent Me.AutoRedraw = True 'call the Enumwindows-function EnumWindows AddressOf EnumWindowsProc, ByVal 0& End Sub Option Explicit 'Add this code to a module Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Boolean Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Boolean Dim sSave As String, Ret As Long Ret = GetWindowTextLength(hwnd) sSave = Space(Ret) GetWindowText hwnd, sSave, Ret + 1 Form1.Text1.Text = Form1.Text1.Text & Str$(hwnd) + " " + sSave & vbCrLf 'continue enumeration EnumWindowsProc = True End Function
it say's invalid use of AddressOf
Did you put the first part in the forms code and the second part(from option explicit down) in a module?
ok
no errors now i did not put the finction in a module only the diclaire functions
now it works but i see this
Text1 1181150
1115694
65664
394544
526200
459816
524428
460450
394904 SysFader
12059132
65672
591778
65650
65648
65646
65668 CiceroUIWndFrame
196678
131158
131298
460072
329402
197998
132472 Emoticon popup
525572
65684
66682
132202
66060
65734 Logitech_HiddenMessageWnd_E1000FE7-BFF5-4746-9792-218C4CE4851D
65726 Logitech Camera Control
65722
65716 CiceroUIWndFrame
65712 TF_FloatingLangBar_WndTitle
65710
131154 ALSMTray
65574 NetDDE Agent
66578
262660 Volgende
788056 Start
1770978 Code Window (Break)
3540502 Form1
1377876
1640078
1377752
1902214
1705568
1705570
2885112
198124
263540 Project1 - Microsoft Visual Basic [run]
263578 Project1 - Microsoft Visual Basic [run]
197988
3409510
394688
591294
329154
853520 VBForums.com - detect file - Microsoft Internet Explorer
2426406 MCI command handling window
1181178
722514
1902116
1246774
3016180
4851346
1312214
3933836 DDE Server Window
197982
263536
263550 Project1
460204
984164
525614
525606
263598
263604
329164
394648 DDE Server Window
919058 Acrobat IEHelper
1508832
460448
853622
853516
394572
16516352
132298 Contextmenu
1377342 Contextmenu
1901610 Contextmenu
132236 Postvak IN - Microsoft Outlook
4326722 #ULTD|Waninio - Chat-Venster
1443126
3277068 Xfire - #ULTD|Black Waltz
131294 Xfire
656674
459808
460578
526122
329556
329548
329624
329526
329532
329542
4130412 MSN Messenger
263960
66004
2426516
66770 Voortgang van verzenden/ontvangen in Outlook
197906
197908
197914
197912
197910 ActiveMovie Window
197916 ActiveMovie Window
197918 MSP PNP Notification Window
197938 CRTCClient
197838 MCI command handling window
66810 DDE Server Window
66806
66802 Microsoft Word
66788
66768
66760
66748
66712 DDE Server Window
263294 WMS ST Notif Window 00000CF8 00000CFC
132228 WMS Idle
459896 W
263278
459868 Microsoft Outlook
66688 MSNUnnamedWindow
132200 Dummy Video Parent
66676 MCI command handling window
66522 ColorNick - QuickNicks
66548 Updates
66570 Gebeurtenissenlogboek - Huidige Activiteit
66576
66644 EchoPortManagerWnd
66648
66658 MSNUnnamedWindow
66516
66332 ColorNick - Voorkeuren
66326 ColorNick - Help
66316 Over...
66078
66074 ColorNick
66070
66068
66058
66056
131534 MSNMSGRPassportLogin
66040
66042
66018 hp psc 1200 series - Status
66012
65896
65894
65892 MCI command handling window
66050
66046 MSBLNetConn
66016 MSNUnnamedWindow
66014
197064 DDE Server Window
262328 MessengerPlusWnd_Manager
66010
131278
262380
66002
131536
65994 MCI command handling window
131446 MCI command handling window
65914 Kaspersky Anti-Virus Personal
131306 Connections Tray
4915466 Energiemeter
196886 MS_WebcheckMonitor
65882
65868
65854
65796
65792
131326
131322
65788
65782
65776
131290
65740 MPWnd_Hooker
65760 DIEmWin
65750
65748 AiODeeDeeNotificationWindow
65744
65736 _IS_Low_Light
65724
65700 LogiTray
65708
65694 LVComSWnd
196712 ATI Tray Icon Application
131152 iTouchWin
65654
131162
196710
196708
196706 ATI video bios poller client
65578 ATI video bios poller
65706
131584 Task Status
263262 GDI+ Window
66804 GDI+ Window
262604
984656 GDI+ Window
65686
1508894 SysFader
65674 Program Manager
what about the numbers ????
what do they mean