Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,282 members, 7,807,948 topics. Date: Wednesday, 24 April 2024 at 11:42 PM

Vb 6.0/vb .NET & Intranet/internet Application Development - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Vb 6.0/vb .NET & Intranet/internet Application Development (7731 Views)

A Comprehensive Tutorial On Vb 6.0 / My Board Games In Vb 6.0 / Post Ur Vb 6.0 Questions Here (2) (3) (4)

(1) (Reply) (Go Down)

Vb 6.0/vb .NET & Intranet/internet Application Development by Nobody: 9:54pm On Jan 06, 2009
Here, we are going to be talking about how to use visual basic 6.0/vb 2005 [.NET] to build applications that run on intranet. However the contents are going to web pages.
The objectives of this thread are listed as follows:
1. How to develop a portable web browser with visual basic 6.0/vb 2005 [.NET]
2. How to control local web servers such as apache [i left out IIS intentionally - ask me why later] based servers like wamp with vb 6.0/vb 2005 [.NET]
3. How to detect if a server is running or not with vb 6.0/vb 2005 [.NET]
4. How to serve load your php/mysql documents inside your vb application
5. How to synchronize the events in a web page with that in vb applications. For instance if your vb application is displaying a web page and you click on a
close button inside the web page to actually close the vb app.
6. How to bundle everything into MSI packages ready for distribution.

Maybe i am out of date - but i made some few softwares in this area some years back - i did that before .NET came out.

Before i continue this thread, guys i will like to know what you think - please signify your interesting by posting something like "Yo!"
Failure to get at least 4 responses means i will abandon this thread - or maybe people assume DHTML does not do anything outside web dev.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by blackweaver(m): 10:27pm On Jan 06, 2009
Go on am all ears (or is it eyes?)
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Kobojunkie: 10:48pm On Jan 06, 2009
Yep, seems you are way out of date. Do you mind using Visual Basic 9.0 instead of 6.0 ? I mean I am not sure how many companies out there still use VB6 but 9.0 is here and more and more projects have consultants updating 6.0's to 9.0 now. But do continue.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Nobody: 12:52am On Jan 07, 2009
I can use vb 9.0 as well but blv you me - after vb 6.0 i have been developing websites - i just popped in here and saw what some of you guys are doing and decided to contribute - no problemo - i will do it with both of them - but on one condition - i will have to get your guys to teach me the equivalents to some of the stuffs i am going to be talkin about - no problem - i think i have enough response to go on - i will continue this thread then - first i need to dust my library to gather those codes and start breaking it down so that we can all learn - and mind you - i am not a core vb programmer - so u guys should take it easy with me O when i write codes that are too long or outdated - i havent touched vb compiler for several years - but i can still pull this off anyway.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Kobojunkie: 4:41am On Jan 07, 2009
Well, let's see what you have to post.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Nobody: 7:25am On Jan 07, 2009
I will start off later tonight. I will try my best though. I am tryin to get the sample codes out first.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by dammytosh: 9:05am On Jan 08, 2009
It is suicidal to start teaching au to use VB6.0 to build intranet applications wen the paradigm has drastically shifted in ASP.NET (VB.NET (VB 7,8 and even 9) ). I appreciate ur contribution to knowledge but start a better lecture instead.
we are all ears.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Nobody: 10:18pm On Jan 08, 2009
**** DHTML wonders what paradigm has to do with all this afterall you can alwayz upgrade your project to .NET or even rewrite it once you get to know the programming behind it - as far as i know, programming technique is the same, objects are objects, constructs only change. In other words, if i am a better programmer than you, and i learn the lang construct of .NET in say 1/2 months, i will still be better than you, programming has to do more with skills than any other thing. I am sure many ppl that are waiting to read what i have to say can use .NET well and will surely learn.

And by the way, wat i am going to post, i first did it in VB, then latter on i did it with VC++. Once you get the principle you can pull it off anywhere.

Having said that, i will be uploading the starting point soonest in vb 6.0, i will expect someone to help convert it to vb.NET 2005 for me to continue with it.
I have not touched vb.net since 2005! I am that rusty.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Nobody: 10:34pm On Jan 08, 2009
Materials for this class, you will need to be running a local web server. you can use IIS or apache based servers if you like.
You will need to create a folder called intranet, that can be accessed by http://localhost/intranet.

i will supply contents and source codes as swe move on.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Nobody: 11:14pm On Jan 08, 2009
Time to start off - please download - http://mwebng.net/intranet/step1.zip - that is the start package. The .NET version will follow later.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by lagerwhenindoubt(m): 4:47pm On Jan 12, 2009
Long Live VB6
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by dammytosh: 9:16am On Jan 14, 2009
dhtml:

**** DHTML wonders what paradigm has to do with all this afterall you can alwayz upgrade your project to .NET or even rewrite it once you get to know the programming behind it .
Upgrading to vb to vb.net is just like modifying ur "C" code to work in "CPP" environment(it might work but u are not doing the right thing). they are two different things. Paradigm has a lot to do with wat we are talking about especially when it comes to WEB APPLICATION DEVELOPMENT. blif me or not, all ur vb 6.0 codes in ur Web App will likely not work in asp.net (VB) and even if it does eventually, it will be a worst programming practice not even bad.

dhtml:

I have not touched vb.net since 2005! I am that rusty.
I see, Check and see what i am trying to point out. It is different and the thinking is entirely different. I av written VB 6 (infact i wrote 3 board games Ludo, Draught and Snake And Ladder), VB 7,VB 8 and currently i use VB 9 and i can tell u dt there are some differences in d versions although microsoft will always allow backward compactibility for developers who are afraid of change.

I am all eyes too. but teaching VB 6 when VB 10 is almost ready is archaic nd ,
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Kobojunkie: 4:14pm On Jan 14, 2009
Is it possible to see the Ludo, Snake& Ladder and other games you worked on ? @DammyTosh. I have been pondering the idea of building a Ludo game in Silverlight but so far, have not started. Seeing already existing application of the sort would go along way in helping me.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Nobody: 11:24pm On Jan 14, 2009
vb 6.0 source code


Dim strHome As String
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)

End Sub

Private Sub Form_Load()
On Error Resume Next
strHome = "http://localhost/intranet"
tb.Navigate App.Path & "\tb\main.html"
ie.Navigate strHome
End Sub

Private Sub ie_StatusTextChange(ByVal Text As String)

End Sub

Private Sub tb_TitleChange(ByVal Text As String)
On Error Resume Next
Dim Ret

Select Case Trim(LCase(Text))

Case "home"
ie.Navigate strHome

Case "back"
Ret = ie.Document.script.history.Back(1)

Case "forward"
ie.GoForward

Case "stop"
ie.Stop

Case "reload"
ie.Refresh

Case "exit"
Unload Me

Case "print"
'printout
End Select

End Sub


vb 2005 [.Net] source code

Public Class Form1
Dim strBrowser As String

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
strBrowser = "http://localhost/intranet"
ie.Navigate(strBrowser)
Dim str = Application.ExecutablePath

Dim pos = InStrRev(str, "\"wink
str = Mid(str, 1, pos - 1)

pos = InStrRev(str, "\"wink
str = Mid(str, 1, pos - 1)

pos = InStrRev(str, "\"wink
str = Mid(str, 1, pos - 1)


pos = InStrRev(str, "\"wink
str = Mid(str, 1, pos - 1)

tb.Navigate(str & "\tb\main.html"wink



End Sub

Private Sub tb_DocumentTitleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles tb.DocumentTitleChanged

On Error Resume Next
Dim Ret

Select Case Trim(LCase(tb.Document.Title))

Case "home"
ie.Navigate(strBrowser)

Case "back"
ie.GoBack()

Case "forward"
ie.GoForward()

Case "stop"
ie.Stop()

Case "reload"
ie.Refresh()


Case "exit"
Application.Exit()

Case "print"
'printout

End Select

End Sub
End Class


The 2 source codes are similar - just download and run the samples - anyone - i will do the explanations later [in case u have still not figured it out]
This is part 1 of the tutorial.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Nobody: 11:34pm On Jan 14, 2009
So i am now back to continue (looks like you guys were playing snakes and ladders in my absence)

There is a little technical aspect i left out in the introduction. The core of the project is not vb code per se - it is web.

So we are going to be doing some javascripting and php as well.

So this is the complete step 1: http://mwebng.net/intranet/step1-b.zip [90 Kb]
Contains a sample web browser - same output but 2 langs - one with vb 6.0 and the other with vb 2005 [.NET]

The bulk of the task is not core vb per se - that was why i was wondering wat paradigm has to do with it.
I hate chest thumping but i code in at least 10 different langs very well (minus qbasic, visual basic 6.0/.NET).
And i can say it - that the more languages u learn - the easier it becomes for you to adjust. Think about it - if u learn vb 6.0 (freestyle - no strict declaration, no classes, no inheritance polymorphism, ), then you know went to learn say visual c++ (know u know how to use objects). If u now come back to learn vb .NET or Visual C# some years later - that will not take u so much time to learn if u knew the first 2 very well. If can use java (to develop complete Apps) - i see no reason why learning php should take u up to a month!

And by the way, maybe i did not say it before, i am a freelance software programming and website developer - the 2 aspects are one in my eyes - u either write codes, generate, manipulate and get results (plus your pay).


That was just a distraction really, so now back to our task.

Re: Vb 6.0/vb .NET & Intranet/internet Application Development by dammytosh: 12:16pm On Jan 15, 2009
Kobojunkie:

Is it possible to see the Ludo, Snake& Ladder and other games you worked on ? @DammyTosh. I have been pondering the idea of building a Ludo game in Silverlight but so far, have not started. Seeing already existing application of the sort would go along way in helping me.
@Kobojunkie,
  Yes u can.just give me a week to dig into my archive. I am kind of busy 4 now.  i am even planning to upload the source code in the nearest future but i need 2 refine it cos i built d apps during my undergraduate days.

@dhtml,
u just ran into the problem i forsaw when u said u will JUST convert the VB6 codes to VB 8.
  Oga, Please concentrate on ur VB 6.0 code. i cant stop laughing when i saw ur VB 2005 Code [That code sucks].
(I wonder wat asp.net (VB) developers in the house are doing.)
The fact still remains that NO PROFESSIONAL VB 8 developer will use ur approach 2 build web application. (That stuff is just like using "GO TO" statement in Modern programming language (It will work but it will defeat the purpose of redefining d language.) ). So dont confuse young VB.net developers in the house.

Still enjoying ur vb 6 tutorials Kudos.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by BigStar1(m): 3:41pm On Jan 15, 2009
As for me, I do alot of coding with VB6.0 VB.Net, SQL, PHP, plus web design, XML web services

and many more to know
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Nobody: 9:23pm On Jan 15, 2009
To the programmers in the house, like i said i no longer use vb .net - i did the original project at a time when there was no vb .net - i made the first copy with vb 6.0 but later rewrote it with vc++ 6.0 - but like i said - i have been in web development all this while (so i am quite outdated) - but the bulk of the matter rest more with php/mysql.

The next step now will be how to start and stop apache based servers such as reactor and wamp.
What we are aiming for here is that (UNLIKE IIS - I SAID IT) - you can bundle the apache server files along with your application using your MSI package. Now on getting to the client machine - your program should be able to start and stop the apache based servers - and should also be able to detect when the server is running and when it is not.

Let me leave it open here - if anyone knows of a simple way to accomplish that task - please post it here - before i post my degenerate but working code.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Nobody: 9:59pm On Jan 15, 2009
Some insight into starting and stopping those apache web servers - if you are using the reactor server - there are some bach files (.bat like install.bat) somewhere inside type folders (for those of you that did not master batch file processing on msdos[new generation programmers] - batch files are scripts that contain msdos commands - they are not oop like php - similar to unix shell scripts and they are text files too).
You will find some commands in those batch files that can start and stop the server. Basically you can start the apache server by running the shell command. The command in vb 6.0 used to be shell(), but i prefer to use the win32 api like shellexecute command.

I actually created a dll module with vc 6.0 to start and stop the server, the dll works with .NET too (it is a standalone dll rather in same class as kernel32.dll and user32.dll) - but we can still rewrite those functions in here. I do not wish to distract this place with dll creation in visual c++ 6.0 (that will be a degenerate topic?) - ppl want to know how to create assemblies in .NET - lol
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Kobojunkie: 4:56am On Jan 17, 2009
To create a Dll
================

1) Open Visual Studio

2) From the file menu, select NEW > Project

3) From the New Project menu, select Class Library for the language you want to work with ( I am using Visual STudio Professional, so I first need to make sure I have the Language selected in the Project types area) . Note that you can also build a dll with some of the other templates on there.

4) Click OK

You now have a project in Visual Studio. You can choose to add code for your objects in the .CS class if you want. But for this example, we just need a dll.

5) Right Click your project folder in the Solution Explorer pane. Select Build

6) Once build is done, look in the bin folder of your project. Bin > Debug and you will find your dll.


Very easy!

Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Nobody: 5:46pm On Jan 17, 2009
Thanks alot for that - since our last discussion, i have been studying and practicing vb.net and vc# - i will try out the dll stuff.
The project will look better if it is broken down into components - i am still tryin to brush up - i will return to this thread later.
Re: Vb 6.0/vb .NET & Intranet/internet Application Development by kodewrita(m): 1:46pm On Mar 26, 2012
are you returning any time soon?

1 Like

Re: Vb 6.0/vb .NET & Intranet/internet Application Development by Nobody: 12:04am On Mar 27, 2012
Caramba! See this guy digging up my old post o. Well, i aint comin back anytime soon like you correctly guessed. Hmmn, i later completed that stuffs and used it for a school portal. I also added some flash interface as well.
Dont mind me, dem don ban me, so i don go undercover. . . .

(1) (Reply)

Learning To Code Is Hard!!!! / Nigerian Developers Celebrate Wordpress 15th Anniversary / Share Your Road map To Becoming A Web Developer.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 56
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.