You are on page 1of 7

Horga Andrei A.I.

A-anul I Aplicatia dechide un form de culoarea alba pe care sunt plasate 3 butoane precum: Start 1, Start 2, Start 3 si un label cu textul de culoare rosu: ,, ine ai !enit"##

$and dam clic% pe butonul Start 1 se !a schimba culoarea formului in albastru si textul labalului in: ,,Ai apasat start 1##.

$and dam clic% pe butonul Start 2 se !a schimba culoarea formului in albastru!iolet si textul labalului in: ,,Ai apasat start 2##.

$and dam clic% pe butonul Start 3 se !a schimba culoarea formului in coral si textul labalului in: ,,Ai apasat start 3##.

$odul sursa
#pragma once

namespace ha { using using using using using using namespace namespace namespace namespace namespace namespace System; System::ComponentModel; System::Collections; System::Windows::Forms; System::Data; System::Drawing;

/// <summary /// Summary !or Form" /// /// W#$%&%': &! you change the name o! this class( you will need to change the /// )$esource File %ame) property !or the managed resource compiler tool /// associated with all *res+ !iles this class depends on* ,therwise( /// the designers will not -e a-le to interact properly with locali.ed /// resources associated with this !orm* /// </summary pu-lic re! class Form" : pu-lic System::Windows::Forms::Form { pu-lic: Form"/0oid1 { &nitiali.eComponent/1; // //2,D,: #dd the constructor code here // 3 protected: /// <summary /// Clean up any resources -eing used* /// </summary 4Form"/1 { i! /components1 { delete components; 3 3 pri0ate: System::Windows::Forms::5utton6 -utton"; protected: pri0ate: System::Windows::Forms::5utton6 -utton7; pri0ate: System::Windows::Forms::5utton6 -utton8; pri0ate: System::Windows::Forms::9a-el6 la-el"; pri0ate: /// <summary /// $e:uired designer 0aria-le* /// </summary System::ComponentModel::Container 6components; #pragma region Windows Form Designer generated code

/// <summary /// $e:uired method !or Designer support ; do not modi!y /// the contents o! this method with the code editor* /// </summary 0oid &nitiali.eComponent/0oid1 { this; -utton" < /gcnew System::Windows::Forms::5utton/11; this; -utton7 < /gcnew System::Windows::Forms::5utton/11; this; -utton8 < /gcnew System::Windows::Forms::5utton/11; this; la-el" < /gcnew System::Windows::Forms::9a-el/11; this; Suspend9ayout/1; // // -utton" // this; -utton"; Font < /gcnew System::Drawing::Font/9=Microso!t Sans Seri!=( >*7?F( System::Drawing::FontStyle::5old( System::Drawing::'raphics@nit::Aoint( staticBcast<System::5yte /C111; this; -utton"; ForeColor < System::Drawing::Color::From#rg-/staticBcast<System::&nt87 /staticBcast <System::5yte /C11( staticBcast<System::&nt87 /staticBcast<System::5yte /C11( staticBcast<System::&nt87 /staticBcast<System::5yte /"D7111; this; -utton"; 9ocation < System::Drawing::Aoint/E8(

?C1;

this; -utton"; %ame < 9=-utton"=; this; -utton"; Si.e < System::Drawing::Si.e/DE( EC1; this; -utton"; 2a-&nde+ < C; this; -utton"; 2e+t < 9=Start "=; this; -utton"; @seFisualStyle5acGColor < true; this; -utton"; ClicG H< gcnew System::I0entJandler/this( KForm"::-utton"BClicG1; // // -utton7 // this; -utton7; Font < /gcnew System::Drawing::Font/9=Microso!t Sans Seri!=( >*7?F( System::Drawing::FontStyle::5old( System::Drawing::'raphics@nit::Aoint( staticBcast<System::5yte /C111; this; -utton7; ForeColor < System::Drawing::Color::From#rg-/staticBcast<System::&nt87 /staticBcast <System::5yte /C11( staticBcast<System::&nt87 /staticBcast<System::5yte /C11( staticBcast<System::&nt87 /staticBcast<System::5yte /"D7111; this; -utton7; 9ocation < System::Drawing::Aoint/">E( this; this; this; this; this; -utton7; -utton7; -utton7; -utton7; -utton7; %ame < 9=-utton7=; Si.e < System::Drawing::Si.e/>L( 8M1; 2a-&nde+ < "; 2e+t < 9=Start 7=; @seFisualStyle5acGColor < true;

?71;

this; -utton7; ClicG H< gcnew System::I0entJandler/this( KForm"::-utton7BClicG1; // // -utton8 // this; -utton8; Font < /gcnew System::Drawing::Font/9=Microso!t Sans Seri!=( >*7?F( System::Drawing::FontStyle::5old( System::Drawing::'raphics@nit::Aoint( staticBcast<System::5yte /C111; this; -utton8; ForeColor < System::Drawing::Color::From#rg-/staticBcast<System::&nt87 /staticBcast <System::5yte /C11( staticBcast<System::&nt87 /staticBcast<System::5yte /C11( staticBcast<System::&nt87 /staticBcast<System::5yte /"D7111; this; -utton8; 9ocation < System::Drawing::Aoint/87C( ?E1; this; -utton8; %ame < 9=-utton8=; this; -utton8; Si.e < System::Drawing::Si.e/>D( 8?1; this; -utton8; 2a-&nde+ < 7; this; -utton8; 2e+t < 9=Start 8=; this; -utton8; @seFisualStyle5acGColor < true; this; -utton8; ClicG H< gcnew System::I0entJandler/this( KForm"::-utton8BClicG1; // // la-el" // this; la-el"; #utoSi.e < true; this; la-el"; Font < /gcnew System::Drawing::Font/9=Microso!t Sans Seri!=( D*M?F( System::Drawing::FontStyle::5old( System::Drawing::'raphics@nit::Aoint( staticBcast<System::5yte /C111; this; la-el"; ForeColor < System::Drawing::Color::$ed; this; la-el"; 9ocation < System::Drawing::Aoint/8?>( ">L1; this; la-el"; %ame < 9=la-el"=; this; la-el"; Si.e < System::Drawing::Si.e/DM( "L1; this; la-el"; 2a-&nde+ < 8; this; la-el"; 2e+t < 9=5ine ai 0enitN=; // // Form" // this; #utoScaleDimensions < System::Drawing::Si.eF/L( "81; this; #utoScaleMode < System::Windows::Forms::#utoScaleMode::Font; this; ClientSi.e < System::Drawing::Si.e/?7D( 7LE1; this; Controls; #dd/this; la-el"1; this; Controls; #dd/this; -utton81; this; Controls; #dd/this; -utton71; this; Controls; #dd/this; -utton"1; this; %ame < 9=Form"=; this; 2e+t < 9=Form"=; this; $esume9ayout/!alse1; this; Aer!orm9ayout/1; 3

#pragma endregion pri0ate: System::Foid -utton"BClicG/System::,-Oect6 sender( System::I0ent#rgs6 e1 { this; 5acGColor<System::Drawing::Color::5lue; this; la-el"; 2e+t<=#i apasat Start "=; 3 pri0ate: System::Foid -utton7BClicG/System::,-Oect6 sender( System::I0ent#rgs6 e1 { this; 5acGColor<System::Drawing::Color::5lueFiolet; this; la-el"; 2e+t<=#i apasat Start 7=; 3 pri0ate: System::Foid -utton8BClicG/System::,-Oect6 sender( System::I0ent#rgs6 e1 { this; 5acGColor<System::Drawing::Color::Coral; this; la-el"; 2e+t<=#i apasat Start 8=; 3 3; 3

You might also like