Set Path To Set("Path")+'<where you have it>' USE (Home() + "\samples\tastrade\data\customer.dbf") IN 0 exclusive = talkwind("Make an odd Index") Index On company_name + contact_name + contact_title Tag ccc = talkwind() = talkwind('Find Customer with odd phone numbers', 's') Select * from customer Into Cursor ccc Where At('5555',phone) > 0 = talkwind() ******************************************************************************** *-- Project........: General Purpose *-- Procedure......: TalkWind.prg *-- Purpose........: Generates, displays and destrroys a window to take the *-- output of SET TALK WINDOW TalkWind *-- Author.........: Dr. Hans-Otto Lochmann *-- Copyright......: (c) 2002; LF Management Consulting GmbH. *-- Freeware. You can use it "as is" at your own risk. *-- No warranty or liability whatsoever. *-- Version........: 1.00 *-- First created..: October 21, 1995 *-- Last Update....: 2002/08/12 - put in some comments. ******************************************************************************** *-- *-- Usage / Calling Sequence. *-- = talkwind ([tcCaption[, tcWinType]]) *-- *-- Example. *-- = talkwind ('Get the best customers', 'SQL') *-- *-- Result. *-- No returnvalue. *-- *-- Program abstract *-- 1. When called with at least the title parameter, then a window (in the *-- old fashioned way is generated, to which the output of SET TALK ON *-- is directed. Size of the window depends on tcWinType (see below). *-- 2. When called without a parameter the window "WTALK" is deleted and *-- SET TALK OFF *-- *-- Parameters, *--- tcCaption = Title of the window *-- tcWinType = permissabel values - fits to these commands *-- "S", "s" OR "SQL-SELECT" *-- "R", "r" OR "REPLACE", also good for INDEX and REINDEX *-- -> "D", "d" OR "DELETE" (default), also good for COPY *-- "C", "c" OR "COUNT" *-- ******************************************************************************** Function TalkWind Lparameters tcCaption, tcWinType Local lcSize As String Local lnCaptionLength As Integer Local lcMoveVertical As String If Pcount() = 0 If Wexist( "WinTalk" ) Release Window WinTalk Endif Set Talk Off Return Endif If Pcount() = 1 lcSize = "SIZE 3,40" lnCaptionLength = 39 lcMoveVertical = "0" Else Do Case Case Left( tcWinType, 1 ) $ "Ss" Or ; UPPER( tcWinType ) == "SQL-SELECT" lcSize = "SIZE 9,49" lnCaptionLength = 48 lcMoveVertical = "-1" Case Left( tcWinType, 1 ) $ "Rr" Or ; UPPER( tcWinType ) == "REPLACE" lcSize = "SIZE 3,37" lnCaptionLength = 36 lcMoveVertical = "0" Case Left( tcWinType, 1 ) $ "Dd" Or ; UPPER( tcWinType ) == "DELETE" lcSize = "SIZE 3,30" lnCaptionLength = 29 lcMoveVertical = "0" Case Left( tcWinType, 1 ) $ "Cc" Or ; UPPER( tcWinType ) == "COUNT" lcSize = "SIZE 3,21" lnCaptionLength = 20 lcMoveVertical = "0" Otherwise lcSize = "SIZE 3,40" lnCaptionLength = 39 lcMoveVertical = "0" Endcase Endif If Len( tcCaption ) = 0 l_istitel = "Please wait" Else If Len( tcCaption ) > lnCaptionLength l_istitel = Left( tcCaption, lnCaptionLength) Else l_istitel = tcCaption Endif Endif If Wexist( "WinTalk" ) Release Window WinTalk Endif Set Talk On Define Window WinTalk ; FROM 1,1 &lcSize ; FONT "Fixedsys", 9 ; TITLE "&l_istitel" ; DOUBLE ; NOCLOSE ; NOFLOAT ; NOGROW ; NOZOOM Activate Window WinTalk Noshow Move Window WinTalk Center Move Window WinTalk By &lcMoveVertical, 0 Activate Window WinTalk Set Talk Window WinTalk Return