Code: Select all
Gui, Margin, 0,0
Gui 1:-owner -toolwindow -caption +LastFound
Gui, Add, Picture, vMyPic, C:\Documents and Settings\Administrador\Escritorio\Letras\A.png-1.jpg
Gui, Show, % "W" . A_ScreenWidth . " H" . A_ScreenHeight . " X0 Y0", My GUI
GuiControlGet, Pic, Pos, MyPic
xx := (A_ScreenWidth-picw)/2
yy := (A_ScreenHeight-pich)/2
GuiControl, MoveDraw, MyPic, x%xx% y%yy%
WinSet,Transparent,0 ,My GUI
Return
ESC::
GuiClose:
Gui, Destroy
;ExitApp
Code: Select all
SetWorkingDir %A_ScriptDir%
;imagen = Teclado-Spectrum.png
CentrarImagen(Teclado-Spectrum.png)
return
CentrarImagen(nombreImagen)
{
Gui, Margin, 0,0
Gui 1:-owner -toolwindow -caption +LastFound
Gui, Add, Picture, vMyPic, nombreImagen
Gui, Show, % "W" . A_ScreenWidth . " H" . A_ScreenHeight . " X0 Y0", My GUI
GuiControlGet, Pic, Pos, MyPic
xx := (A_ScreenWidth-picw)/2
yy := (A_ScreenHeight-pich)/2
GuiControl, MoveDraw, MyPic, x%xx% y%yy%
WinSet,Transparent,0 ,My GUI
Return
}
ESC::
GuiClose:
Gui, Destroy
;ExitApp
Gui, Add, Picture, vMyPic, nombreImagen
I don't know where is my problem.
Thanks!