HatakeAzzi Posted August 12, 2009 Author Share Posted August 12, 2009 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:```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:``` 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:``` 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:```News=Web```Images (I used the mode of events and news):Just it.Credits: HatakeAzziEdit:U can use it to make news of events and moreEdit²:I forget a thing…Edit³:Added some images Link to comment Share on other sites More sharing options...
Guest Posted August 12, 2009 Share Posted August 12, 2009 Thats cool, but dont use spoilers its screwing up code thing Link to comment Share on other sites More sharing options...
HatakeAzzi Posted August 12, 2009 Author Share Posted August 12, 2009 Ok! I'm sorry. I'll edit it now. Link to comment Share on other sites More sharing options...
Guest Posted August 12, 2009 Share Posted August 12, 2009 Nice, works great Link to comment Share on other sites More sharing options...
HatakeAzzi Posted August 12, 2009 Author Share Posted August 12, 2009 Thanks :) Link to comment Share on other sites More sharing options...
Guest Posted August 12, 2009 Share Posted August 12, 2009 You should add image and color support Link to comment Share on other sites More sharing options...
HatakeAzzi Posted August 13, 2009 Author Share Posted August 13, 2009 Alright, some imagens been added. Link to comment Share on other sites More sharing options...
Alster Posted August 13, 2009 Share Posted August 13, 2009 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. Link to comment Share on other sites More sharing options...
HatakeAzzi Posted August 13, 2009 Author Share Posted August 13, 2009 It is a good idea too, I do not thought about it :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now