View Single Post
  #3 (permalink)  
Old January 22nd, 2013, 02:45 PM
folly folly is offline
Registered User
Points: 54, Level: 1
Points: 54, Level: 1 Points: 54, Level: 1 Points: 54, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Quote:
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
to
Public Shared Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
--THIS IS VERY IMPORTANT AS IT ALLOWS FORM1.LOAD TO BE RECOGNIZED IN THE APPL.
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
folly
Reply With Quote