Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Other facets of the Client/Server problem

Thread Tools

Other facets of the Client/Server problem
Posts: n/a
I am exploring also the Smart Client approach for my Client/server
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"

Dim Assembly As System.Reflection.Assembly =

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

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

Catch ex As Exception
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)
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 ?


Reply With Quote

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] Ruby Facets, v0.6.1 Ruby 0 01-10-2005 09:02 PM
[ANN] Ruby Facets, v0.6.0 Ruby 0 12-29-2004 05:57 PM
Schema facets and Invalid values Nate XML 4 12-10-2003 10:44 PM
Fixed precision floating point and locale facets Roger Leigh C++ 4 11-12-2003 08:56 PM
Problem installing facets into locales explicitly David List C++ 0 08-06-2003 03:37 PM