using SwissAddonFramework.Utils.Windows.OpenFileDialog
Emanuele Croci
Dear all,
I'm developing a new Coresuite module using SwissAddonFramework library in VB.Net language.
Can someone give me a sample code to use the SwissAddonFramework.Utils.Windows.OpenFileDialog class?
I need to open a file browser and select a file and read its full path.
I'm trying with this code, but it doesn't show the file browser form:
Dim myFileDlog As New OpenFileDialog()
'specifies what type of data files to look for
myFileDlog.Filter = "All Files (*.*)|*.*" & "|Data Files (*.csv)|*.csv"
' specifies which data type is focused on start up
myFileDlog.FilterIndex = 2
'Gets or sets a value indicating whether the dialog box restores the current directory before closing
myFileDlog.RestoreDirectory = True
myFileDlog.ShowDialog()
Please, can someone help me?
Best regards
Emanuele
Emanuele Croci
Dear all,
i tried this vb.net code:
Private Sub FileBrowse(ByRef filenameLong As String)
Dim myFileDlog As New OpenFileDialog()
Try
'look for files in the c drive
myFileDlog.InitialDirectory = appSettings.Settings("ImportDir").Value
'specifies what type of data files to look for
myFileDlog.Filter = "All Files (*.*)|*.*" & "|Data Files (*.csv)|*.csv"
' specifies which data type is focused on start up
myFileDlog.FilterIndex = 2
'Gets or sets a value indicating whether the dialog box restores the current directory before closing
myFileDlog.RestoreDirectory = True
AddHandler myFileDlog.FileSetEvent, AddressOf getPath
myFileDlog.ShowDialog()
Catch ex As Exception
Finally
myFileDlog = Nothing
End Try
End Sub
Private Sub getPath(ByVal stringPath As String)
SBO_Application.SetStatusBarMessage("filename = " & stringPath, SAPbouiCOM.BoMessageTime.bmt_Medium, False)
End Sub
I run FileBrowse method when I click on a button in a user form into SAP B1.
When I click, the file browser windows is open, but when I click in this window to select a file or folder, SAP B1 crashes.
Please, can someone explains how to use the OpenFileDialog class?
Best regards
Emanuele
Paolo Manfrin
Hi Emanuele,
please could you open a ticket for this request and ask to be assigned to me?
Thank You,
paolo
Emanuele Croci
Dear Paolo,
I just open the ticket 18075
#18075 using SwissAddonFramework.Utils.Windows.OpenFileDialog
Best regards
Emanuele
rudygertz
I have the same problem: SBO 9 PL4 crashes after calling the ShowDialog() method of the OpenFileDialog class.
are there any solutions or workarounds?
greetings
rudy
Emanuele Croci
Dear all,
Paolo Manfrin of Coresystems replied to me:
"... this issue has been planned to be fixed in version 4.10 (release will be in October. Exact date is not public yet)..."
Best regards
Emanuele
Massimiliano Luppis
Hi Paolo,
we also have several add-on using OpenFileDialog e we need a solution for SAP 9.
Can you please confirm the release date for version 4.10.
Thanks and best regards
Max
Paolo Manfrin
Hi All,
the version number has changed.
The issue is scheduled for version 4.05 and release date is 4th November 2013.
Kind Regards,
paolo
Please sign in to leave a comment.
Comments
0 comments