10-23-2012 09:50 AM
Hey
Im trying to use a vb.net OpenFileDialog to let the use select a file.
For example teststand calls the following vb.net function from a Pass/Fail Test step:
Public Function testfunk() As Boolean
Dim fldg As New Windows.Forms.OpenFileDialog
fldg.Title = "Select File"
fldg.Filter = "(.bin)|*.bin"
If fldg.ShowDialog = Windows.Forms.DialogResult.OK Then
Return True
Else
Return False
End If
End Function
The problem im having is that teststand locks at fldg.showdialog without showing the dialog, the only way to stop the executeing is to kill the thread.
I have scaled the problem down somewhat here just to show exactly where the problem is, when i get this part working im going to save the filepath in vb and use it for some other functions.
All help is appreciated.
10-24-2012 09:39 AM
Are you sure the dialog isn't just being shown behind the sequence editor window? It's probably not going to be modal to the sequence editor because it's being displayed in a different thread. You can use Engine.NotifyStartOfModalDialogEx and Engine.NotifyEndOfModalDialog, to make the dialog modal if needed.
-Doug
10-25-2012 07:02 AM
Thnx.
I will give this a try when i get the time.