Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Migrating from VFP
Message
De
07/06/2005 16:34:28
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB.NET 1.1
Database:
MS SQL Server
Divers
Thread ID:
01020958
Message ID:
01021126
Vues:
24
Chad,

Cool ... another online converter. This is the first one that I've seen that correctly deals with Delegates and EventHandlers when going from C# to VB (not so in the other direction though). Still, I think I'll make this one my top choice. Thanks!

~~Bonnie



>Here is the code translated to VB.NET via http://www.carlosag.net/Tools/CodeTranslator/Default.aspx:
>
>' In your Form's constructor
>AddHandler Paint, AddressOf Me.Form1_Paint
>
>
>    ' Then, the EventHandler itself
>    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As PaintEventArgs)
>        Me.txtDescription.Focus
>        RemoveHandler , AddressOf Me.Form1_Paint
>    End Sub
>
>
>Chad
>
>>
>>// In your Form's constructor
>>this.Paint += new PaintEventHandler(Form1_Paint);
>>
>>// Then, the EventHandler itself
>>private void Form1_Paint(object sender, PaintEventArgs e)
>>{
>>	this.txtDescription.Focus();
>>	this.Paint -= new PaintEventHandler(Form1_Paint);
>>}
>>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform