PDA

View Full Version : ●~-~-~- Asian Web Browser -~-~-~●


That Asian Guy
9th December 2007, 20:43
i made a web browser :P

Here it is

It has no functions, such as back etc, but it loads uber quick.

Source Code:


#pragma once


namespace AsianWebBrowser {

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
///
/// 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.
/// </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::WebBrowser^ webBrowser1;
protected:
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::TextBox^ textBox1;

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)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(F orm1::typeid));
this->webBrowser1 = (gcnew System::Windows::Forms::WebBrowser());
this->button1 = (gcnew System::Windows::Forms::Button());
this->label1 = (gcnew System::Windows::Forms::Label());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->SuspendLayout();
//
// webBrowser1
//
this->webBrowser1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom)
| System::Windows::Forms::AnchorStyles::Left)
| System::Windows::Forms::AnchorStyles::Right));
this->webBrowser1->Location = System::Drawing::Point(12, 39);
this->webBrowser1->MinimumSize = System::Drawing::Size(20, 20);
this->webBrowser1->Name = L"webBrowser1";
this->webBrowser1->Size = System::Drawing::Size(682, 413);
this->webBrowser1->TabIndex = 0;
this->webBrowser1->Url = (gcnew System::Uri(L"http://www.msn.com", System::UriKind::Absolute));
this->webBrowser1->Navigated += gcnew System::Windows::Forms::WebBrowserNavigatedEventHa ndler(this, &Form1::webBrowser1_Navigated);
//
// button1
//
this->button1->Location = System::Drawing::Point(660, 10);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(34, 23);
this->button1->TabIndex = 1;
this->button1->Text = L"GO";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(12, 15);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(35, 13);
this->label1->TabIndex = 2;
this->label1->Text = L"URL :";
//
// textBox1
//
this->textBox1->Location = System::Drawing::Point(53, 10);
this->textBox1->Name = L"textBox1";
this->textBox1->Size = System::Drawing::Size(601, 20);
this->textBox1->TabIndex = 3;
this->textBox1->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &Form1::textBox1_KeyDown);
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(706, 464);
this->Controls->Add(this->textBox1);
this->Controls->Add(this->label1);
this->Controls->Add(this->button1);
this->Controls->Add(this->webBrowser1);
this->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"$this.Icon")));
this->Name = L"Form1";
this->Text = L"Asian Web Browser";
this->ResumeLayout(false);
this->PerformLayout();

}
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
if ( !this->textBox1->Text->Equals( "" ) )
{
this->webBrowser1->Navigate( this->textBox1->Text );
}
}

private: System::Void textBox1_KeyDown(System::Object^ sender, System::Windows::Forms::KeyEventArgs^ e)
{
if ( e->KeyCode == System::Windows::Forms::Keys::Enter && !this->textBox1->Text->Equals( "" ) )
{
this->webBrowser1->Navigate( this->textBox1->Text );
}

}
private: System::Void webBrowser1_Navigated(System::Object^ sender, System::Windows::Forms::WebBrowserNavigatedEventAr gs^ e)
{
this->textBox1->Text = this->webBrowser1->Url->ToString();
}
};
}

bonkers
9th December 2007, 21:24
nice ,but i get an error when i go to launch the browser

says the application configuration is incorrect

since there is no installer to fix this i assume i am just not understanding how to use it xD

That Asian Guy
9th December 2007, 22:03
err my friends get tht error too, dunno

works fine on my comp pic (http://img220.imageshack.us/img220/4216/webbrowserjg3.png)

wcbrilman
9th December 2007, 22:26
Error: cannot execute :x

That Asian Guy
9th December 2007, 23:01
beh, dunno wht i did

heres the source

*moved to top

LeOS
10th December 2007, 22:07
Dot Net Framework install?

XxOsirisxX
10th December 2007, 22:50
This seen to be maked on .NET as the picture show.

.NET Framework 2.0+ needed to run.

That Asian Guy
10th December 2007, 22:56
how do i turn back the .net framework so it would run on other ppl's computer?

XxOsirisxX
10th December 2007, 23:11
Don't be lazy, and install.

.Net Framework 3.0 (http://www.microsoft.com/downloads/details.aspx?FamilyID=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en)

That is common lately.

That Asian Guy
10th December 2007, 23:14
im trying to run a few programs on school computers but they wont load :\

i definitely cannot install stuff there

thaicoures3
11th December 2007, 05:58
I'm pretty sure I've got the latest net framework but I'll try it and report results (should have installed with my VB Express 2008...)

+_Chain_+
16th December 2007, 04:07
eh. That's easy in VB Oo lol. The most basic xD What source is this for? VB? Delphi?

XxOsirisxX
16th December 2007, 07:19
eh. That's easy in VB Oo lol. The most basic xD What source is this for? VB? Delphi?

It needs .net frameworks, so is from Microsoft, Delphi is out of the list.

namespace AsianWebBrowser {

using namespace System;
using namespace System::ComponentModel

"using namespace" is not a VB code, and VB dose'nt need ";" at the end of the lines, just Java, Delphi and C++ needs that.

Well, Java could be on the list too.. but.. wait,

this->label1->Text = L"URL

That is not Java, in Java that would be

jLabel1.name = "URL";

no Java codes there then...

o i got it! woot, C++ .NET :D

xTc-Droop
31st December 2007, 13:36
So, what do you do with the code I am confused : ???

XxOsirisxX
31st December 2007, 18:28
So, what do you do with the code I am confused : ???

I have no idea.. but, i just read this at the topic "Web Browser" but, i don't know what that coud means :\

What do you think?

xTc-Droop
31st December 2007, 20:12
I have no idea.. but, i just read this at the topic "Web Browser" but, i don't know what that coud means :\

What do you think?

Are you tryig to be smart?? I have no clue wtf to do with the code...

That Asian Guy
3rd January 2008, 02:02
lol u need visual studio 2005 first

this is the code for "Form1.h"

CioNide
10th February 2008, 07:47
"using namespace" is not a VB code, and VB dose'nt need ";" at the end of the lines, just Java, Delphi and C++ needs that.

Well, Java could be on the list too.. but.. wait,
You forgot to include C#.

That Asian Guy
10th February 2008, 19:56
You forgot to include C#.

very true, C# is almost the same as C++

but... C# doesnt use -> and ::

XxOsirisxX
10th February 2008, 22:14
You forgot to include C#.

Yea, :bored:

C# and C++ don't have a lot of differences. So the example could be harden :P

buttkickerz
1st March 2008, 02:55
is the link down?

That Asian Guy
2nd March 2008, 03:04
yes... because it doesnt seem to work on other's computers

this thread is for the source code

kewl_dude
9th May 2008, 18:03
wtf what do i do with the code? >_< email it too me... removed

That Asian Guy
12th May 2008, 05:02
wtf what do i do with the code? >_< email it too me... removed

u need a compiler such as visual studio to run the code.

btw please remove your email.