Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

File Selection using the SDK


Is their a way that the SBO SDK UI exposes the file selection like the one use for add bit maps etc? I tried doing this by using writing code but cannot get this to display on the screen it is called from. The code is:

Public Function Open_FileView()

Dim OpenFileDialog1 As New OpenFileDialog

OpenFileDialog1.InitialDirectory = "C:\"

OpenFileDialog1.Filter = "txt files (.txt)|.txt|All Files (.)|."

OpenFileDialog1.FilterIndex = 2

OpenFileDialog1.RestoreDirectory = True

If OpenFileDialog1.ShowDialog = DialogResult.OK Then

Dim sr As New System.IO.StreamReader(OpenFileDialog1.FileName)



End If

End Function



Former Member

Try something like this:

System.Windows.Forms.Form winForm = new System.Windows.Forms.Form();
winForm.TopMost = true;
System.Windows.Forms.SaveFileDialog sfd = new System.Windows.Forms.SaveFileDialog();
sfd.Filter = "XML (*.xml)|*.xml";
if(sfd.ShowDialog(winForm)==System.Windows.Forms.DialogResult.OK) {
 //Do stuff

This work for me (Save dialog, but openfiledialog works the same way)

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question