Eclipse - Free 2D Mmorpg Maker
March 12, 2010, 05:28:49 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   chat Login Register  
 
 
   
 
collapse

* No Spam Or Websites

Refresh History

* Recent Topics

Scripting by waltercross
[Today at 05:26:24 AM]


Let's make a spritesheet! by Jungletoe
[Today at 04:25:34 AM]


Lets make a tileset! by Jungletoe
[Today at 04:19:06 AM]


The Rules of the Game by Godlord
[Today at 03:59:08 AM]


Im fairly new to this. by lc3
[Today at 03:23:04 AM]


Pointing something out... by Ddunit - Aizawa
[Today at 02:29:15 AM]


Pokemon Cyrus Online 2010 by Ddunit - Aizawa
[Today at 01:57:07 AM]


My first graphic by мсичġġєт
[Today at 01:39:55 AM]


Rate this image! by мсичġġєт
[Today at 01:36:52 AM]


Last one to post Wins by In7el3ct
[Today at 12:28:59 AM]


* Who's Online

  • Dot Guests: 28
  • Dot Hidden: 1
  • Dot Users: 8
  • Dot Users Online:

Site Author : Topic: Using WebBrowser to news  (Read 383 times)
0 Members and 1 Guest are viewing this topic.
August 11, 2009, 11:28:06 PM
Member
**
User No : 10800
Posts: 27
Location : Brazil
You are a pirate, yeah!
  • View Profile
  • WWW
Hi guys! I'm here again... Now I'll teach you to choose between WebBrowser or the original coming with engine for show "the news". First you'll need add a component... Project > Components > Microsoft Internet Controls. Well, go to frmMainMenu and add 2 OptionButton and change they names to: optWeb and optIni. Add a WebBrowser and change the name to: webNews

C'mon to codes  ;)

On frmMainMenu, find: Private Sub Form_Load()
And search for Call MainMenuInit. Bellow add:

Code: [Select]
If ReadINI("CONFIG", "News", App.Path & "\config.ini") = "Web" Then
        picNews.Visible = False
        webNews.Visible = True
        optWeb.Value = True
        optIni.Value = False
        webNews.Navigate "www.yoursite.com/news.php"
    ElseIf ReadINI("CONFIG", "News", App.Path & "\config.ini") = "Ini" Then
        picNews.Visible = True
        webNews.Visible = False
        optWeb.Value = False
        optIni.Value = True
    ElseIf ReadINI("CONFIG", "News", App.Path & "\config.ini") <> "Web" Then
        MsgBox "Your file, config.ini, has been changed and there is no automatic solutions. Please contact an administrator to fix the problem!"
        End
    ElseIf ReadINI("CONFIG", "News", App.Path & "\config.ini") <> "Ini" Then
        MsgBox "Your file, config.ini, has been changed and there is no automatic solutions. Please contact an administrator to fix the problem!"
        End
    End If

Now in event click of optWeb, add:

Code: (vb) [Select]
    If webNews.Visible = True Then
        Exit Sub
    Else
        Call WriteINI("CONFIG", "News", "Web", (App.Path & "\config.ini"))
        picNews.Visible = False
        webNews.Visible = True
        optWeb.Value = True
        optIni.Value = False
        webNews.Navigate "www.yoursite.com/news.php"
    End If

And in event click of optIni, add:

Code: (vb) [Select]
    If picNews.Visible = True Then
        Exit Sub
    Else
        Call WriteINI("CONFIG", "News", "Ini", (App.Path & "\config.ini"))
        picNews.Visible = True
        webNews.Visible = False
        optWeb.Value = False
        optIni.Value = True
    End If

Now just miss put on config.ini, on the bottom:
Code: [Select]
News=Web
Images (I used the mode of events and news):





Just it.
Credits: HatakeAzzi

Edit:
U can use it to make news of events and more

Edit²:
I forget a thing...

Edit³:
Added some images
« Last Edit: August 12, 2009, 09:17:58 PM by HatakeAzzi » Logged

Excuse me for my bad english ;x



August 11, 2009, 11:30:34 PM
Teh Uberleet
******
User No : 6546
Posts: 2260
Location : Heven
  • View Profile
  • WWW
Thats cool, but dont use spoilers its screwing up code thing
Logged

Yours,
Tiptsa, Kingdom's Knight's Online Developer

August 11, 2009, 11:34:05 PM
Member
**
User No : 10800
Posts: 27
Location : Brazil
You are a pirate, yeah!
  • View Profile
  • WWW
Ok! I'm sorry. I'll edit it now.
Logged

Excuse me for my bad english ;x



August 11, 2009, 11:36:23 PM
Teh Uberleet
******
User No : 6546
Posts: 2260
Location : Heven
  • View Profile
  • WWW
Nice, works great
Logged

Yours,
Tiptsa, Kingdom's Knight's Online Developer

August 12, 2009, 12:10:39 AM
Member
**
User No : 10800
Posts: 27
Location : Brazil
You are a pirate, yeah!
  • View Profile
  • WWW
Thanks :)
Logged

Excuse me for my bad english ;x



August 12, 2009, 12:15:33 AM
Teh Uberleet
******
User No : 6546
Posts: 2260
Location : Heven
  • View Profile
  • WWW
You should add image and color support
Logged

Yours,
Tiptsa, Kingdom's Knight's Online Developer

August 12, 2009, 09:16:31 PM
Member
**
User No : 10800
Posts: 27
Location : Brazil
You are a pirate, yeah!
  • View Profile
  • WWW
Alright, some imagens been added.
Logged

Excuse me for my bad english ;x



August 12, 2009, 09:23:25 PM
StreetEye Studios
Advanced Eclipser
*****
User No : 8106
Posts: 1121
Location : London, England, United Kingdom.
There is no freedom.
  • View Profile
  • WWW
Wouldn't it have just been quicker to use a webbrowser control and just make the radio buttons hide the control or the news box?

This is still quite good though.
Logged


My Forum | View Panel - PHP Blogger | PHP Server Admin
Previous Aliases: Alster, Crimson.
August 12, 2009, 10:16:52 PM
Member
**
User No : 10800
Posts: 27
Location : Brazil
You are a pirate, yeah!
  • View Profile
  • WWW
It is a good idea too, I do not thought about it :)
Logged

Excuse me for my bad english ;x



 


Powered by MySQL Powered by PHP Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
SimplePortal 2.3.1 © 2008-2009, SimplePortal
Valid XHTML 1.0! Valid CSS!
Page created in 0.415 seconds with 31 queries.