我想獲得寫入C#的應用程序的主窗口。 Application.MainWindow屬性不工作:(獲取主窗口
用途:?
using System;
using System.Windows;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing;
using System.Collections.Generic;
using My;
using MyDialogs;
using System.Xml.Serialization;
using System.Runtime.InteropServices;
using System.Windows.Input;
using System.Windows.Media;
using System.Threading;
using System.Windows.Interop;
不以什麼方式工作? –
你試着在WPF或Winforms?如果它是winform檢查這個URL http://social.msdn.microsoft.com/Forums/en/winforms/thread/99df9c07-c117-465a-9207-fa3534982021 –
它不作爲屬性,Window對象存在。 – jahsen