/*★ Mouse Down をカウント 前田 稔 ★*/
#using <System.dll>
#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>
using namespace System;
using namespace System::Windows::Forms;
using namespace System::Drawing;
ref class FormClass : public System::Windows::Forms::Form
{
public:
int cnt;
//Constructor
FormClass()
{
this->Text = "Bar Message";
cnt = 0;
}
virtual void OnMouseDown(MouseEventArgs^ e) override
{
cnt++;
this->Text = "cnt=" + cnt;
}
};
//★ main() 関数
int main()
{
Application::Run(gcnew FormClass());
return 0;
}
|