Function icardlaunch * tcAskToStart if you want to pop up a messagebox to * ask if they want to start iCard software. if True then ask to start. False is auto start Parameter tcluse_icard_or_1320go local luse_icard_or_1320go luse_icard_or_1320go = tcluse_icard_or_1320go **************************************************************** *** First, find out if iCard is already running **************************************************************** Declare Integer ShellExecute In shell32.Dll ; INTEGER hndWin, String cAction, String cFileName, ; STRING cParams, String cDir, Integer nShowWin *** local variable for iCard or 1320 go Pro Screen Name Local tcwindowname * Is iCard or 1320go running already? * uses variable to determine If luse_icard_or_1320go = .f. tcwindowname = 'iCardRX' Else tcwindowname = 'Run Capture' Endif Declare Integer FindWindow In Win32Api Integer, String Declare Integer PostMessage In Win32Api Integer, Integer, Integer, Integer *** find out if iCard is already running. If it is exit Local lnhwnd lnhwnd = findwindow(0, tcwindowname) *** if iCard is already running lnHwnd will be above zero If lnhwnd <> 0 Return Else **************************************************************** *** Do they want to start iCard also? **************************************************************** If tcasktostart = .T. If Messagebox("Start iCard Software Also?",4 + 32 + 256,"Launch iCard Recording Software Now?") = 7 ** if they answer NO do nothing but launch form icardsetup.scx Return Else ** iCard is not running, launch it Do iwanticardtostart In Main Endif Else ** iCard is not running, launch it Do iwanticardtostart In Main Endif * endif below from if lnHwnd <> 0 EndifI have searched the net for finding window names but only if you know the exact name.