Hi, Overflow. I have an application which is supposed to convert a video via DirectShowSource.
I have a checkbox which enables a button called "btnviewcrop" which shows a new form called crp.vb for cropping/shearing pixels off the video.
Now, I have a Panel1 that I want to set as the owner (the video drawing surface) but when I set it to open, the application crashes (Error: Object reference not set to an instance of an object.) and I do not understand how to fix it.
Here is my button code:
Imports Microsoft.DirectX.AudioVideoPlayback
Private Sub btnviewcrop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnviewcrop.Click
Me.ShowInTaskbar = False
Me.Enabled = False
crp.Show()
Dim cropperv As Video
cropperv.Owner = crp.preview 'VS2010 reports that cropperv has been used before being assigned a value'
cropperv.FromFile(labinputfile.Text, True)
cropperv.Play()
End Sub