DVD再生ソフトで表示できない

DVD再生ソフトで表示できない


RSS速報を起動中、とあるDVD再生ソフトで画像が表示できないという報告を受けた。
私の持っている別のDVD再生ソフトでは問題なく再現環境が無い。

とりあえず、RSS速報の描画処理を簡単に再現したテスト用プログラムを報告者に送り、テストしてもらうことにした。

せっかく作ったので、ついでにソースを一部公開。

(言語はC#)

namespace test
{
	/// <summary>
	/// Form1 の概要の説明です。
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private static string paintMessage = null;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.Button button3;
		private System.Windows.Forms.CheckBox checkBox1;
		private System.ComponentModel.Container components = null;

		public Form1()
		{
			InitializeComponent();
		}

		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		(省略)

		[STAThread]
		static void Main()
		{
			Application.Run(new Form1());
		}

		private void button1_Click
			(object sender, System.EventArgs e)
		{
			TransparencyKey = Color.Red;
			paintMessage = "テスト用メッセージ";
			Refresh();
		}
		private void button2_Click
			(object sender, System.EventArgs e)
		{
			TransparencyKey = BackColor;
			paintMessage = "";
			Refresh();
		}
		private void button3_Click
			(object sender, System.EventArgs e)
		{
			TransparencyKey = BackColor;
			paintMessage = "テスト用メッセージ";
			Refresh();
		}

		private void checkBox1_CheckedChanged
			(object sender, System.EventArgs e)
		{
			if(checkBox1.Checked)
			{
				Cursor = Cursors.Hand;
				SizeGripStyle = SizeGripStyle.Hide;
				FormBorderStyle = FormBorderStyle.None;
			}
			else
			{
				Cursor = Cursors.Default;
				SizeGripStyle = SizeGripStyle.Auto;
				FormBorderStyle = FormBorderStyle.Sizable;
			}
			MaximizeBox = !checkBox1.Checked;
			MinimizeBox = !checkBox1.Checked;
			ShowInTaskbar = !checkBox1.Checked;
			TopMost = !checkBox1.Checked;
			ControlBox = !checkBox1.Checked;
		}

		private void Form1_Paint
			(object sender, System.Windows.Forms.PaintEventArgs e)
		{
			float x = 0.0F;
			float y = 50.0F;
			Graphics g = e.Graphics;
			Font msgFont = new Font("MS ゴシック", 20);
			Brush whiteBrush = new SolidBrush(Color.White);
			Brush blackBrush = new SolidBrush(Color.Black);
			for(float i=1;i<3;i++)
			{
				for(float j=1;j<3;j++)
				{
					g.DrawString( paintMessage,
					msgFont,
					blackBrush,
					x-i, y-j);
					g.DrawString( paintMessage,
					msgFont,
					blackBrush,
					x-i, y+j);
					g.DrawString( paintMessage,
					msgFont,
					blackBrush,
					x+i, y-j);
					g.DrawString( paintMessage,
					msgFont,
					blackBrush,
					x+i, y+j);
				}
			}
			g.DrawString( paintMessage,
			msgFont,
			whiteBrush,
			x, y);
		}
	}
}
Tagged

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA


*