gregory__forel
Messages postés36Date d'inscriptionlundi 18 juillet 2005StatutMembreDernière intervention18 juillet 2008
-
13 nov. 2006 à 13:21
gregory__forel
Messages postés36Date d'inscriptionlundi 18 juillet 2005StatutMembreDernière intervention18 juillet 2008
-
13 nov. 2006 à 13:34
Bonjour à tous,
J'ai un problème avec un openfiledialog. Lorsque la fenêtre s'ouvre, je choisis mon fichier, et au lieu de l'ouvrir, la fenêtre reviens. Je reselectionne mon fichier, et là, il s'ouvre.
Mon code:
Imports System.IO
Public Class frmMain
Private SE_App As SolidEdgeFramework.Application
Private Sub btnImportar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImportar.Click
Dim strFilePath As String
OpenFileDialog1.ShowDialog()
With OpenFileDialog1
.Filter = "Conjuntos (.asm)|*.asm|Piezas (.par)|*.par|Chapas (.psm)|*.psm"
.Multiselect = False
.CheckFileExists = True
End With
If OpenFileDialog1.ShowDialog = DialogResult.OK Then
strFilePath = OpenFileDialog1.FileName
ConnectSolidEdge(True)
SE_App = GetObject(, "SolidEdge.Application")
SE_App.Documents.Open(strFilePath)
EdgeFiles.ObtainAssemblyInformation(SE_App.ActiveDocument, 1)
End If
End Sub
End Class
J'ai vu sur certains sites anglais le même problème, mais toujours resté sans réponse. J'espère que vous pourrez m'aider, c'est assez frustrant car mon code à l'air bon.
cs_casy
Messages postés7741Date d'inscriptionmercredi 1 septembre 2004StatutMembreDernière intervention24 septembre 201440 13 nov. 2006 à 13:29
Normal, tu l'ouvre 2 fois
Imports System.IO
Public Class frmMain
Private SE_App As SolidEdgeFramework.Application
Private Sub btnImportar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImportar.Click
Dim strFilePath As String
OpenFileDialog1.ShowDialog()
With OpenFileDialog1
.Filter = "Conjuntos (.asm)|*.asm|Piezas (.par)|*.par|Chapas (.psm)|*.psm"
.Multiselect = False
.CheckFileExists = True
End With
If OpenFileDialog1.ShowDialog = DialogResult.OK Then
strFilePath = OpenFileDialog1.FileName
ConnectSolidEdge(True)
SE_App = GetObject(, "SolidEdge.Application")
SE_App.Documents.Open(strFilePath)
EdgeFiles.ObtainAssemblyInformation(SE_App.ActiveDocument, 1)
End If
End Sub
End Class
---- Sevyc64 (alias Casy) ---- # LE PARTAGE EST NOTRE FORCE #