ウィンドウフォームの色を基本の青からその他に変更したいです。誰かが私たちがそれを行う方法を手伝ってもらえますか? form ii formborderstyle のプロパティは 1 つしかありません。
4 に答える
内部に CSS を追加することで、実際に背景色を変更できます。少し複雑に思えるかもしれませんが、これを自分のプロジェクトで実行して使用するのは非常に簡単です。試してみて参照して、役立つかどうかを確認してください
CSS タグ
<link rel="stylesheet" href="css/style.css" type="text/css" />
私のCSSファイルの私のCSSコード
body {
font-family: helvetica, arial, sans-serif;
background:#FCDFFF; //you can choose the html colour code accordingly
}
aspx ウィンドウ フォーム ページには、body が必要です。その本文は、実際には css ファイルの本文にリンクしています。これがあなたの意図したものであることを願っています。これの良い点は、任意の色を選択できることです。
you can do it but it will not be easy You have to use P/Invoke for this:
The thing you are trying to achieve is known as Drawing in Non Client Area of Windows Form.
Title Bar(is the place where maximize , minimize , close button resides) of a Windows Form is not in Client Area of it and there is not direct way of painting it.
Anyhow You will get a lot of articles and project on it on Internet here is it:
http://www.codeplex.com/Wiki/View.aspx?ProjectName=CustomerBorderForm
http://www.geekswithblogs.net/kobush/articles/CustomBorderForms.aspx
http://customerborderform.codeplex.com/releases/view/146
reference taken from :http://social.msdn.microsoft.com/Forums/windows/en-US/485fb4c5-8430-4cb5-8a4d-ccd7892e403b/how-to-change-the-title-bar-appearance
これを試すことができます。スタイル プロパティBODYまたはFORMを使用する
<body style="background-color:green; ">
<form id="form1" runat="server" style ="background-color:green;">
...
</form>
</body>
以下のサイトを参照してください。ソリューションに関する多くの情報があります。
http://msdn.microsoft.com/en-us/library/aa288405(v=vs.71).aspx
http://www.codeproject.com/Questions/165119/How-to-change-the-color-of-Windows-form-header
http://www.dotnetfunda.com/codes/code359-change-the-window-form-color.aspx