Jump to content

Picture Button


Recommended Posts

i want to make a button of an picture in autoit

i have a screen shot how i want it can some one please help me with it

look tho the screenshot to know what i want

Edited by Cloudsx
Link to comment
Share on other sites

  • Moderators

Global $Pic1 = 100000000000000000
$main = GUICreate('')
$button = GUICtrlCreateButton('Create Pic Button', 10, 10, 100, 30)
GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = $button Then
        $Pic1 = GUICtrlCreatePic(@MyDocumentsDir & '\My Pictures\MyPic', 10, 100, 100, 30)
    EndIf
    If $msg = $Pic1 Then
        MsgBox(0, 'Works', 'You clicked the button pic')
    EndIf
WEnd
Obviously you're going to replace @MyDocumentsDir & '\My Pictures\MyPic' with your picture location, and 10, 100, 100, 30, with the position and size you want.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

thanks for help only i dont understand with the @documentdir what must i do with that

i already change the location of my picture

I already explained, replace that with your file location.

The first thing you should have done, is looked at GUICtrlCreatePic() in the help file to understand the parameters. If you've already replaced it with the file location, then your fine.

Edit:

@MYDocumentsDir is a short way, using a Macro, of getting the location of your "My Documents Directory", where is the location of the picture I tested the concept I gave you.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I already explained, replace that with your file location.

The first thing you should have done, is looked at GUICtrlCreatePic() in the help file to understand the parameters. If you've already replaced it with the file location, then your fine.

i did thanks

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...