I have the following code in Visual basic, Visual Studio 2017:
Private Sub OpenFileDialog1_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
CType(Controls(currEdit), Control).Text = OpenFileDialog1.FileName.ToString()
End Sub
and I am getting this error that is not resolved ... I am following a video tutorial of making a DOCK / Louncher of applications, but it does not run at the end gives me this error:
System.NullReferenceException
HResult=0x80004003
Mensaje = Referencia a objeto no establecida como instancia de un objeto.
Origen = GMDock
Seguimiento de la pila:
en GMDock.Settings.OpenFileDialog1_FileOk(Object sender, CancelEventArgs e) en E:\software\GMDock\GMDock\Settings.vb: línea 94
en System.Windows.Forms.FileDialog.OnFileOk(CancelEventArgs e)
en System.Windows.Forms.FileDialog.HandleVistaFileOk(IFileDialog dialog)
en System.Windows.Forms.FileDialog.VistaDialogEvents.OnFileOk(IFileDialog pfd)
sintax error on: currEdit value...
currEdit = "TexBox1"
like
currEdit = "TextBox1"
that is the reference...
User contributions licensed under CC BY-SA 3.0