Click here to Skip to main content
15,850,685 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Screenshot Error:

<Img src="" width="700px">

Object reference not set to an instance of an object.
Error is on the line: AxVLCPlugin21.playlist.items.clear()

When I try to clear the vlc playlist within Visual I get the above error.

Actual Code:

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    End Sub
End Class

How do I fix?
Updated 28-Jun-23 1:58am
Sergey Alexandrovich Kryukov 29-Apr-13 10:25am    
In what line?
Where is the declaration of AxVLCPlugin21?
BlueVLC 29-Apr-13 10:29am    
Its VB.Net you just drag it from the toolbox onto the form

The error is on the line

It may be a problem with the newer VLC 2.x.x plugin versions. I've had nothing but grief with them. The last version that I've had any luck with is:[^]
Share this answer
BlueVLC 29-Apr-13 19:04pm    
Tried version 2.5 and worked fine :-)
Have a nice night mate
There is no VLC plugin in the toolbox, so you're using a 3rd party component.

The error is message makes it pretty obvious.

Either AxVLCPlugin21, AxVLCPlugin21.playlist, or AxVLCPlugin21.playlist.items is returning Nothing, of null is C#. You can't call methods or get/set property values on Nothing.

It's impossible to say which one of those is throwing the exception. You'll have to inspect the variables in the debugger when it stops on the line that threw the exception.
Share this answer
test without item
Share this answer
Lösung zur Option

Dim zählervideo As Integer = 0

Private Sub Button9_Click(sender As Object, e As EventArgs)
AxVLCPlugin21.playlist.add(New Uri(playerdatei).AbsoluteUri)
zählervideo += 1
End Sub


Private Sub Button9_Click(sender As Object, e As EventArgs)
AxVLCPlugin21.playlist.add(New Uri(ListBox1.SelectedItem.ToString).AbsoluteUri)
zählervideo += 1
End Sub

so wird immer das Aktuelle Video gestartet
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900