Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2010 > BOOK: Visual Basic 2010 Programmer's Reference
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 21st, 2013, 05:47 PM
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 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.

thanks
folly
Reply With Quote
  #2 (permalink)  
Old January 22nd, 2013, 01:31 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,141, Level: 23
Points: 3,141, Level: 23 Points: 3,141, Level: 23 Points: 3,141, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 640
Thanks: 2
Thanked 96 Times in 95 Posts
Default

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

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
Reply With Quote
  #3 (permalink)  
Old January 22nd, 2013, 02:45 PM
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
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create bmp vb6 wehave74 Pro VB 6 2 January 24th, 2007 10:42 AM
trying to create simple windows app, help please Mibble C# 0 January 18th, 2007 11:07 AM
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 03:23 PM
create simple websphere webservice karthikselvam J2EE 0 February 8th, 2005 04:24 AM



All times are GMT -4. The time now is 12:24 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.