Jump to content

guipic help


Recommended Posts

Whats up guys.

I'm trying to figure out GUI's now, and I'm lost. I need to create a GUI with a picture in the center... how do I go about doing that? I though I'd figured it out but it doesn't work, not to mention I can't sort it out from the help files... If anyone could let me know, I'd appreciate it. Thanks!

Link to comment
Share on other sites

#include<guiconstants.au3>
GUICreate( "My GUI", 400, 400 )
GUICtrlCreatePic( "C:/pic.bmp", 200, 200 ) ;Insert your own values here (location, width, height)
GUISetState( )
$msg = 0
While $msg <> $GUI_EVENT_CLOSE
   $msg = GUIGetMsg( )
WEnd

Theres an example for you. =]

[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Link to comment
Share on other sites

Modified version of the example in the help file for GuiCtrlCreatePic():

;----- example 1 ----
#include <GUIConstants.au3>
$Picture = FileOpenDialog("GUI Pic Demo: Select jpeg picture", "", "JPEG (*.jpg)")
GUICreate("My GUI picture", 220, 250, -1, -1, $WS_SIZEBOX + $WS_SYSMENU) ; will create a dialog box that when displayed is centered
GUISetBkColor(0xE0FFFF)
$n = GUICtrlCreatePic($Picture, 10, 10, 200, 200)
GUISetState()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

:shocked:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...