If FileExists(@ProgramFilesDir & "\W7VRadio\") Then
If NOT FileExists(@ProgramFilesDir & "\W7VRadio\RadioBG.png") Then
FileInstall("C:\Users\Calon\Pictures\vdjneg.png", @TempDir & "\RadioBG.png")
FileMove(@TempDir & "\RadioBG.png", @ProgramFilesDir & "\W7VRadio\RadioBG.png")
FileDelete(@TempDir & "\RadioBG.png")
Else
DirCreate(@ProgramFilesDir & "\W7VRadio\")
FileInstall("C:\Users\Calon\Pictures\vdjneg.png", @TempDir & "\RadioBG.png")
FileMove(@TempDir & "\RadioBG.png", @ProgramFilesDir & "\W7VRadio\RadioBG.png")
FileDelete(@TempDir & "\RadioBG.png")
EndIf
EndIf
My main question, is how can something basically the same as above be accomplished? This does not work and I don't know how to make it work. I am figuring that FileInstall cannot be within an IF or something, but I don't know.
Opt("GUIOnEventMode", 1)
$GUI = GUICreate("Win7Vista Radio", 300, 40, (@DesktopWidth - 315) / 2, (@DesktopHeight - 100) / 2, -1, BitOR($WS_POPUP, $WS_VISIBLE))
$BGPic = GUICtrlCreatePic(@ProgramFilesDir & "\W7VRadio\RadioBG.png",0,0)
$SongName = GUICtrlCreateLabel("Artist" & @CRLF & "Name", 60, 7, 150, 26)
$Volume = GUICtrlCreateSlider(200, 10, 100, 20)
GUICtrlSetData($Volume, 100)
$Play = GUICtrlCreateButton("Play", 10, 10, 40, 20)
$VolLevel = 100
GUISetOnEvent($GUI_EVENT_CLOSE, "Quit")
GUICtrlSetOnEvent($Play, "Play")
Is this the correct way to call up the image used earlier to be used as a background?