[英]WinForm progressbar not working when I open that form in Wpf application?
我在Visual Studio中創建了一個Windows窗體項目,並使用了樣式為marquee的進度條,並且創建了另一個wpf項目,並將Windows項目引用添加到新創建的wpf項目中,並在按鈕單擊事件中將該窗體調用為
private void Button_Click(object sender, RoutedEventArgs e)
{
Form1 form = new Form1();
form.Show();
}
但是表單中的進度欄不起作用。
我通過添加以下幾行來解決上述問題
System.Windows.Forms.Application.EnableVisualStyles();
System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.