hi i have a listview that keep time(Second) and text. i want when player time was equal to my listview item times label1 show its text(RealTime). it is very similar to subtitle. i tried this:

private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e) 
{ 
while (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsPlaying) 
foreach (ListViewItem item in listView1.Items) if(axWindowsMediaPlayer1.Ctlcontrols.currentPosition==Convert.ToInt32(item.subitem[0].text)) 
label1.Text = item.subitem[1].text; 
}

Recommended Answers

Hi mardTanha,

Do you get any error with the code?

Jump to Post

All 2 Replies

Hi mardTanha,

Do you get any error with the code?

no , just doesn't works
but it cause gui Crash.
threading problem?
please help 4 a fast way threading 2 test that code.
thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.