Sign in to follow this  
Followers 0
Cloudsx

Picture Button

5 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

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

i already change the location of my picture

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

[center]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.[/center]

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0