Visual Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 18011
Number of posts: 55384

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
from forms to classes Posted by saint_johann on 6 Aug 2003 at 2:45 AM
So now that I've finally got the whole client end solution development thing under control, I've been asked to develop a web based solution, and I don't know where to start.

Any help in this regard would be appreciated. Someone told me that apparently, I need to move from forms to classes. So there. That's all I know.

Please help
Report
Re: from forms to classes Posted by Genjuro on 6 Aug 2003 at 3:05 AM
This message was edited by Genjuro at 2003-8-6 3:6:11

: So now that I've finally got the whole client end solution development thing under control, I've been asked to develop a web based solution, and I don't know where to start.
:
: Any help in this regard would be appreciated. Someone told me that apparently, I need to move from forms to classes. So there. That's all I know.
:
: Please help

Well, it's not that complicated, but you need to understand what you're going to do.
First, if you've never used classes (which I don't believe, since ADO is object oriented - what I mean is that an "ADODB.Recordset" is a class, after all), learn something about them (search Google for "object oriented programming", just in case you're not sure about that).

Next step: create an ActiveX Dll, with a Class inside it. This class "Instancing" property must be "MultiUse".
Let's say you have a project named "MyFirstWebDll", and inside it you have a class named "MyClass", containing this code.
Public Function SayHello() as string
    SayHello = "Hello !"
End Function


Compile the Dll, and you're done.

Now, get a WebServer program (either PersonalWebServer or Internet Information Server - one or the other should be in your Windows CD), and make sure it's active.
Once you get it up and running, and you have the Dll ready, you can use this code in an ASP page:

<%
    Dim Obj
    Dim TempString
    Set Obj=CreateObject("MyFirstWebDll.MyClass")
    TempString = Obj.SayHello
    Response.Write TempString
%>

This will load your VB Dll, and create one instance of "MyClass" (the class we created earlier). Then it will call a method of that class, "SayHello", and store the result in TempString.
The last line means "Add the content of TempString to the page that the client will view".

This is how to interface VB and ASP for Web development (a crash course, actually *LOL*).
Hope it helps. If you have any questions, of course, post them.


Report
Re: from forms to classes Posted by saint_johann on 6 Aug 2003 at 3:22 AM
* Gosh *

Thanx a mil. I'm going to take some time to try and process what I just read. You can be certain that I'll have more questions later on :o)

Thanx in the meantime. I'm going to look into what you posted first.

^J^
Report
Re: from forms to classes Posted by Genjuro on 6 Aug 2003 at 3:27 AM
: * Gosh *
:
: Thanx a mil. I'm going to take some time to try and process what I just read. You can be certain that I'll have more questions later on :o)
:
: Thanx in the meantime. I'm going to look into what you posted first.
:
: ^J^

Don't mind that.




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.