Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

new to c++ help

Name: Anonymous 2012-05-01 0:37

fix this
    private: System::Void trackBar1_Scroll(System::Object^  sender, System::EventArgs^  e) {
                 lbl1->Text = trackBar1->Value.ToString();
                 Form1->opacity = trackBar1->value.ToString();

Name: Anonymous 2012-05-01 0:41

SEPPLES

Name: Anonymous 2012-05-01 0:43

this is c++ in case you didnt know

Name: Anonymous 2012-05-01 2:06

^
It's not SEPPLES, it's C++/CLI or some other proprietary abomination with custom syntax

Name: Anonymous 2012-05-01 4:33

just c++ from visual studio 2010 and lbl1 is a lable that displays my trackbar value

the part i cant figure out is how to make the track bar value controll the opacity of form1

Name: Anonymous 2012-05-01 4:37

#pragma once

namespace helloworldwindows {

    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>
    /// Summary for Form1
    /// </summary>
    public ref class Form1 : public System::Windows::Forms::Form
    {
    public:
        Form1(void)
        {
            InitializeComponent();
            //
            //TODO: Add the constructor code here
            //
        }

    protected:
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        ~Form1()
        {
            if (components)
            {
                delete components;
            }
        }
    private: System::Windows::Forms::Label^  lbl1;
    private: System::Windows::Forms::Button^  button1;
    private: System::Windows::Forms::Button^  button2;
    private: System::Windows::Forms::TrackBar^  trackBar1;

    protected:

    private:
        /// <summary>
        /// Required designer variable.
        /// </summary>
        System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        void InitializeComponent(void)
        {
            this->lbl1 = (gcnew System::Windows::Forms::Label());
            this->button1 = (gcnew System::Windows::Forms::Button());
            this->button2 = (gcnew System::Windows::Forms::Button());
            this->trackBar1 = (gcnew System::Windows::Forms::TrackBar());
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->trackBar1))->BeginInit();
            this->SuspendLayout();
            //
            // lbl1
            //
            this->lbl1->AutoSize = true;
            this->lbl1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 20.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
                static_cast<System::Byte>(0)));
            this->lbl1->Location = System::Drawing::Point(12, 9);
            this->lbl1->Name = L"lbl1";
            this->lbl1->Size = System::Drawing::Size(0, 31);
            this->lbl1->TabIndex = 0;
            //
            // button1
            //
            this->button1->Location = System::Drawing::Point(12, 227);
            this->button1->Name = L"button1";
            this->button1->Size = System::Drawing::Size(75, 23);
            this->button1->TabIndex = 1;
            this->button1->Text = L"&Change";
            this->button1->UseVisualStyleBackColor = true;
            this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
            //
            // button2
            //
            this->button2->Location = System::Drawing::Point(197, 227);
            this->button2->Name = L"button2";
            this->button2->Size = System::Drawing::Size(75, 23);
            this->button2->TabIndex = 2;
            this->button2->Text = L"E&xit";
            this->button2->UseVisualStyleBackColor = true;
            this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
            //
            // trackBar1
            //
            this->trackBar1->Location = System::Drawing::Point(15, 107);
            this->trackBar1->Maximum = 100;
            this->trackBar1->Name = L"trackBar1";
            this->trackBar1->Size = System::Drawing::Size(257, 45);
            this->trackBar1->TabIndex = 3;
            this->trackBar1->Scroll += gcnew System::EventHandler(this, &Form1::trackBar1_Scroll);
            //
            // Form1
            //
            this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
            this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
            this->ClientSize = System::Drawing::Size(284, 262);
            this->Controls->Add(this->trackBar1);
            this->Controls->Add(this->button2);
            this->Controls->Add(this->button1);
            this->Controls->Add(this->lbl1);
            this->Name = L"Form1";
            this->Text = L"Form1";
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->trackBar1))->EndInit();
            this->ResumeLayout(false);
            this->PerformLayout();

        }
#pragma endregion
    private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
                 lbl1->Text = "hello world!";
             }
    private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
                 Application::Exit();
             }
    private: System::Void trackBar1_Scroll(System::Object^  sender, System::EventArgs^  e) {
                 lbl1->Text = trackBar1->Value.ToString();
                 Form1->opacity = trackBar1->value.ToString();
             }
};
}

Name: Anonymous 2012-05-01 4:52

C++: not even once.

Name: Anonymous 2012-05-01 6:46

>>3
no, it's eldritch's first digital abomination, take an electromagnet to your hard drive to be sure to be rid of it.

Name: Anonymous 2012-05-01 12:40

>>6
That's a neat little piece of code, compact and optimized, but in my opinion you need to add a few thousand NOPs somewhere in there to make it look bigger and therefore more professional. In today's business world such "tiny hacker code" is somewhat frowned upon, if you catch my drift. Peace :-o)

Name: Anonymous 2012-05-01 13:03

>>6
By no stretch of the imagination is this C++

Name: Anonymous 2012-05-01 13:10

>>10
im thinking of actually downloading visual c++ and all that shit to see if it really compiles

Name: Anonymous 2012-05-01 13:37

>>11
couldbnt instrl it
Becauase Disabled to menny qqiwindows servises maybe
or maybe its coz i ues windous xp and not vista oe 7

Name: Anonymous 2012-05-01 14:07

c++
private: System::Void ...


:DD:DD:DDDD:DDDDDD epic

Name: Anonymous 2012-05-02 10:47

>>13
I lol'd so hard that my cock, literally, penetrated a bear.

Name: Anonymous 2012-05-02 10:48

Using:namesoace:EpicPenetrationBear

Name: Anonymous 2012-05-03 3:38

Name: Anonymous 2012-05-03 11:53

>>16
Go back to the image boards, please.

Name: bampu pantsu 2012-05-29 4:42

bampu pantsu

Don't change these.
Name: Email:
Entire Thread Thread List