K
Keith
Hello,
I have invested years and years into Visual Basic in Visual Studio and the
MS Office products. Now, I’m taking a look at Visual c++ looking at it with
Visual c++ Express 2008. It looks really promising. And there are some
significant improvements since my old copy of Visual Studio was purhased. I
have written many plain old c functions in the vc++ environment, and today
moved to a new step.
I created a project with a form, (same as I did in VB) and added a button
“button1†then I looked at the code that shows properties for button1 and
that is shown below…
this->button1 = (gcnew System::Windows::Forms::Button());
this->SuspendLayout();
//
// button1
//
this->button1->Location = System:rawing:oint(136, 23);
this->button1->Name = L"button1";
this->button1->Size = System:rawing::Size(89, 42);
this->button1->TabIndex = 0;
this->button1->Text = L"button1";
this->button1->UseVisualStyleBackColor = true;
So it looks like I can make button1 call a function or do something by using
OnClick, but it would be helpful to see some code that does something when
OnClick happens. Does the code build on the followng?
this->button1->OnClick ... ??? how do I do something here, ie call a function
or is there some other way…
Thank you for giving me a lead on where this might go next.
Keith
I have invested years and years into Visual Basic in Visual Studio and the
MS Office products. Now, I’m taking a look at Visual c++ looking at it with
Visual c++ Express 2008. It looks really promising. And there are some
significant improvements since my old copy of Visual Studio was purhased. I
have written many plain old c functions in the vc++ environment, and today
moved to a new step.
I created a project with a form, (same as I did in VB) and added a button
“button1†then I looked at the code that shows properties for button1 and
that is shown below…
this->button1 = (gcnew System::Windows::Forms::Button());
this->SuspendLayout();
//
// button1
//
this->button1->Location = System:rawing:oint(136, 23);
this->button1->Name = L"button1";
this->button1->Size = System:rawing::Size(89, 42);
this->button1->TabIndex = 0;
this->button1->Text = L"button1";
this->button1->UseVisualStyleBackColor = true;
So it looks like I can make button1 call a function or do something by using
OnClick, but it would be helpful to see some code that does something when
OnClick happens. Does the code build on the followng?
this->button1->OnClick ... ??? how do I do something here, ie call a function
or is there some other way…
Thank you for giving me a lead on where this might go next.
Keith