whiplk

wii-WebBrowser

Jan 24th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.46 KB | None | 0 0
  1. #pragma once
  2.  
  3.  
  4. namespace wii_Web_Browser {
  5.  
  6.     using namespace System;
  7.     using namespace System::ComponentModel;
  8.     using namespace System::Collections;
  9.     using namespace System::Windows::Forms;
  10.     using namespace System::Data;
  11.     using namespace System::Drawing;
  12.  
  13.     public ref class Form1 : public System::Windows::Forms::Form
  14.     {
  15.     public:
  16.         Form1(void)
  17.         {
  18.             InitializeComponent();
  19.         }
  20.  
  21.     protected:
  22.         ~Form1()
  23.         {
  24.             if (components)
  25.             {
  26.                 delete components;
  27.             }
  28.         }
  29.     private: System::Windows::Forms::WebBrowser^  webBrowser1;
  30.     protected:
  31.     private: System::Windows::Forms::Button^  button1;
  32.     private: System::Windows::Forms::Button^  button2;
  33.     private: System::Windows::Forms::TextBox^  textBox1;
  34.     private: System::Windows::Forms::Button^  button3;
  35.     private: System::Windows::Forms::Button^  button4;
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.     private:
  45.         System::ComponentModel::Container ^components;
  46.  
  47. #pragma region Windows Form Designer generated code
  48.         void InitializeComponent(void)
  49.         {
  50.             this->webBrowser1 = (gcnew System::Windows::Forms::WebBrowser());
  51.             this->button1 = (gcnew System::Windows::Forms::Button());
  52.             this->button2 = (gcnew System::Windows::Forms::Button());
  53.             this->textBox1 = (gcnew System::Windows::Forms::TextBox());
  54.             this->button3 = (gcnew System::Windows::Forms::Button());
  55.             this->button4 = (gcnew System::Windows::Forms::Button());
  56.             this->SuspendLayout();
  57.             this->webBrowser1->AccessibleName = L"";
  58.             this->webBrowser1->Location = System::Drawing::Point(0, 27);
  59.             this->webBrowser1->MinimumSize = System::Drawing::Size(20, 20);
  60.             this->webBrowser1->Name = L"webBrowser1";
  61.             this->webBrowser1->Size = System::Drawing::Size(1052, 506);
  62.             this->webBrowser1->TabIndex = 0;
  63.             this->webBrowser1->Url = (gcnew System::Uri(L"http://google.com", System::UriKind::Absolute));
  64.            
  65.             this->button1->Location = System::Drawing::Point(8, 2);
  66.             this->button1->Name = L"button1";
  67.             this->button1->Size = System::Drawing::Size(75, 23);
  68.             this->button1->TabIndex = 1;
  69.             this->button1->Text = L"Voltar";
  70.             this->button1->UseVisualStyleBackColor = true;
  71.             this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
  72.             this->button2->Location = System::Drawing::Point(89, 2);
  73.             this->button2->Name = L"button2";
  74.             this->button2->Size = System::Drawing::Size(75, 23);
  75.             this->button2->TabIndex = 2;
  76.             this->button2->Text = L"Avançar";
  77.             this->button2->UseVisualStyleBackColor = true;
  78.             this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
  79.             this->textBox1->Location = System::Drawing::Point(170, 4);
  80.             this->textBox1->Name = L"textBox1";
  81.             this->textBox1->Size = System::Drawing::Size(625, 20);
  82.             this->textBox1->TabIndex = 3;
  83.             this->textBox1->Text = L"http://www.google.com";
  84.             this->button3->Location = System::Drawing::Point(801, 2);
  85.             this->button3->Name = L"button3";
  86.             this->button3->Size = System::Drawing::Size(75, 23);
  87.             this->button3->TabIndex = 4;
  88.             this->button3->Text = L"Procurar";
  89.             this->button3->UseVisualStyleBackColor = true;
  90.             this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);
  91.             this->button4->Location = System::Drawing::Point(882, 2);
  92.             this->button4->Name = L"button4";
  93.             this->button4->Size = System::Drawing::Size(75, 23);
  94.             this->button4->TabIndex = 5;
  95.             this->button4->Text = L"Site home";
  96.             this->button4->UseVisualStyleBackColor = true;
  97.             this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);
  98.             this->AccessibleRole = System::Windows::Forms::AccessibleRole::Window;
  99.             this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
  100.             this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  101.             this->BackColor = System::Drawing::SystemColors::ActiveCaptionText;
  102.             this->ClientSize = System::Drawing::Size(1052, 533);
  103.             this->Controls->Add(this->button4);
  104.             this->Controls->Add(this->button3);
  105.             this->Controls->Add(this->textBox1);
  106.             this->Controls->Add(this->button2);
  107.             this->Controls->Add(this->button1);
  108.             this->Controls->Add(this->webBrowser1);
  109.             this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::SizableToolWindow;
  110.             this->Name = L"Form1";
  111.             this->Text = L"Wii Browser";
  112.             this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
  113.             this->ResumeLayout(false);
  114.             this->PerformLayout();
  115.  
  116.         }
  117. #pragma endregion
  118.     private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
  119.              }
  120.     private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
  121.                  this->webBrowser1->GoBack();
  122.              }
  123. private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
  124.              this->webBrowser1->GoForward();
  125.          }
  126. private: System::Void button3_Click(System::Object^  sender, System::EventArgs^  e) {
  127.              this->webBrowser1->Navigate(this->textBox1->Text);
  128.              
  129.          }
  130. private: System::Void button4_Click(System::Object^  sender, System::EventArgs^  e) {
  131.              this->webBrowser1->Navigate("www.google.com");
  132.          }
  133. private: System::Void label1_Click(System::Object^  sender, System::EventArgs^  e) {
  134.          }
  135. private: System::Void label1_Click_1(System::Object^  sender, System::EventArgs^  e) {
  136.          }
  137. private: System::Void label1_DoubleClick(System::Object^  sender, System::EventArgs^  e) {
  138.          }
  139. private: System::Void label1_Layout(System::Object^  sender, System::Windows::Forms::LayoutEventArgs^  e) {
  140.          }
  141. private: System::Void progressBar1_Click(System::Object^  sender, System::EventArgs^  e) {
  142.          }
  143. };
  144. }
Advertisement
Add Comment
Please, Sign In to add comment