Hi,
How can I open a dialog box to select a file?
I don´t know why, but using that code:
Dim od As OpenFileDialog
od = New OpenFileDialog
od.Filter = "Ficheiros de Importaçao (.txt)|.txt"
oDialogOpened = True
If od.ShowDialog = DialogResult.OK Then
SBO_Application.MessageBox(od.FileName)
End If
od = Nothing
always pass twice by the event and the window dialog doesn't come the active window, it stays in "background", I have to press ALT + TAB to show the dialog.
Thanks,
Ribeiro Santos
Hi Ribeiro,
I´m not sure about 2004, but in 6.5 it was a known error.
Have a look at an old message, that describe a solution for 6.5 . If someone knows if this issue has been fixed, will be good to know.
API call for Common Dialog box
Regards,
Ibai Peñ
Hi,
I am using Vb.Net and B1 2004 with SDK 6.7
With this code it works
Dim frm As New Form
Dim od As New OpenFileDialog
frm.TopMost = True
If od.ShowDialog(frm) Then
SBO_Application.MessageBox(od.FileName)
End If
od = Nothing
frm = Nothing
Ribeiro Santos
Add a comment