here is a better way to do it

code =

******************************************************

if vbrightbutton = true then
Form1.WindowState = 1
else
end if

******************************************************