• 締切済み

C言語について質問・・・

柴田望洋氏の著書である明解C言語(入門編)をもとに visual C++を使ってC言語の勉強をしているのですが まず最初に15+37の計算をしようと書いてあり、とりあえず わからない文法だらけだと思うが、下の通りそのまま入力してみよう と書いてあるのですが、その文章をそのまま入力してみたところ いきなりビルドエラーがでてきました。 ↓が実際の文章です。 /* 整数値15と37の和を表示する */ #include <stdio.h> int main(void) { printf("%d",15+37); /*整数値15と37の和を10進数で表示*/ return(0); } ※本書そのままを入力しており、全角半角のミスはないと思います。 しかし、実際新しいプロジェクトを作り立ち上げた瞬間に意味の分からない 文字の羅列が出てきてそのあとに上の文章を書いてあります。 ↓がその文章 #pragma once namespace lesson01 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// <summary> /// Form1 の概要 /// </summary> public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: ここにコンストラクター コードを追加します // } protected: /// <summary> /// 使用中のリソースをすべてクリーンアップします。 /// </summary> ~Form1() { if (components) { delete components; } } private: /// <summary> /// 必要なデザイナー変数です。 /// </summary> System::ComponentModel::Container ^components; #pragma region Windows Form Designer generated code /// <summary> /// デザイナー サポートに必要なメソッドです。このメソッドの内容を /// コード エディターで変更しないでください。 /// </summary> void InitializeComponent(void) { this->SuspendLayout(); // // Form1 // this->AutoScaleDimensions = System::Drawing::SizeF(6, 12); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->ClientSize = System::Drawing::Size(284, 262); this->Name = L"Form1"; this->Text = L"Form1"; this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load); this->ResumeLayout(false); } #pragma endregion private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { } }; } /* 整数値15と37の和を表示する */ #include <stdio.h> int main(void) { printf("%d",15+37); /*整数値15と37の和を10進数で表示*/ return(0); } となっております。 ※lesson01はプロジェクト名です。 ビルドエラーは 1>------ ビルド開始: プロジェクト: lesson01, 構成: Debug Win32 ------ 1> lesson01.cpp 1>lesson01.cpp(10): error C2731: 'main' : 関数はオーバーロードできません。 1> lesson01.cpp(9) : 'main' の宣言を確認してください。 ========== ビルド: 0 正常終了、1 失敗、0 更新不要、0 スキップ ========== 保存先はwindows フォームアプリケーションを選び保存しています

みんなの回答

  • TT414
  • ベストアンサー率18% (72/384)
回答No.2

>C言語の勉強をしているのですが C言語のソースファイル名の拡張子は".c"です、".cpp"だとC++としてコンパイルします。 C言語の勉強をするのならファイル名は"lesson01.c"にしましょう。

  • hitomura
  • ベストアンサー率48% (325/664)
回答No.1

> 保存先はwindows フォームアプリケーションを選び保存しています まず「windows フォームアプリケーション」ではなく「Win32 コンソール アプリケーション」を選びましょう。 そのあとで表示される「ウィザードのアプリケーションの設定」で「空のプロジェクト」にチェックを入れて「OK」を押します。 そして、ソリューションエクスプローラーで新しいC++ファイルを追加して、そのファイルに本に書いてある通り入力しましょう。

関連するQ&A

  • VC2010プログラミング

    formの中に自作のクラスを定義して使用したいのですが、どこに定義すればよいのかわかりません。 #pragma once #include "XXX.h" namespace FileRename { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// <summary> /// Form1 の概要 /// </summary> public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: ここにコンストラクター コードを追加します // } protected: /// <summary> /// 使用中のリソースをすべてクリーンアップします。 /// </summary> ~Form1() { if (components) { delete components; } } private: System::Windows::Forms::Button^ button1; XXX^ instance = gcnew XXX(); protected: private: /// <summary> /// 必要なデザイナー変数です。 /// </summary> System::ComponentModel::Container ^components;   ・   ・   ・ } XXXクラスはこの場所で定義するのは間違いなのでしょうか?

  • VisualStudio 2008 Express

    無料でネットからダウンロードしたVisualStudio 2008 Express Edition のフォームをつかってGUIの勉強をしています。 非情報系学生のための C/C++ 入門 というサイトにある コースの 「第三回  GUI と画像処理プログラミング 」をやってみましたが、フォーム上のボタンを押せばメッセージボックスが出てくるはずなのに、何も起こりません。 何が原因なのかわかりません。詳しい方、どうか知恵を貸してください。  ちなみにそのサイトのアドレスは以下のとおりです。 http://brain.cc.kogakuin.ac.jp/~kanamaru/lecture/prog1/index.html ボタンをフォームに貼り付けると自動的に生成されるイベントハンドラーに、自分の追加した部分も含めたヘッダーファイルの内容を下に乗せておきます。 // *************************** // Form1.h file #pragma once namespace MyGUI_NET { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// <summary> /// Form1 の概要 /// /// 警告: このクラスの名前を変更する場合、このクラスが依存するすべての .resx ファイルに関連付けられた /// マネージ リソース コンパイラ ツールに対して 'Resource File Name' プロパティを /// 変更する必要があります。この変更を行わないと、 /// デザイナと、このフォームに関連付けられたローカライズ済みリソースとが、 /// 正しく相互に利用できなくなります。 /// </summary> public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: ここにコンストラクタ コードを追加します // } protected: /// <summary> /// 使用中のリソースをすべてクリーンアップします。 /// </summary> ~Form1() { if (components) { delete components; } } private: System::Windows::Forms::Button^ button1; protected: protected: private: /// <summary> /// 必要なデザイナ変数です。 /// </summary> System::ComponentModel::Container ^components; #pragma region Windows Form Designer generated code /// <summary> /// デザイナ サポートに必要なメソッドです。このメソッドの内容を /// コード エディタで変更しないでください。 /// </summary> void InitializeComponent(void) { this->button1 = (gcnew System::Windows::Forms::Button()); this->SuspendLayout(); // // button1 // this->button1->BackColor = System::Drawing::Color::PeachPuff; this->button1->Location = System::Drawing::Point(34, 35); this->button1->Name = L"button1"; this->button1->Size = System::Drawing::Size(185, 55); this->button1->TabIndex = 0; this->button1->Text = L"click me"; this->button1->UseVisualStyleBackColor = false; // // Form1 // this->AutoScaleDimensions = System::Drawing::SizeF(6, 12); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->ClientSize = System::Drawing::Size(292, 266); this->Controls->Add(this->button1); this->Name = L"Form1"; this->Text = L"Form1"; this->ResumeLayout(false); } #pragma endregion // event handler for button 1 private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { MessageBox::Show("こんにちは"); // 自分が追加した一行 } }; } //****************** どうぞよろしくお願いします。

  • C++/CLIのオブジェクト型配列

    VC++/CLIで、オブジェクト型の配列data、ArrayData(String^ s, int a, int d, double c)でコンストラクタをつくり array<Object^>^ data = gcnew ArrayData(String^ s, int a, double b); でインスタンス化したいのですがうまくいきません。 さらに、他クラスから、d->data[i].aで、data[i]」の配列のうち、整数型変数aを参照したいたいと思っていますがそれも上手くいきません。 例えば data[0]= gcnew ArrayData("山田",30,45.2); data[1]= gcnew ArrayData("高橋",66,43.2); data[2]= gcnew ArrayData("田中",86,62.7); のdata配列を用意します. VC++2005で作成したファイルを載せますので、それに対応したコード(.hファイルと.cppファイル)を教えてくれるとありがたいです。 このままでは、エラーです。内容は、メンバ変数、ドット演算子など。 --File Name:ArrayData.h-- #pragma once using namespace::System; ref class ArrayData { public:array<object^>^ data; public: ArrayData(String^ name,int data1,double data2); }; --File Name:ArrayData.cpp-- #include "StdAfx.h" #include "ArrayData.h" ArrayData::ArrayData() { data= gcnew array<Object^>(5); data[0]= gcnew ArrayData("山田",30,45.2); data[1]= gcnew ArrayData("高橋",66,43.2); data[2]= gcnew ArrayData("田中",86,62.7); } --File Name Form1.h-- #pragma once #include"ArrayData.h" namespace TestDataArray { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// <summary> /// Form1 の概要 /// /// 警告: このクラスの名前を変更する場合、このクラスが依存するすべての .resx ファイルに関連付けられた /// マネージ リソース コンパイラ ツールに対して 'Resource File Name' プロパティを /// 変更する必要があります。この変更を行わないと、 /// デザイナと、このフォームに関連付けられたローカライズ済みリソースとが、 /// 正しく相互に利用できなくなります。 /// </summary> public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: ここにコンストラクタ コードを追加します // ArrayData^ abc = gcnew ArrayData(); //ArrayDataクラスのインスタンス化 int bee= abc->data[0].data1; //data[0]配列のdata1の値(=30)を参照 String^ cee=bee.ToString();  //beeを文字列化 MessageBox::Show(cee); //メッセージボックスにceeを表示 } protected: /// <summary> /// 使用中のリソースをすべてクリーンアップします。 /// </summary> ~Form1() { if (components) { delete components; } } private: /// <summary> /// 必要なデザイナ変数です。 /// </summary> System::ComponentModel::Container ^components; #pragma region Windows Form Designer generated code /// <summary> /// デザイナ サポートに必要なメソッドです。このメソッドの内容を /// コード エディタで変更しないでください。 /// </summary> void InitializeComponent(void) { this->components = gcnew System::ComponentModel::Container(); this->Size = System::Drawing::Size(300,300); this->Text = L"Form1"; this->Padding = System::Windows::Forms::Padding(0); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; } #pragma endregion }; } --File Name:TestDataArray.cpp-- // TestDataArray.cpp : メイン プロジェクト ファイルです。 #include "stdafx.h" #include "Form1.h" using namespace TestDataArray; [STAThreadAttribute] int main(array<System::String ^> ^args) { // コントロールが作成される前に、Windows XP ビジュアル効果を有効にします Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); // メイン ウィンドウを作成して、実行します Application::Run(gcnew Form1()); return 0; }

  • フォームのテキストコントロールへの出力

    Cは分かりますが、C++初心者です。 よろしくお願いします。 namespace sample1 外にある関数から、フォームのコントロールにアクセスするには、 どうしたらいいのでしょうか? ========================================================== #pragma once void DspData( ReadData *readdata ); //コールバック関数宣言 namespace sample1 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; public __gc class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); } protected: void Dispose(Boolean disposing) { if (disposing && components) { components->Dispose(); } __super::Dispose(disposing); } private: System::Windows::Forms::Label * label1; private: System::Windows::Forms::Button * start; private: System::Windows::Forms::Button * end; public: System::Windows::Forms::TextBox * textBox1; private: System::ComponentModel::Container * components; void InitializeComponent(void) { } private: System::Void start_Click(System::Object * sender, System::EventArgs * e) { } }; } //------------------------------------------------ // DspData //------------------------------------------------ void DspData( ReadData *readdata ) { //***↓ここでフォームのテキストボックスへの表示を行いたい。***** textBox1->set_text("ここで出力") return; } ==========================================================

  • Windowsフォームの表示

    Visual C++ 2005(Express Edition)で、windowsフォームを3個作りました。 1個目をForm1.h、2個目をForm2.h、3個目をForm3.h、メインプロジェクトは、Sample.cpp, ファイルとします。 Form1にボタンbutton1を作成し、ボタンをクリックしたイベントが発生したとき、Form2を表示させます。 Form2には、ボタンbutton2があります。 Form1と同様に、Form2のボタンをクリックするとForm3の画面が表示されるようにします。 ところが、以下のソースファイルで書いたところ、Form2とForm3は、名前空間に存在しませんという意味のエラーが生じます。 Form2とForm3をインスタンス化し、Show()メッソドで、画面を表示させる方法です。 しかし、Form1とForm2だけのファイルですと、先のソースの書き方で上手くいきます。 何か、書き方が異なるのでしょうか?正しい書き方を教えてくださいますとありがたいです。 なお、C++/CLIの文法に沿った、ソースコードでお願いします。 <ソースファイル> ----Form1.h----------------------------- #pragma once #include "stdafx.h" #include "Form2.h" #include "Form3.h" namespace Sample { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// <summary> /// Form1 の概要 /// /// 警告: このクラスの名前を変更する場合、このクラスが依存するすべての .resx ファイルに関連付けられた /// マネージ リソース コンパイラ ツールに対して 'Resource File Name' プロパティを /// 変更する必要があります。この変更を行わないと、 /// デザイナと、このフォームに関連付けられたローカライズ済みリソースとが、 /// 正しく相互に利用できなくなります。 /// </summary> public ref class Form1 : public System::Windows::Forms::Form { //button1を作成 //省略 #pragma endregion private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { Form2^ a = gcnew Form2(); a->Show(); } }; } [EOF] --------------------------------------- ----Form2.h---------------------------- #pragma once #include "Form1.h" #include "Form3.h" using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; namespace Sample { /// <summary> /// IsotopeInput の概要 /// /// 警告: このクラスの名前を変更する場合、このクラスが依存するすべての .resx ファイルに関連付けられた /// マネージ リソース コンパイラ ツールに対して 'Resource File Name' プロパティを /// 変更する必要があります。この変更を行わないと、 /// デザイナと、このフォームに関連付けられたローカライズ済みリソースとが、 /// 正しく相互に利用できなくなります。 /// </summary> public ref class Form2 : public System::Windows::Forms::Form { //button2を作成 //省略 } #pragma endregion private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) { Form3^ b = gcnew Form3(); b->Show(); } }; } [EOF] --------------------------------------- -------Form3.h-------------------------- #pragma once #include "stdafx.h" #include "Form1.h" #include "Form2.h" using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; namespace Sample { /// <summary> /// Result の概要 /// /// 警告: このクラスの名前を変更する場合、このクラスが依存するすべての .resx ファイルに関連付けられた /// マネージ リソース コンパイラ ツールに対して 'Resource File Name' プロパティを /// 変更する必要があります。この変更を行わないと、 /// デザイナと、このフォームに関連付けられたローカライズ済みリソースとが、 /// 正しく相互に利用できなくなります。 /// </summary> public ref class Form3 : public System::Windows::Forms::Form { //省略 } #pragma endregion }; } [EOF] --------------------------------------------------------- Sample.cpp----------------------------------------------- // Sample.cpp : メイン プロジェクト ファイルです。 #include "stdafx.h" #include "Form1.h" #include "Form2.h" #include "Form3.h" using namespace Sample; [STAThreadAttribute] int main(array<System::String ^> ^args) { // コントロールが作成される前に、Windows XP ビジュアル効果を有効にします Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); // メイン ウィンドウを作成して、実行します Application::Run(gcnew Form1()); return 0; } [EOF] ------------------------------------------------------------

  • 別スレッドからメインスレッドのテキストボックスに文字を表示させたい

    Visual C++ 2005 Express Editionを使用している初心者です。 タイトルの方法がどうしてもわからないので教えてください。 うまく説明できないので聞きたいところのコードを載せます。 //SAMPLE.cpp #include "stdafx.h" #include "Form1.h" using namespace SAMPLE; int main(array<System::String ^> ^args) { Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); Application::Run(gcnew Form1()); } //Form1.h #include <process.h> #include <vcclr.h> namespace SAMPLE { unsigned __stdcall counter(void *arg); int thread_id1; unsigned dummy; using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; public ref class Form1 : public System::Windows::Forms::Form { public:Form1(void) { InitializeComponent(); //別スレッド起動 thread_id1=_beginthreadex(NULL,0,counter,(void *)1,0,&dummy); } private: System::Windows::Forms::TextBox^ textBox1; private: System::ComponentModel::Container ^components; void InitializeComponent(void) { this->textBox1 = (gcnew System::Windows::Forms::TextBox()); //省略(コンポーネント初期化) } private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { } }; unsigned __stdcall counter(void *arg){ //別スレッド //ここで文字列を記述して上のtextBox1に表示したい return 0; } } 初歩的なことかもしれませんが、 よろしくお願いします。

  • c#のプログラムについて。

    c#のプログラムについて。 お世話になります。 c#初心者です。 下記の様なコードを記述してますが、 「 Form1.Button1.Visible == false;」の部分で 「'WindowsFormApplication1.Form1'にButton1'の定義がありません。」 と言うエラーが出てしまいます。 どの様に定義して良いのかが分からず、悩んでいます。 どなたかお教え頂きたく宜しくお願い致します。        記 using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace WindowsFormsApplication3 { static class Program { /// <summary> /// アプリケーションのメイン エントリ ポイントです。 /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); string result = System.Environment.MachineName; if (result == "xxxxxxx") { Form1.Button1.Visible == false; } } } }

  • C# フォームを閉じてもプログラムが終了しない

    前略 ・C#の初心者です。 ・下記のようなプログラムを作りたいと思っています。プログラムは<作りたいプログラム>の仕様どうりに動作していますが、Form1のFormClosingイベントに Application.Exit()を追加しないと フォーム1で "X"(閉じる)をクリックしても(フォームは非表示になりますが)プログラムが終了しません。プログラムでどこかおかしな部分があると思っています。Application.Exit()を追加しないでもプログラムを終了する方法を教えてください。 <作りたいプログラム> (1)Form1 のbutton1をクリックすると新しいForm2が作成され表示される。Form2が表示されるとForm1は非表示となる。 (2)Form2 のbutton1をクリックするとForm2が非表示となりForm1が表示される。 (3)Form1 の "X"(閉じる)をクリックしてプログラムを終了する。 //Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace formClose { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Form2 form2 = new Form2(); form2.Show(); //フォーム2を表示 this.Hide(); //フォーム1を非表示 } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Application.Exit(); //アプリケーション終了 } } } //Form2.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace formClose { public partial class Form2 : Form { Form1 form1 = new Form1(); public Form2() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { this.Close(); //フォーム2を閉じる } private void Form2_FormClosing(object sender, FormClosingEventArgs e) { form1.Show(); //フォーム1を表示する } } } 以上

  • フォーム間のデータ受け渡し

    現在VIsual Studio 2005のフォームアプリケーションを使ってプログラミングしています。ボタンを押すことで新たな子フォームを作成し、親フォームから子フォームへグローバル関数で宣言しているbmp[],picture[],red[]などのデータを渡したいのですがどうすればいいのかわからず困っております。子フォームから親フォームへテキストボックスなどの値を渡す方法などはわかったのですが、それをどう応用していいのかもわからない状況です。最終的には親フォームのbmp[0]におけるred[0]が1(画像処理されている)なら子フォームでbmp[0]を表示させたいと思っています。わかる方がいましたらどうかご教授ください。よろしくお願いします。以下がプログラムとなっております。 *** 親フォーム *** #pragma once #include "pic2.h" namespace pic { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; using namespace System::IO; // 省略 // public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: ここにコンストラクタ コードを追加します // bmp = nullptr; Array::Resize( bmp, 20 ); Array::Resize( picture, 20 ); Array::Resize( bmpr, 20 ); this->red = gcnew array<int>(20); } // 省略 // private: System::Windows::Forms::PictureBox^ pictureBox1; private:array< Bitmap^>^ bmp; // 原画像格納 // private:array< Bitmap^>^ bmpr; // 処理画像格納 // private:array< PictureBox^>^ picture; private:array< int>^ red; // 処理:1 不処理:0 // // 省略 // #pragma endregion private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { bmp[0] = gcnew Bitmap("ファイル名",true); } private: System::Void button1_Click_1(System::Object^ sender, System::EventArgs^ e) { pic2 ^p2 = gcnew pic2(); p2->ShowDialog();     /* ボタンを押すことで新たなフォーム作成 */ } private: System::Void pictureBox1_Click(System::Object^ sender, System::EventArgs^ e) { int x,y; int w = bmpr[0]->Width; int h = bmpr[0]->Height; if(red[0] == 1){ bmp[0] = gcnew Bitmap("ファイル名",true); pictureBox1->Image = bmp[0]; red[0] = 0; return; } if(red[0] == 0){ // 画像処理 // pictureBox1->Image = bmpr[0]; red[0] = 1; } } }; *** 子フォーム *** #pragma once //#include "Form1.h" #include "pic3.h" using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; namespace pic { /// <summary> /// pic2 の概要 /// public ref class pic2 : public System::Windows::Forms::Form { public: pic2(void) { InitializeComponent(); // //TODO: ここにコンストラクタ コードを追加します // } // 省略 // } #pragma endregion private: System::Void pic2_Load(System::Object^ sender, System::EventArgs^ e) { if(親フォームのred[0]==1ならば){ pictureBox1->Image = bmp[0] } } private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {   // 新たな子フォームpic3作成 // } private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) { this->Close(); } }; }

  • C# タスク非表示でタイトルバーは表示する

    前略 ・C#の初心者です。 ・タスクバーは下記のプログラムで非表示とすることができますが、同時にタイトルバーも消えてしまいます。タスクバーは非表示で、右端に閉じる・最大化・最小化アイコン("X"、 "□"、"_")のないタイトルバーを表示したいのですが、その方法をおしえてください。 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace noTaskbar { public partial class Form1 : Form { public Form1() { InitializeComponent(); this.FormBorderStyle = FormBorderStyle.None;//タイトルバー&タスクバー非表示 this.WindowState = FormWindowState.Maximized;// } } } 以上、よろしくお願いします

専門家に質問してみよう