Andrew Coates ::: MSFT

It's all about community!

.NET and Win32 Interop - New Toolkit Available

.NET and Win32 Interop - New Toolkit Available

  • Comments 4

While I was prepping for some VFP sessions I delivered in Hong Kong last week, I pinged yag for some pointers from his DevCon keynote. In addition to a bunch of great info on Sedna and VFP 9.0 SP2, he pointed me at a really cool resource - the Microsoft Interop Forms Toolkit 2.0. This toolkit basically installs new templates into VS2005 that bootstrap the development of .NET controls and forms that can be included into Win32 applications including VB6 and VFP.

I developed a couple of controls that I can just drop directly onto a VFP (or VB6) form to provide things that are easy to do in .NET, but are difficult in VFP. For example, the FileSystemWatcher control is great, it raises events when things change in the file system (file created, changed, deleted etc) so your app can react to those changes.

You can also create composite .NET controls (made up of a number of individual controls) and expose them as a single interop control.

The source for the demo I gave in Hong Kong is attached. Build the .NET project first, and then open the VFP project. You might be missing a couple of images in the composite control, but they're just for show.

BTW, as per Rick's great post, there's a bunch of functionality also available in the FoxPro Foundation Classes including the System Tray class, and these don't require you to use .NET. As always, choose the most appropriate tool for the job.

Attachment: InteropToolkitSample.zip
Page 1 of 1 (4 items)