试图在VB 2010中的计时器中添加If语句

时间:2018-10-29 22:02:42

标签: visual-studio if-statement timer basic

我看过但似乎无法找出为什么这对我不起作用

我以我的形式在Timer1中添加了此代码

dim Boolean1 as Boolean

if Boolean1 = true and WMP1.playState = WMPLib.WMPPlayState.wmppsPlaying then
WMP1.Ctlcontrols.pause()
Boolean1 = false
end if
if Boolean1 = false and WMP1.playState = WMPLib.WMPPlayState.wmppsPaused then
WMP1.Ctlcontrols.play()
Boolean1 = true
end if

0 个答案:

没有答案