Conversion CSharp => VB ou VB.Net

cboulas Messages postés 2641 Date d'inscription mercredi 2 juin 2004 Statut Membre Dernière intervention 8 janvier 2014 - 1 oct. 2004 à 21:40
cboulas Messages postés 2641 Date d'inscription mercredi 2 juin 2004 Statut Membre Dernière intervention 8 janvier 2014 - 2 oct. 2004 à 12:04
Salut à tous,

je cherche à convertir un code CSharp en VB6 ou VB.Net, quelqu'un peut'il m'aider ?

Chris...
Firstruner

2 réponses

ShareVB Messages postés 2676 Date d'inscription vendredi 28 juin 2002 Statut Membre Dernière intervention 13 janvier 2016 26
2 oct. 2004 à 11:34
salut

possible qu'il y ai quelqu'un pour traduire ton code de C# en VB mais seulement, vois-tu, c'est plus facile avec le code... non...lol...

alors met le quelque part ou sur csharpfr.com...parce que sinon ca va être dur...de traduire...

ShareVB
0
cboulas Messages postés 2641 Date d'inscription mercredi 2 juin 2004 Statut Membre Dernière intervention 8 janvier 2014 16
2 oct. 2004 à 12:04
Voici le code que l'on m'a fournis

private System.Timers.Timer SaveTimer;

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;

namespace TestTimerService
{
public class Service1 : System.ServiceProcess.ServiceBase
{
/// <summary> 
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private System.Timers.Timer SaveTimer;

public Service1()
{
// This call is required by the Windows.Forms Component Designer.
InitializeComponent();

}

// The main entry point for the process
static void Main()
{
System.ServiceProcess.ServiceBase[] ServicesToRun;

// More than one user Service may run within the same process. To add
// another service to this process, change the following line to
// create a second service object. For example,
//
// ServicesToRun = new System.ServiceProcess.ServiceBase[] {new Service1(), new MySecondUserService()};
//
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new Service1() };

System.ServiceProcess.ServiceBase.Run(ServicesToRun);
}

/// <summary> 
/// Required method for Designer support - do not modify 
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.SaveTimer = new System.Timers.Timer(100);
// 
// SaveTimer
// 
this.SaveTimer.Elapsed += new System.Timers.ElapsedEventHandler(this.SaveTimer_Tick);
// 
// test timer service
// 
this.ServiceName = "Test Timer Service";
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null) 
{
components.Dispose();
}
}
base.Dispose( disposing );
}

/// <summary>
/// Set things in motion so your service can do its work.
/// </summary>
protected override void OnStart(string[] args)
{
SaveTimer.Enabled = true;
}

/// <summary>
/// Stop this service.
/// </summary>
protected override void OnStop()
{
}
private void SaveTimer_Tick(object sender,System.Timers.ElapsedEventArgs e)
{
// Do something here
}
}
}


Chris...
Firstruner
0
Rejoignez-nous