Smart Client

  • Thread starter Thread starter Richard K Bethell
  • Start date Start date
R

Richard K Bethell

The Bigger Better Basic tour spoke to us about "smart clients." It seemed
intriguing, especially the web-launched executables that downloaded the
required assemblies under the hood - that was fascinating.

However, these one day presentations do not usually have time to show you
how you would do these things. So I looked around on MSDN, but couldn't find
anything that described, in practical terms, how you would do this - just
the usual "architect" stuff (for those folks who don't write code but are in
charge of those who do. ;-)

Are there any examples on MSDN, even small simple ones, of how this works? I
can really see this being useful!

R.
 
Hi Richard,

You may try to take a look at the link.
eath of the Browser?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/ht
ml/vbnet10142001.asp

You may try to create a winform app and add a button, paste the code in the
button click handle function.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Try
'Download the assembly from a web server over HTTP
Dim sLocation As String
sLocation = _
"HTTP://sha-vphuang-03/SmartClientDll.dll"
Dim formAsm As [Assembly] = [Assembly].LoadFrom(sLocation)
'Get the Form from the assembly
Dim formtype As Type = formAsm.GetType("SmartClientDll.Form1")
'Create an instance of the Form
Dim FormObj As Object
FormObj = Activator.CreateInstance(formtype)
'Cast it to a Form object to enable early binding and show the
form
Dim Form1 As Form = CType(FormObj, Form)
Form1.Show()
Catch exc As Exception
MsgBox(exc.ToString)
End Try
End Sub

Create classlibrary and add a form , add a button onto the form, paster the
code to the button click handle function.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
MsgBox("Hello Big client")
End Sub

If you have any concern on this issue., please post here.


Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
 
Back
Top