0

ウィンドウフォームの色を基本の青からその他に変更したいです。誰かが私たちがそれを行う方法を手伝ってもらえますか? form ii formborderstyle のプロパティは 1 つしかありません。

4

4 に答える 4

1

内部に 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 ファイルの本文にリンクしています。これがあなたの意図したものであることを願っています。これの良い点は、任意の色を選択できることです。

CSS カラー コードの HTML Web ページ リンク。

于 2013-09-03T08:46:07.127 に答える
0

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&title=Painting%20NonClient%20Area

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

于 2013-09-03T09:27:44.040 に答える
0

これを試すことができます。スタイル プロパティBODYまたはFORMを使用する

<body style="background-color:green; ">
    <form id="form1" runat="server" style ="background-color:green;">
        ...
    </form>
</body>
于 2013-09-03T09:03:27.183 に答える