Saturday, November 20, 2010

Where to put the codes in visual basic?

i'm new to visual basic and so i was watching tutorials on youtube i see that when they are going to put the codes into something (example button 1) they double click the button one icon and put the code after the words (private sub) that are already in there but when i try to do the same i get this (#pragma once





namespace hyy {



using namespace System;

using namespace System::ComponentModel;

using namespace System::Collections;

using namespace System::Windows::Forms;

using namespace System::Data;

using namespace System::Drawing;



/// %26lt;summary%26gt;

/// Summary for Form1

///

/// WARNING: If you change the name of this class, you will need to change the

/// 'Resource File Name' property for the managed resource compiler tool

/// associated with all .resx files this class depends on. Otherwise,

/// the designers will not be able to interact properly with localized

/// resources associated with this form.

/// %26lt;/summary%26gt;

public ref class Form1 : public System::Windows::Forms::Form

{

public:

Form1(void)

{

InitializeComponent();

//

//TODO: Add the constructor code here

//

}



protected:

/// %26lt;summary%26gt;

/// Clean up any resources being used.

/// %26lt;/summary%26gt;

~Form1()

{

if (components)

{

delete components;

}

}

private: System::Windows::Forms::Button^ button1;

protected:



private:

/// %26lt;summary%26gt;

/// Required designer variable.

/// %26lt;/summary%26gt;

System::ComponentModel::Container ^components;



#pragma region Windows Form Designer generated code

/// %26lt;summary%26gt;

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// %26lt;/summary%26gt;

void InitializeComponent(void)

{

this-%26gt;button1 = (gcnew System::Windows::Forms::Button());

this-%26gt;SuspendLayout();

//

// button1

//

this-%26gt;button1-%26gt;Location = System::Drawing::Point(66, 103);

this-%26gt;button1-%26gt;Name = L';button1';;

this-%26gt;button1-%26gt;Size = System::Drawing::Size(75, 23);

this-%26gt;button1-%26gt;TabIndex = 0;

this-%26gt;button1-%26gt;Text = L';button1';;

this-%26gt;button1-%26gt;UseVisualStyleBackCo?= true;

this-%26gt;button1-%26gt;Click += gcnew System::EventHandler(this, %26amp;Form1::button1_Click);

//

// Form1

//

this-%26gt;AutoScaleDimensions = System::Drawing::SizeF(6, 13);

this-%26gt;AutoScaleMode = System::Windows::Forms::AutoScaleMode::F?br>
this-%26gt;ClientSize = System::Drawing::Size(284, 264);

this-%26gt;Controls-%26gt;Add(this-%26gt;button1);

this-%26gt;Name = L';Form1';;

this-%26gt;Text = L';Form1';;

this-%26gt;ResumeLayout(false);



}

#pragma endregion

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

}

};

}



i do not know where the codes goes or how to fix this please help.Where to put the codes in visual basic?
Your code isn't VB.

I think that's Visual C++...

No comments:

Post a Comment