Answer Questions
Yash Purohit How to calculate the data connection time?
I tried to add 2 fields, time_on, datetime, time_off, datetime to calculate user's log on time in the Users.dbf. How do I calculate the total time between the 2 value Any better way to capture users' activity You may create a clock like: http://support.microsoft.com/kb/139390 and start it when user log on ... Well since you didn't give the version number I gave a code that works in VFP9. Just replace text...endtext with a set textmerge block and you'd get what you want. Standard dateTime type, can be any date, any time. Thanks. To do date math you can't use time() as that returns a string. Best is to create D ...Show All
WIreD 0x90 How to add an empty row in a csv file without using strtofile or filetostr
I have an application that retrieves data from a csv file. The csv file does not have a empty row or a header row on the top, so when i append it to a cursor it skips the first row. To avoid skipping the first line this is what I am doing cString = filetostr(filename) strtofile(CHR(13)+CHR(10)+cString,somefilename) This has been working for a long time. But, I failed to realize that if the string exceeded the default string size it would give me a "String is too long to fit" error. Is there a way to do something like this in a different way. If you are appending that to a cursor that means the cursor already exists. You don't need a header row. Append as a delimited file. ie: append from myf ...Show All
CTheSoup System resolution
Hi. How can I find out what the system resolution is, and how can I change it via FoxPro Thanks Do you mean Screen Resolution Thanks for your advices but I will not change my mind. There is a plenty of textboxes, some listboxes. You mean the right way how to do that is to resize the form I tried, it works but if I want to run this form on 640X480 I have to degrease the font size of all of the controls some to value of 6. It is really nice to read text like this size. Please do not solve why to do that, if anybody knows how to do that, please disrcibe me it, if not do not give me an advice like "The "correct" solution is NOT to change your users screen resolution but to re-size ...Show All
N G Smith Creating an exe from the Project Builder
Hello, I have finished my firs application and I have troubles with generating an exe to be installed in the customer’s PC. I’ve accomplished all the requirements seemingly for example to copy the dll that indicates the help of VFP, in same the directory where the application is executed, and to start up from an initial program that after calling to the form from this program, I`ve addedd the sentence of READ EVENTS at the end, I execute It and can’t see anything. The exe run like a process in memory (I do check it with the task Administrator of Windows XP). If I have an open sesion of VFP, it works, but if I close it, It does not (AND the client doesn't have installed VFP) Thank you for your support Regards, Alberto ...Show All
ManojS Dynamically enable or disable rows in a grid.
How can I dynamically enable or disable the current row in a grid depending on a contition I used to use 'when' in Foxpro browse but in a grid the 'when' affects the entier grid. thanks. Perfect. Thx. Prior to VFP9 you can use: this.SetAll('Enabled', yourCondition) Aleniko wrote: How can I dynamically enable or disable the current row in a grid depending on a contition I used to use 'when' in Foxpro browse but in a grid the 'when' affects the entier grid. This code in the grid's AfterRowColChange: This.AllowCellSelection = SomeCondition ...Show All
BrunoAMSilva How to implement Mouse leave for a form.
I have a very small form that opens up to display some info. I'd like the form to close when the mouse leaves the form. I noticed there is no mouseleave or mouseenter for forms. Any other method to do this Thx In vfp 7 you have: MouseLeave Event - mouse moves out of an object. You may drop a rectangular shape at margin of the form. When mouse leaves the object (aprox.same area with the form) form will close. It has mousemove event. MouseMove can help. Use your imagination. You might also check OnMouseOut at universalthread.com which implements it with a timer (remember people were not helpless when there weren't MouseEnter/Leave events but only MouseMove ...Show All
Ed Santosusso Aha, found. To be able to reply first cause an error:)
Hi everyone. I have noticed a rather serious incompatibility between VFP9 and older Foxpro versions. In the following code, when the field valid is fired, the related table record is not seeked and not found. In older Foxpro, the related table record is already seeked in the valid clause. This happens only for the first entry in the 'TmpProd' table but subsequent entries are seeked and fine. Is there a solution for this aside from seeking within the field validation code SELECT 2 USE prod order ProdId &&Index is on ProdId SELECT 1 USE TmpProd EXCLUSIVE SET RELATION TO ProdId INTO prod zap APPEND BLANK BROWSE FIELDS ProdId:v=showinf(),design=Prod.design RETURN FUNCTION showinf ...Show All
Cyberjunkie Newbie Needs advice/help
Hi everyone.. I have some experience in MS Access, I can pretty much get it to do what I need it to do.... but it isn't pretty Anyway, I have a very old Clipper application (& corresponding .dbf/.ntx files) that is is way beyond it's use limits in todays environment. So I though I would try and update it heh.. After talking with the Original programer, who not only doesn't have the source code, but doesn't even remember clipper anymore, I decided to give it a try. I was able to decompile the .exe using Rescue5 with 2 passes. There are about 5 orginal .src or .udf files that have a line or 2 of code that ended up as garbage, but that's mostly for the screen draws. Anyway, I have visual foxpro, what I don't have is the knowledge to actua ...Show All
ImagineNation How to copy one column to another
Hi all, I would like to copy a column that has prices (fprice) for parts in it to another column within the same table. Then I am going to do a replace on the original column (fprice) to increase the price by a fixed amount (I know how to do that). The table has a column that is not used for anything (by us) within the application. It is a User Character 3 field (fcusrchr3). I need to do this so our CFO can look back at the old pricing if need be. Any help copying the column would be greatly appreciated. FYI, this is in Visual Foxpro 6. Thanks, Erik Thank you, This worked great. I had actually tried it before, but I was getting a data type mismatc ...Show All
Sujeetk VFP9 SP1 DLL Error
Hi All Shot in the dark, but just wanted to see if anyone else is getting a similar problem. My VFP9 SP1 application has been working fine but over the last month, one of my forms has been returning an error with vfp9r.dll. It's the standard error with the "send report to Microsoft". The forms in question do not do anything different to any other form and I've cut down the code and tried to isolate the problem. However, the error does not happen all the time and some users experience it more than others. The form has not changed recently either. I've tried reinstalling the VFP runtime, giving users admin privledges, etc. Nothing works. The only thing I've got is an entry in the event viewer: The descriptio ...Show All
Sharp24597 create table dbase IV
Hello! I have to create -- ar runtime -- some dbf in dbase IV format. I am using Visual C# and System.Data.OleDb (I tried also System.Data.Odbc). My approach is like this: 1/ create oledbconnection with connection string Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\somefolder;Extended Properties=dBASE IV; 2/ create oledbcommand object and setting the commendtext: create table tablename(columnname numeric(13,3)) and perform executenonquery. The file is created but the column is not exactly as I wanted; instead it's numeric(20,5). My question is: how to create a numeric data type column exactly the precision and width I specify Thank you for your time, Augustin Calin ...Show All
Joel_F New problem about imgscan.ocx
I use imgscan.ocx to scan a picture in vfp form. The problem is that the picture in *.bmp I got from scaner can't be opened in VFP. But I can open it using paintbrush or imageedit. And the picture size is much different if using scanwise to scan (2MB using imgscan.ocx, 156kb using scanwise). I can open the picture that scan using scanwise by vfp. The vfp code in scan button of vfp form is: thisform.olecontrol1.openscanner thisform.olecontrol1.image=thisform.picturename thisform.olecontrol1.startscan thisform.olecontrol1.closescanner thisform.release Can anyone help me Thanks a lot! Take a look at this link. It seems to imply that you need more than just ImgScan.ocx http://www.ilixis.com/developer/kodak_requirements.html ...Show All
Osmose1000 Showing one form from another
Situation: I am in a form A, click on a cmd, and it opens another form B and hides the current form A. In form B, I click on a cmd and I would like to show form A and release form B. The release of form B works, of course, but not the showing of form A. I have never seen anything about whether it is possible to make changes in or affect one form from another. Is it (I guess it would work with a form set ) Hans L >> If one does not want to leave form A visible under form B, is there any consensus what is better: closing *or* hiding form A when one opens form B Despite what Cetin said, I think It is really a matter of what the forms are doing. If your user has just spent 20 minutes finding the corre ...Show All
Coridas Working with field General!
Hi, all! Help me to update field type General: append object, edit, open,... in VFP from program control with bottom command. (use line command MODIFY GENERAL <field gen> don't open object) Thank! Alex Feldstein wrote: ... Instead: - Use BLOB fields (VFP9) or - Use a text field to keep the path+filename and keep the original file on disk You'll be glad you did. PS: Did I say: don't use General Fields What about VFP 8.0 Which data type should I use instead There is a simple solution to deal with General fields in VFP: Don't use them . General fields have lots of problems, mainly they grow in size to the point ...Show All
Shouvik Font Size Randomly Changing
Has anyone experienced a problem in a FoxPro 9 application, where the font size of some controls on a form change It could happen going from form1 to form2, or form3 to form2. The size changes from 9 to 8, 12, or 18. There doesn't seem to be a pattern, and it could happen today day and not happen for several days later. I have never heard or seen such a thing! I also don't think that VFP implements self-programmed changes. So this must be something to do with the environment - Themes Maybe some wierd set up in the windows IDE configuration for "active" and "inactive" windows But without a little more detail it is hard to guess It could be a themes issue. Try setting _ ...Show All
