programming4us
programming4us
DESKTOP

Windows 7 : Working with the Multi-Touch User Interface (part 2) - Obtaining the Multi-Touch Platform Interop Library, Configuring the Application

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

3. ADDING MULTI-TOUCH TO YOUR APPLICATION

Microsoft provides a number of interesting example programs, all of them complicated and all of them graphics-oriented. The examples are obviously designed to show off the capabilities of the Multi-Touch Interface, and they do a very good job of that. However, most organizations don't really need complex graphics applications — they need a version of Multi-Touch that works with push buttons and the like. The Multi-Touch example is very simple. It demonstrates how you add the Multi-Touch Interface to a business application so that the user can interact with it using the keyboard, mouse, or the Multi-Touch Interface as desired. The example is purposely kept simple so that you can modify the code as needed for your application.

3.1. Obtaining the Multi-Touch Platform Interop Library

As with most things Windows 7, Visual Studio doesn't provide the support required to access the features. In this case, the Code Pack won't help you either. Instead, download the Windows 7 Multitouch .NET Interop Sample Library from http://code.msdn.microsoft.com/WindowsTouch. When you open the Win7RC_MT.ZIP file to your root directory, you'll end up with a \Win7RC_MT folder that contains the source code you need to create the interoperability (interop) library. These steps will help you create the interop library used for the example in this chapter.

  1. Open the Windows7.SLN solution using Visual Studio. Because this is an older solution, you'll need to convert it for use with Visual Studio 2010. Simply follow the Visual Studio Conversion Wizard prompts as usual.

  2. Choose Build => Build Solution. The build is going to fail with five errors.

  3. Locate the error RC1004: unexpected end of file found error for Resource.H. Double-click this entry. Visual Studio will open the Resource.H file for you.

  4. Go to the end of the Resource.H file and press Enter to add a linefeed. Save the file and close it.

  5. Locate the \Win7RC_MT\Demo\Multitouch\MutlitouchWPF\mtWPFInertia\Images folder on your system.

  6. Copy to the folder four JPG images named Pic1.JPG, Pic2.JPG, Pic3.JPG, and Pic4.JPG. The content of the images doesn't really matter, as long as you provide JPG files.

  7. Choose Build => Build Solution. The build should succeed this time.

After you're able to build the library, you'll find the Windows7.Multitouch.DLL library in the \Win7RC_MT\Release folder. This is the library you use to gain access to the Multi-Touch Platform when working with a Windows Forms application. If you want to create a Windows Presentation Foundation (WPF) application instead, you need the Windows7.Multitouch.WPF.DLL library found in the \Win7RC_MT\Mutitouch\Windows7.Multitouch.WPF\bin\Release folder.

3. 2. Configuring the Application

The Multi-Touch example begins with a Windows Forms application. The application has two push buttons, Test and Quit, that the user will be able to interact with, using keyboard, mouse, or touch (assuming the user's system has a touch device). You need to add the following reference using the Browse tab of the Add Reference dialog box. (The Multi-Touch interop library appears in the \Win7RC_MT\Release folder, as shown in Figure 1.)

Windows7.Multitouch.DLL

Figure 1. Add the required reference DLL to your project.

If you decided to create a debug version of the library, then you'll need to look in the \Win7RC_MT\Debug folder instead. You'll also need to add several using statements for this example, as follows:

using Windows7.Multitouch;
using Windows7.Multitouch.Win32Helper;
Other  
  •  Windows Server 2003 : Configuring Zone Properties and Transfers (part 4)
  •  Windows Server 2003 : Configuring Zone Properties and Transfers (part 3)
  •  Windows Server 2003 : Configuring Zone Properties and Transfers (part 2)
  •  Windows Server 2003 : Configuring Zone Properties and Transfers (part 1)
  •  Windows 7 : Managing Pictures with Windows Live Photo Gallery (part 14) - Sharing with E-mail, Sharing on the Web: Services Integration
  •  Windows 7 : Managing Pictures with Windows Live Photo Gallery (part 13) - Printing Pictures and Ordering Prints, Adding Photos to Movies, DVDs, and Data Discs
  •  Windows 7 : Managing Pictures with Windows Live Photo Gallery (part 12) - Using Photos as Slide Shows
  •  Windows 7 : Managing Pictures with Windows Live Photo Gallery (part 11) - Enjoying Photos on Your Own PC
  •  Windows 7 : Managing Pictures with Windows Live Photo Gallery (part 10) - Resizing Photos,Creating Panoramic Photos , Editing with Other Applications
  •  Windows 7 : Managing Pictures with Windows Live Photo Gallery (part 9) - Editing Pictures
  •  
    Top 10
    Free Mobile And Desktop Apps For Accessing Restricted Websites
    MASERATI QUATTROPORTE; DIESEL : Lure of Italian limos
    TOYOTA CAMRY 2; 2.5 : Camry now more comely
    KIA SORENTO 2.2CRDi : Fuel-sipping slugger
    How To Setup, Password Protect & Encrypt Wireless Internet Connection
    Emulate And Run iPad Apps On Windows, Mac OS X & Linux With iPadian
    Backup & Restore Game Progress From Any Game With SaveGameProgress
    Generate A Facebook Timeline Cover Using A Free App
    New App for Women ‘Remix’ Offers Fashion Advice & Style Tips
    SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
    - Messages forwarded by Outlook rule go nowhere
    - Create and Deploy Windows 7 Image
    - How do I check to see if my exchange 2003 is an open relay? (not using a open relay tester tool online, but on the console)
    - Creating and using an unencrypted cookie in ASP.NET
    - Directories
    - Poor Performance on Sharepoint 2010 Server
    - SBS 2008 ~ The e-mail alias already exists...
    - Public to Private IP - DNS Changes
    - Send Email from Winform application
    - How to create a .mdb file from ms sql server database.......
    programming4us programming4us
    programming4us
     
     
    programming4us