The major part of that article is about using Win Form CONTROLs in web page
(or web app). It is not SMART CLIENT app. As my previous reply, you use Win
Form Control in web page, not Win Form. If you take look the picture in that
DateTime Picker in a Windows User Control library (i.e. the Control is a
control, not a Win Form). To do that simply start VS and create a Windows
(intranet, and security is not a concern... and so on). That is why the
"Chris Fink" <ChrisFink@discussions.microsoft.com> wrote in message
news:039DBEE6-FC1B-4F06-B2F8-B311AB1BD8C5@microsoft.com...
> Hi Norman,
>
> Thanks for the response. Perhaps I am confused as to what I can and can't
> do in a browser as a "smart client". In the example, the writer claims to
be
> able to place a DateTimePicker control on a webpage, which is what I am
> attempting to do.
>
>
http://www.codeguru.com/columns/VB/article.php/c7463/
>
> What are examples/differences between a win form and a win form control
and
> what allows one to be placed into a web page over the other?
>
> Chris
>
> "Norman Yuan" wrote:
>
> > 1. I think what you are taiking is not Smart Client.
> > 2. You can embed Win Form CONTROL (or derived/customized CONTROL) in web
> > page (suppose the client computer has .NET framework installed), but NOT
a
> > Win Form (or derived Form).
> >
> > "Chris Fink" <ChrisFink@discussions.microsoft.com> wrote in message
> > news:4BF0DD82-CFB1-4049-A7D5-33C5C409CF20@microsoft.com...
> > > The following code is intended to display a winform (DateTimePicker
> > Control)
> > > in a browser. But, when the aspx page that contains the reference to
the
> > > winform in the object tag is run, all that is displayed is a blank
> > > placeholder and not the control. Any ideas or help is appreciated!
> > >
> > > DateTimePicker.cs WinForm control code - output type class library
> > > ===========================================
> > > using System;
> > > using System.Drawing;
> > > using System.Collections;
> > > using System.ComponentModel;
> > > using System.Windows.Forms;
> > >
> > > namespace Windows.Control.Library
> > > {
> > > /// <summary>
> > > /// Summary description for DateTimePicker.
> > > /// </summary>
> > > public class DateTimePicker : System.Windows.Forms.Form
> > > {
> > > private System.Windows.Forms.DateTimePicker dateTimePicker1;
> > > /// <summary>
> > > /// Required designer variable.
> > > /// </summary>
> > > private System.ComponentModel.Container components = null;
> > >
> > > public DateTimePicker()
> > > {
> > > //
> > > // Required for Windows Form Designer support
> > > //
> > > InitializeComponent();
> > >
> > > //
> > > // TODO: Add any constructor code after InitializeComponent call
> > > //
> > > }
> > >
> > > /// <summary>
> > > /// Clean up any resources being used.
> > > /// </summary>
> > > protected override void Dispose( bool disposing )
> > > {
> > > if( disposing )
> > > {
> > > if(components != null)
> > > {
> > > components.Dispose();
> > > }
> > > }
> > > base.Dispose( disposing );
> > > }
> > >
> > > #region Windows Form Designer generated code
> > > /// <summary>
> > > /// Required method for Designer support - do not modify
> > > /// the contents of this method with the code editor.
> > > /// </summary>
> > > private void InitializeComponent()
> > > {
> > > this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
> > > this.SuspendLayout();
> > > //
> > > // dateTimePicker1
> > > //
> > > this.dateTimePicker1.Location = new System.Drawing.Point(40, 40);
> > > this.dateTimePicker1.Name = "dateTimePicker1";
> > > this.dateTimePicker1.TabIndex = 0;
> > > //
> > > // DateTimePicker
> > > //
> > > this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
> > > this.ClientSize = new System.Drawing.Size(292, 266);
> > > this.Controls.Add(this.dateTimePicker1);
> > > this.Name = "DateTimePicker";
> > > this.Text = "DateTimePicker";
> > > this.ResumeLayout(false);
> > >
> > > }
> > > #endregion
> > >
> > > /// <summary>
> > > /// The main entry point for the application.
> > > /// </summary>
> > > [STAThread]
> > > static void Main()
> > > {
> > > Application.Run(new DateTimePicker());
> > > }
> > >
> > > }
> > > }
> > >
> > >
> > >
> > > ASPX PAGE CODE
> > > ======================
> > > <%@ Page language="c#" Codebehind="UseWinControl.aspx.cs"
> > > AutoEventWireup="false" Inherits="web.playground.UseWinControl" %>
> > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> > >
> > > <html>
> > > <head>
> > > <title>UseWinControl</title>
> > > <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
> > > <meta name="CODE_LANGUAGE" Content="C#">
> > > <meta name=vs_defaultClientScript content="JavaScript">
> > > <meta name=vs_targetSchema
> > > content="
http://schemas.microsoft.com/intellisense/ie5"> > > > </head>
> > > <body MS_POSITIONING="GridLayout">
> > >
> > > <form id="Form1" method="post" runat="server">
> > >
> > > <OBJECT id=WinControl2
> > >
> >
classid=http:Windows.Control.Library.dll#Windows.Control.Library.DateTimePic
> > ker
> > > height=500 width=200
> > > VIEWASTEXT></OBJECT>
> > >
> > > </form>
> > >
> > > </body>
> > > </html>
> > >
> >
> >
> >