Thursday, April 20, 2006

Learning Visual FoxPro: Coding Tips and Techniques

In Visual FoxPro, there are lots of different ways to accomplish the same things. This topic refers back to articles that cover how to improve code, yours or someone else's.


Andy Kramek's Writing Better Code Series
Part 1 - Treating users with respect but without affecting performance
Part 2 - Named Expressions or Macro Substitutions?
Part 3 - Procedures and Functions

Select() vs. ALIAS() - Using Work Areas (Andrew MacNeill)

11 Comments:

Anonymous Anonymous said...

For beginners to VFP be sure to check out http://learnvisualfoxpro.com/ also!

November 27, 2006 5:59:00 PM EST  
Blogger Jayesh said...

I have my application's VFP source code. I wish to hire someone who can carry out my assignments on that application on freelance basis. Pay per assignment. I am based in Mumbai, India.

January 10, 2009 7:23:00 AM EST  
Blogger Andrew MacNeill said...

Javesh, email me directly at andrew@aksel.com

January 10, 2009 9:01:00 AM EST  
Blogger joel_slm said...

hi Jayesh, can u email me at msg.slm@gmail.com

December 24, 2010 12:42:00 AM EST  
Blogger First said...

hi jayesh email me on msolpk@gmail.com which your detail query

February 14, 2011 8:19:00 AM EST  
Blogger First said...

Any body guide me what the problem arise of the above given code which i run in vfp7 work properly but if i run this code in vfp9 the movement of mouse in and outside main window the objects of main windows dispaper


**** main.prg ********

DEFINE WINDOW main ;
FROM INT((SROW()-17)/2),INT((SCOL()-50)/2) ;
TO INT((SROW()-17)/2)+16,INT((SCOL()-50)/2)+51 ;
NOCLOSE colo sche 5
acti wind main same

@ 1,1 TO 12,48

@ 6,4 TO 8,15
@ 6,18 TO 8,29

@ 7,6 SAY "Purchase"
@ 7,22 SAY "Sale"


do whil .t.


SHOW WINDOW main


@ 6,4 GET m.pur PICTURE "@*IVN " SIZE 3,12,1 DEFAULT 0 vali chk_pur()

@ 6,18 GET m.sal PICTURE "@*IVN " SIZE 3,12,1 DEFAULT 0 vali chk_sal()


@ 13,10 GET m.ok PICTURE "@*HT \!\<Exit;\?\<Cancel" SIZE 1.522,12,6 DEFAULT 1


IF NOT WVISIBLE("main")
SHOW WINDOW main
ENDIF

READ CYCLE

if m.ok=1 .and. last()#27
exit
endi

endd

rele wind main
clos data all

February 14, 2011 8:24:00 AM EST  
Blogger Andrew MacNeill said...

First,

In your example, you are using extremely old @ 2,5 SAY code. This code may not work properly in modern Windows environments (Windows XP, Vista, etc)

You are better using the approach of creating forms.

If you do need to use that approach, you should be sure to turn themes off.

_SCREEN.Themes = .F.


http://msdn.microsoft.com/en-us/library/aa979308(v=vs.71).aspx

February 14, 2011 8:39:00 AM EST  
Blogger First said...

Thanks Andrew, its solve my problem, can you guide me any video tutorial on TASTRADE software.

February 15, 2011 7:31:00 AM EST  
Blogger First said...

when i click from mouse on the previous code its work on for one time to open program file next time its not work and have to use keyboard, Andrew guide me mouse system variable.

February 15, 2011 7:51:00 AM EST  
Blogger coolangot said...

Hello to anyone..I am an IT student and currently new to visual fox pro. Is there anyone here can share me the source code for library system? or point of sale system? Badly needed as a reference..thanks to all...

June 23, 2011 3:27:00 AM EDT  
Blogger Andrew MacNeill said...

Coolangot,

The best place to start is with the sample applications.

When you describe a Library system, it could mean a variety of systems.

What type of system are you needing to build?

Andrew

June 24, 2011 4:04:00 PM EDT  

Post a Comment

Links to this post:

Create a Link

<< Home