How do I work with WIndows Forms in WPF?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How do I work with WIndows Forms in WPF?

  1. #1
    Join Date
    Dec 2005
    Posts
    134

    How do I work with WIndows Forms in WPF?

    How do I work with WIndows Forms in WPF?

    In my WPF program I created a Windows Form class.
    In this Form, I placed an OK button and I went into the properties of the button and set the DialogResult to OK.
    Now, I am calling this Dialog (Window Form) from the MainWindow.xaml.cs:
    Code:
         dres = form.ShowDialog();
         f (dres != DialogResult.OK) return;
    The compiler is complaining:

    Code:
    Error	3	'System.Nullable<bool>' does not contain a definition for 'OK' and no extension method 'OK' 
    accepting a first argument of type 'System.Nullable<bool>' could be found (are you missing a using directive 
    or an assembly reference?)

  2. #2
    Join Date
    Feb 2004
    Location
    Longueuil, Québec
    Posts
    577
    There is probably another DialogResult in WPF that gets preseance over the one from the standard Windows Form because it is part of WPF.

    Try with a full reference to System.Windows.Forms.DialogResult.OK.
    Jacques Bourgeois
    JBFI
    http://www3.sympatico.ca/jbfi/homeus.htm

Similar Threads

  1. Replies: 1
    Last Post: 12-01-2006, 01:38 PM
  2. Windows Forms 2.0 Client Platform Requirements
    By developer1776 in forum .NET
    Replies: 1
    Last Post: 12-29-2005, 09:36 AM
  3. dotnet frame work for windows 98 systems!!!!!
    By senthilvel in forum .NET
    Replies: 2
    Last Post: 01-30-2003, 02:04 AM
  4. Windows Forms with listbox (Click Event)
    By Steve Hall in forum .NET
    Replies: 0
    Last Post: 04-03-2002, 05:44 AM
  5. Replies: 1
    Last Post: 10-21-2001, 11:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center