Library tutorials & articles

.NET Applets

To The Code!

If you've done a windows form control, or even just a windows form (controls aren't much harder than forms themselves, just a different mindset) you can do this .NET Applet stuff.

The Control

Create a new Windows Control Library project (demoControl). Drop your items and code into it and compile. Okay, okay, an example… let's do this (thanks Sven):

We have our project. It should default with a User Control. This looks like a Windows Form grid, but without the title bar. Quick reason behind this, it's NOT A FORM. It's a control. Your form will have the title bar, and any menus. (You also cannot drag a Main Menu component to this grid.)

So, drag some controls to your User Control (myControl). In our demo we are going to use a Combo Box and a Label. Very simple. Fill your Combo Box with some items. Whatever you feel like. I'm using different types of computer systems. (Laptops, Tablet PCs, Desktops)

Now we need to create some code. Double click on your combo box. The designer will create a method to handle the SelectedIndexChanged event. For example purposes, simply put some code in that takes the combo box text and drops it into the Label.Text property.

VB.NET

Me.Label10.Text = Me.ComboBox1.SelectedText

We're done for now, compile it and on to the HTML.

Comments

  1. 01 Feb 2007 at 14:39
    Wath about the interaction of the hosted control with the Javascript? 

    i saw that developing the control in .net 1.1 framework is it possible... but using 2.0 i got some truble...

    do you have more news?!?





  2. 02 Apr 2005 at 03:45

    Very nice and concise. Good work M!

  3. 01 Jan 1999 at 00:00

    This thread is for discussions of .NET Applets.

Leave a comment

Sign in or Join us (it's free).

M Kenyon
AddThis

Related discussion

Related podcasts

  • More jQuery in ASP.NET

    In this episode Chris Brandsma, Rick Strahl, Dave Ward, Bertrand Le Roy, and Scott Koon conclude their discussion of Microsoft's jQuery in ASP.NET announcement1.This episode of the Alt.NET Podcast is brought to you by LLBLGen Pro, the most mature O/R mapper and code generator out there.Are ...

Events coming up

  • Nov 18

    15 Minutes of Fame

    Dresher, United States

    This is a yearly tradition. We select 10 of the favorite speakers from monthly meetings, code camps, and hands on labs. Each one does a 15 minute talk on their favorite .NET technology. This is our 10th anniversary so we plan a gala event with special prizes and refreshments.

We'd love to hear what you think! Submit ideas or give us feedback