0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

cscの作法 その535

Last updated at Posted at 2024-11-18

概要

cscの作法、調べてみた。
練習問題やってみた。

練習問題

wpfを1ファイルで書け。

方針

  • xamlを使わない。
  • WebBrowser使う。

サンプルコード


using System;
using System.Windows;
using System.Windows.Controls;

namespace Wpf
{
	public partial class MainWindow: Window {
		WebBrowser wb;
		public MainWindow() {
			wb = new WebBrowser();
			wb.Navigate("https://qiita.com");
			Title = "test";
			Width = 600;
			Height = 600;
			Content = wb;
		}
	}
	class MainApp {
		[STAThread]
		public static void Main() {
			MainWindow mwnd = new MainWindow();
			Application app = new Application();
			app.Run(mwnd);
		}
	}
}




実行結果

image.png

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?