Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2010 > BOOK: Visual Basic 2010 Programmer's Reference
BOOK: Visual Basic 2010 Programmer's Reference
This is the forum to discuss the Wrox book Visual Basic 2010 Programmer's Reference by Rod Stephens; ISBN: 9780470499832
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2010 Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 21st, 2013, 06:47 PM
Registered User
Join Date: Jan 2013
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default how can i create a simple server as i did in vb6

i am very new to vb.net. have created servers in vb6 and now need a server in vb.net.

i can create a server and define some methods and run them from my app. that references the server.

however i need the server also to display a form. i create a form in the server but have not been successful at calling it from the app that makes reference to the server.

Old January 22nd, 2013, 02:31 PM
Rod Stephens's Avatar
Wrox Author
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts

I'm not sure I understand your question. Do you mean you want to start a server process and have another program request things from it?

In that case, I think the server may be able to display forms. It would need to include the Windows.Forms namespace, create the form, and show it.

I think you would need to run the server interactively. If it was started as a Windows service, it wouldn't have a user session on which to display a form.

I haven't done much of this sort of thing lately so I may not be able to help much more than this, but let me know if I didn't understand your question.

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
Old January 22nd, 2013, 03:45 PM
Registered User
Join Date: Jan 2013
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default reply

this is what i have done and it seems to work just as i wanted it to although it may have some deep faults. i am listing a copy of my thread on vbforums.
i think i found it!! to answer shaggy my server and appl are on the same machine. my most simple first example is to have the server display a form with a button which when pressed displays "hi from the server"
i have built the server project with new project windows classlibrary which is "a project for creating a vb class library(.dll)
to this project i have added project windows form -- form1. and put a button on the form which when pressed says hi.

then changed the auto created function
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Public Shared Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
the function itself has the statement form1.show() which displays the form.(the form is not displayed unless th is command is given

but not before you change the properties page of the server to : application type: windows forms application

and startup object to form1.

now simplly in the client -- my server was server5 and i added it to the project add reference
(it is now an exe file)

and now server5.Form1. recognizes form1_load (finally!!)
and so you write
server5.Form1.Form1_Load(sender, e)
it calles the form1load in which you have form1.show and we are done

and wub (would u believe) works as advertised.

this is the very simple zeroth order server project that is going to enable me to go forward and create a server that can be called from any appl.
thanks for your interest

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create bmp vb6 wehave74 Pro VB 6 2 January 24th, 2007 11:42 AM
trying to create simple windows app, help please Mibble C# 0 January 18th, 2007 12:07 PM
Create simple username password datebase lovephp123 PHP Databases 3 October 28th, 2005 02:56 PM
How To Create A Simple DLL with VB6 DSanborn3 VB How-To 2 February 23rd, 2005 04:23 PM
create simple websphere webservice karthikselvam J2EE 0 February 8th, 2005 05:24 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.