473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Other facets of the Client/Server problem

I am exploring also the Smart Client approach for my Client/server
problems.
I have written this (CLIENT SIDE)

'--------------------------
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

'Here I call a remote method from my client application

Dim ServerURL As String = "http://YourUrl/Server.exe"

Try
Dim Assembly As System.Reflection.Assembly =
System.Reflection.Assembly.LoadFrom(ServerURL)

'first call
Dim NameRemoteClass1 As String = "Server.Form1"
Dim Type1 As Type = Assembly.GetType(NameRemoteClass1)
Dim MyRemoteClass1 As Form =
DirectCast(Activator.CreateInstance(Type1), Form)
MyRemoteClass1.Show()
Type1.GetMethod("DrawSomething").Invoke(MyRemoteCl ass1,
Nothing)

'second call (parameterized)
Dim NameRemoteClass2 As String = "Server.MyRemoteClass"
Dim Type2 As Type = Assembly.GetType(NameRemoteClass2)
Dim MyRemoteClass2 As Object =
Activator.CreateInstance(Type2)
Type2.GetMethod("SayThis").Invoke(MyRemoteClass2, New
Object() {"Hello group"})

Catch ex As Exception
MsgBox(ex.Message)
End Try

End Sub

End Class
'--------------------------

and on the server I have put this (SERVER.EXE):

'--------------------------
Public Class Form1

Sub DrawSomething()
Dim g As Graphics = Me.CreateGraphics
g.FillEllipse(Brushes.Blue, _
New Rectangle(10, 10, 200, 100))
End Sub

End Class

Public Class MyRemoteClass

Sub SayThis(ByVal ThingToSay As String)
MsgBox(ThingToSay)
End Sub

End Class
'--------------------------

This works fine. My questions:

- Can I get a similar result having the form running within a Web page?
(like an applet?)
- Also is there a wat to remove the security warning?
- How do I taljk back to my server program ?

-Pam

Jul 2 '06 #1
0 779

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: David List | last post by:
I seem to have a problem installing facets into locales explicitly. It is not clear to me whether the problem is my compiler, my environment or my code. I am trying out some code from...
3
by: David Sworder | last post by:
This message was already cross-posted to C# and ADO.NET, but I forgot to post to this "general" group... sorry about that. It just occured to me after my first post that the "general" group readers...
1
by: CyberDigger | last post by:
I have two computers, client and server. The client is running Windows 2000 Professional and is in a workgroup, say "MyWorkgroup". The server is running Windows Server 2003 Standard Edition and...
3
by: Matt | last post by:
I know how to use the XmlReader to validate XML against a Schema but how do I take this one step further and get the Facet information for an invalid Xml element? I have my own validation event...
7
by: David Sworder | last post by:
Hi, I'm developing an application that will support several thousand simultaneous connections on the server-side. I'm trying to maximize throughput. The client (WinForms) and server communicate...
5
by: radek jedrasiak | last post by:
Hi all, this is about an idea for a language feature. Any feedback welcome. To start with: This is about a language feature, which would allow to filter the set of available members of a...
2
by: aevans1108 | last post by:
Greetings Please give me a push in the right direction if this the wrong place to ask this question. Why is it that I can get the count of facets for an element restriction if the...
4
by: Khalique | last post by:
I have built a web service whose purpose is to copy files from a secure place to client machine and vice versa. The problem I am having is perhaps related to permissions and access rights. For...
24
by: Asja | last post by:
I have written an application that runs in a kind of peer-to-peer framework. Servers connect to a masterserver, which a client then queries to receive a list of servers. The client selects a server...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.