Masking .BMP Files in FoxPro for Windows

ID: Q94344

2.50 2.50a 3.00 WINDOWS kbprg

The information in this article applies to:

SUMMARY

This article describes how to mask a bitmap picture.

MORE INFORMATION

When FoxPro for Windows loads a .BMP file as a screen picture, picture button, or check box, it checks the directory for a corresponding .MSK file to use as a mask for the .BMP file. FoxPro displays the portions of the .BMP file that correspond to black areas of the .MSK file and makes transparent the portions of the .BMP file that correspond to white areas of the .MSK file. If FoxPro does not find an appropriate .MSK file, FoxPro makes all white areas of the .BMP file transparent.

The image in the .BMP file and the image in the .MSK file must have the same dimensions.

To create a FoxPro for Windows .MSK file for a .BMP file:

1. Open the .BMP file in Microsoft Windows Paintbrush or another

   bitmap-editing utility.

2. From the File menu, choose Save As, and then change the file type to
   Monochrome Bitmap. Replace .BMP with .MSK for the filename extension.
   Choose OK to save the new .MSK file.

   NOTE: In the Windows 95 Paint program, you can't save your file with a
   file name extension other than .BMP. To work around this, save the file,
   then use Explorer or My Computer to change the file extension. To
   view the extension in Explorer or My Computer, click View, and then
   options. Click the View tab, and then clear the Hide MS-DOS File
   Extensions for File Types That Are Registered check box

3. Fill in black the portions of the .MSK file that correspond to the
   part of the .BMP file that should appear in FoxPro for Windows.
   Make the remainder of the .MSK file white.

4. Save the .MSK file in the same directory as the .BMP file.

REFERENCES

FoxPro for Windows "User's Guide", version 2.5, page U11-51

Additional reference words: VFoxWin 3.00 FoxWin 2.50 2.50a color KBCategory: kbprg KBSubcategory: FxprgGeneral

Keywords          : FxprgGeneral 
Version           : 2.50 2.50a 3.00
Platform          : WINDOWS

Last Reviewed: April 30, 1996