imports system.runtime.interopservices
imports system.windows.forms
imports system.drawing
module modVid
<dllimport("user32.dll")> _
function movewindow(byval hwnd as intptr, byval x as integer, byval y as integer, byval nwidth as integer, byval nheight as integer, byval brepaint as boolean) as boolean
end function
public sub ShowVideo(ByVal video as String, ByVal screenIndex as Integer)
dim screens as screen() = screen.allscreens()
if screens.length <= screenIndex then
dim pr as process = process.start("wmplayer.exe", chr$(34) & video & chr$(34) & " /fullscreen")
dim secscreen as rectangle = screens(screenIndex - 1).workingarea
system.threading.thread.sleep(1000)
movewindow(pr.mainwindowhandle, secscreen.x, secscreen.y, secscreen.width, secscreen.height, true)
end if
end sub
end module