nicolasbonnet13
Messages postés6Date d'inscriptionjeudi 28 juillet 2005StatutMembreDernière intervention16 mai 2008
-
16 mai 2008 à 11:12
NHenry
Messages postés15113Date d'inscriptionvendredi 14 mars 2003StatutModérateurDernière intervention22 avril 2024
-
19 mai 2008 à 08:54
Bonjour,
J'ai conçu une petite application en visual Basic qui permet à plusieurs personnes d'uploader des fichiers sur un serveur ftp.
Tout marche bien sur mon poste vista mais sur un poste xp, quand je clique sur le bouton "Parcourir" pour aller sélectionner le fichier j'obtiens cette erreur.Quelqu'un peut t'il m'aider svp ?
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Exception: Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName)
at WindowsApplication1.Module1.OuvrirAvecCD(String Extension, String DOSSIER, String TITRE)
at WindowsApplication1.F_Bienvenue.B_Parcourir_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
NHenry
Messages postés15113Date d'inscriptionvendredi 14 mars 2003StatutModérateurDernière intervention22 avril 2024159 19 mai 2008 à 08:54
Bonjour
Je ne capte plus. Tu es en VB6 ou .NET ?
Dim cd
Non typée, Met "Option Explicit" (VB6 &VB.NET)et "Option Strict" à ON (VB6.NET only)
CD = CreateObject("MSComDlg.CommonDialog" )
Pas besoin de cela, tout est déjà dans .NET, il y a déjà un controle .NET (section "Boites de dialogue" de la barre d'outils).
On Error Resume Next
Err.Clear()
If Err.Number <> 0 Then
Error en VB.NET !!!, si tu code en .NET, utilises Les Try/Catch avec les exceptions.
.ShowOpen()
Là tu utilises du VB6, si tu es en .NET, il y a déjà un controle .NET (section "Boites de dialogue" de la barre d'outils).
GoTo Debut
HORREUR, un GOTO en .NET. Je te conseil plutot une boucle Do/Loop infinie dont tu sort (Exit Do) si tout est OK.
FichierSélectionné = ""
Evite les accents dans le noms de variables, fonction, ...
Voilà pour ces quelques lignes.
Le fer à souder a besoin d'une panne pour fonctionner.
VB (6, .NET1&2), C++, C#.Net1
Mon site