VFP

IMPORTANT FIX

I think I finally caught one of the most challenging bugs we had in FoxyPreviewer, that made the reports render only the data from the first field in some reports that used Private DataSessions, and some other specific settings.

I received complaints from 4 people in the last year, but nobody could give me any clue about what was going on, or to help me to reproduce the problem. I finally found a good soul, Flavio Cardoso, from the brazilian VFP user group, who had the same issue, and provided the needed information, and worked with me during… Continue reading

Gdi+ provides many ways to draw rotated objects, like images, strings and shapes. Basically, we need to do a translate transformation to the location of the text, then a rotate transform through the required angle, and then writing the text as normal using drawstring.

 

This is the definition found in MSDN: "The rotation operation consists of multiplying the transformation matrix by a matrix whose elements are derived from the angle parameter. This method applies the rotation by prepending it to the transformation matrix."

1000.107.2389.rotated

 

IMPORTANT:

All samples below use the new GDIPlus-X library, that is still in… Continue reading

Recently I was navigating at Rick Strahl's Blog, when I found a very interesting post, "A Captcha Image generator for FoxPro", in which he shows how he created some captcha images. As Rick said in his post, "CAPTCHA basically displays a verification image next to a textbox that has to be filled out to validate the current request. It’s not a foolproof approach for validation and it has some issues with accessibility but it seems to be a common solution to this problem". The generated image contains a random text.

In that case, Rick chose… Continue reading

As I've read in one of Doug Hennig's great whitepapers, "IntelliSense, added in version 7, was likely the biggest productivity improvement ever added to VFP. It almost entirely eliminates the need to bring up the VFP help, even for little used commands and functions, because of how it provides tips on clauses and parameters in a context-sensitive manner".

 

When working with an extense library such as GdiPlus-X, Intellisense becomes really very important, because using it we can see easilly all the properties and methods for the current object. At this moment, there's no custom script for… Continue reading

 

GDI+ brings many possibilities for resizing images. In this short post, I'll show 3 techniques, that can be applied depending on your needs.

 

IMPORTANT:

All samples below use the new GDIPlus-X library. Get the latest stable release from Codeplex:

http://www.codeplex.com/Wiki/View.aspx?ProjectName=VFPX&title=GDIPlusX

 

Here they are:

 

1 - THUMBNAIL

Using very few code we can resize any image:

** How To: RESIZE with Thumbnail Technique
**
** The code resizes an Image to size 60x60
** Saves to a PNG file

DO LOCFILE("System.App")

WITH _SCREEN.System.Drawing

* Variables to store the new Image size
LOCAL… Continue reading

Adding watermarks to reports is something that I've already blogged years ago during the development of GdiPlusX. In those times, we needed to create a specific ReportListener to manage the report pages, and draw the watermarks. We needed another external library, GdiPlusX, that was responsible for drawing at the report surface, and for applying some special effects to the images, such as transparencies and converting to grey scale.

FInally, we have this feature in FoxyPreviewer too ! That means that from now on, you can add watermarks to your reports without having absolutely any knowledge about GDI+ or… Continue reading

Thor is one of the newest VFPX projects, that brings probably the most helpful set of tools for VFP9 developers, bringing for FREE, TONS of features that were available only in other languages, or even as paid tools. As it’s described in the THOR main web page:

Thor is a tool for managing add-on tools in the IDE, managing menus and hot key assignments for IDE Tools.

But as you’ll see below, it’s much more than that !!!

 

Today I found myself having to do lots of data manipulations, and to create several SQL INSERT instructions. I remember to… Continue reading

FoxyPreviewer brings another cool facility, that allows you to draw your texts in the report surface (and export it) having control on each word. Forget those old workarounds, generating images to draw some texts in your reports or even embedding RTF controls in your reports !

 

This brings a super cool new feature, allowing you to add some basic HTML texts to your fields. This means that you can from now on determine how EACH WORD in your field should be formatted!
See the image below, all the text is in ONE SINGLE FIELD !

How to do it… Continue reading

FoxyPreviewer brings 4 ways for you to send emails:

 

1 – MAPI - Uses the WinAPI MapiSendMail to try to send the current report as an attachment.

This setting sends a standard message, with one or more attached files and a cover note. The cover note is a dialog box that allows the user to enter a list of recipients and an optional message and other sending options. It will open a dialog email sending message, waiting for a user interaction. The message will not be sent automatically. It’s up to the user to veryfy the information ofthe message… Continue reading

Released v2.96
http://foxypreviewer.codeplex.com/releases/

This release brings a new cool feature, allowing you to print the same report twice in the same page.
In several cases we need to print some receipts in 2 copies. Normally these reports are small, using only half the page. If you have this situation, now you can set just one property, and FoxyPreviewer will repeat the current report in the same page, starting from the half vertical part of the page.

Currently works only when you run the report in the preview.
In the preview window, the report will look as original. The 2nd copy… Continue reading