Answer Questions
aditi shah Syntax Difference
can some one please tell me the difference between accessing a tables info by using these two different approaches Table.Field or Table->Field thanks in advance They're same. Table->field style is less known (maybe only by those who are coming from foxbase days) and not used. It is dereferencing pointer coming from C (old fox was using Watcom C as I remember.) Actually, Cetin, Table->Field comes to us all the way from dBase. The -> actually works pretty much anywhere we're using a . these days: _screen->Caption = "Hello" and you can mix an match. (Useless trivia, I know. :-)) ...Show All
lingga Alt-F4 to close the current form and NOT the application.
Is there a way to set VFP so alt-F4 closes the current open window within VFP instead of the vfp application itself Thx. Sure, set KeyPreview to true and in the keypress event have this code: LPARAMETERS nKeyCode, nShiftAltCtrl CASE nKeyCode = 107 ** Letter ALT + F4 for EXIT click event ** assumes command button on form is called cmdExit THISFORM .cmdExit.Click() endcase Don; It woarks like a charm... As long as its not ALT-F4. Any key is being trapped in the Keypress, but when I use alt+F4 the VFP application itself closes before the Keypress will intercept it. Any other ideas Thx. No, not THAT important... ...Show All
wilbour Combo in Grid with Incremental Searching
Hi all I know we can put a combo into a grid and seen in a previous thread a link to Marcia's example on her web site ( http://www.tightlinecomputers.com/Downloads.htm ). However, whenever I put a combo into a grid, the incremental search (based on the interactive change) never works. I can post my code, but just need to know if I'm flogging a dead horse or not. Thanks Thanks for the reply. Never really thought the incremental search for Combo's was any good. In the grid, you have to set the typing delay and it is poor. If didn't work very well. I would like the validation on the combo itself so it only lets you type what is in the combo. My code ...Show All
dotnetkiwi VFP TIMER MEMORY PROBLEM
Hi All, Our product is a 24/7 Hospital product and i face a critical issue in Timer control. The below code is a small example of my process, i created an exe of this code and this runs as a process in the task manager. The issue is this eats up memory consistently in time intervals. if this exe is ran for days the memory is used is like in MBs and slowing down the PC's performance. TimerCtrl() procedure TimerCtrl LOCAL poTim poTim = createobject ( "iTimer") poTim. interval = 1000 poTim. enabled = .t. read events endproc *========================================================================================================================= define class iTimer as timer fun ...Show All
Scott Masters Wrangling a Grid
I know that this is bucking the norm, but I am trying to use a grid to edit data in a cursor that I have created from a local table. The problem I am having is that the columns containing numeracle values or integers, the control becomes readonly. I have the grid on a form, and I am assigning the recordsource and controlsource programmatically after creating the cursor in the Init method of the form. Thanks in Advance - Any help would be appreciated. With a create cursor command. I am using an Alias for the cursor name so it looks like this: create cursor (AliasName) (field1 C(250), field2 I(4),field3 N(10,2), ect...) Then I am plugging in values from a table (I only want to edit a ...Show All
DotNetFireball SELECT .... INTO TABLE <existing table>
G_TempDBF = "C:\scratch\" + SUBSTR(SYS(2015), 3) + ".DBF" SELECT field1, field2 FROM myTable INTO TABLE (G_TempDBF) USE (G_TempDBF) ALIAS CUSTOMER INDEX ON field1 TAG field1 I have created a temporary table, stores the retrieved records into it and alias it CUSTOMER How can i reuse this temporary table for other SELECT statements SELECT field3, field4 FROM myTable INTO CURSOR CUSTOMER ---> results in an error saying Alias CUSTOMER has been used. If they ever created on disk (with some old versions they're always created or at least file handle is allocated provided that they're true cursors)... Actually it's one of the reasons why you should prefe ...Show All
Pascal Mignot Indexed field problem
hi generous friends, i m using vfp 6. I have a form with data environment having a table that is indexed on 3 fields with tagname reg_no, name, surname. my form has four record navigation commandbuttons viz. top, prev., next and last. When any navigation button is clicked I want to move the record pointer in sequence of the first tag i.e. reg_no. So i have given command "Set Order to reg_no" in the beginning of their click event. but it is not working as desired . So i inserted "wait wind set('order')" command to check the order of the table. wait window flashes the right tag name, but the sequence in navigation is not maintained. please give me a solution. sorry friends ...Show All
Stephan Smetsers where condition too complex?
Hi, Basically I have a where statement in my code that is similar to this: "where productcode in ('0001','0002','0003'.....'0020')" and Foxpro is telling me that the SQL code is too complex. The output file is an Excel file so I suppose I could just extract the particular product codes that I need in Excel but I was just wondering if there was a way to bypass this "SQL Code is too complex" conondrum and just grab the numerous product codes that I need. Thanks! :) dmatthew wrote: Looks like I may have to go through this route. Thanks guys! :) Which one is "this route" :-) The SYS function, or splitting up the query Looks lik ...Show All
LISA86 Using grid
I have a grid in my program that display an information in sorted and the moment I click any data within the first colum of my grid it automatically display all information in the corresponding objects within the form. What i want to do next is, if ever the focus within the grid and i type the first letter of the record which i want to find it would highlight the record that starts with the character i enter within the grid and follows the 2nd, 3rd and so on. until such time i can right away view the record which i want to find. Thanks... thanks to you guys but i dont want to use another object like textboxes or label just to accept data i typed. What i want is, the moment my form is running a ...Show All
rock.aut Copy and Past function under VFP9
I found the Ctrl+C and Ctrl+V function under VFP9 is not working on the users' end. Sometimes, I found the same problem on my PC. What seems to be the problem Unfortunately, it remains unresolved. Everytime after I compiled the app. and created the exe file under Ver. 9, the copy and paste function disappeared. Any idea VFP6 is OK. I guess I have fixed the issue. Just get into the short cut box. Delete whatever value there and press Ctrl+C to save it. Recompile the exe file. One user already confirmed that it worked. Thank you all. See http://www.craigberntson.com/Articles/kb007.htm Thank you ...Show All
KyleShih About imgscan.ocx
Hi, I had a prgram in Windows 2000 using imgsan.ocx that registered in window 2000. It was running good. But When I change the platform in Window xp. It occurs an error that It doesn't locacate the class. Even though I copy this class imgscan.ocx into the current dir. It still doesn't work. Can anybuddy help me Thx a lot. i want to know the download location too Hi, Could you please give the download from where you got the file Thanks You may try to register with (at start>run command): regsvr32 imgscan.ocx I download a new imgscan.ocx. Now it is working. Thanks a lot! If the file is in c:\mydir\ and if the file is ok(not corrupt) it should work. I t ...Show All
abupapa Importing from Excel workbook with hidden columns
Hi! I cannot use IMPORT FROM <myworkbook> TYPE XL8 because every time there are hidden columns in the workbooks , this command fails to get data from them. How can I avoid such a problem Is there a way to force IMPORT command to get data from the hidden columns or is there a way to unhide the columns with VFP before I issue the IMPORT command Any help would be greatly appreciated. Thank you! Karl Warning: Untested, writing off the top of my head. lcXLS = "c:\some path\myFile.xls" oExcel = createobject("Excel.application") with oExcel .Workbooks.Open(m.lcXLS) .Activeworkbook.ActiveSheet.UsedRange.Columns.Hidden = .f. .Activeworkbook.Save .Quit endwith ...Show All
job44927 Once again all hell breaks loose...
Once again I have made the fatal mistake of god forbid changing the record source of a grid in the design stage. I can't understand this issue: Now the formatting of the grid at run time is different (and can not be controlled at design time). Also, the grid columns get populated in the order of the new view I am using REGARDLESS of the fact that I am specifically setting the controll source per column to the proper field. Previously Cetin has sugested that during my select stage I would select only the fields used in the grid and in the order used in the grid but this will cause problems. Is there a solution to this bug (or is it a feature) in VFP This is driving me nuts.. Thank you all.. ...Show All
Sal T where condition too complex?
Hi, Basically I have a where statement in my code that is similar to this: "where productcode in ('0001','0002','0003'.....'0020')" and Foxpro is telling me that the SQL code is too complex. The output file is an Excel file so I suppose I could just extract the particular product codes that I need in Excel but I was just wondering if there was a way to bypass this "SQL Code is too complex" conondrum and just grab the numerous product codes that I need. Thanks! :) Looks like I may have to go throught his route. Thanks guys! :) dmatthew wrote: Looks like I may have to go through this route. Thanks guys! :) Which one is "this route ...Show All
yfradkin Shellexecute on win98 / XP / 2003 server.
does Shellexec behave differently on win98 than on XP I have a shellexecute command to unzip a zip file. The 'pfiles' folder the zip file resides in is under the folder the application runs in: =ShellExecute(0,"OPEN","unzip.exe","pfiles\01.zip","",1) On XP machines it works fine. On win98 machines it fails because it won't find the pfiles folder. Thanks. Thanks. Sorry for not posting a seperate thread. Hi Aleniko, Shellexecute shouldn't be dependant where your application is ran from. In other words in any OS I wouldn't trust it'd resolve my current folder and explicitly pass the path. ie: ShellExecute(0,'open','unzip.exe', fullpat ...Show All
