Jump to content

Load Picture


Recommended Posts

i am trying to make an picture load

like i chose a picture from my files the picture name is bloodhunt.jpg

how can i load the picture that i will seee it on a guild create

like

the begin is load a picture i want to load bloodhunt.jpg

if i press load picture then i can see it on the guicreate

can you help me a bit

please

thanks,

Cloud

Link to comment
Share on other sites

i am trying to make an picture load

like i chose a picture from my files the picture name is bloodhunt.jpg

how can i load the picture that i will seee it on a guild create

like

the begin is load a picture i want to load bloodhunt.jpg

if i press load picture then i can see it on the guicreate

can you help me a bit

please

thanks,

Cloud

#include <GuiConstants.au3>

guicreate ("MyPic",500,500)
$loadpic=GUICtrlCreateButton ("Load Pic",400,230,80,30)
GUISetState ()

While 1
    $msg=GUIGetMsg ()
    Select
        Case $msg=$GUI_EVENT_ClOSE
            Exit
        Case $msg=$loadpic
            GUICtrlCreatePic ("C:\your dir\bloodhunt.jpg",50,100,300,300);you should be adjust at size your image
            GUICtrlSetState ($loadpic,$GUI_Disable)
            GUICtrlSetData ($loadpic,"Done")
    EndSelect
WEnd

You search for something like that?

Link to comment
Share on other sites

yes something like that only not in button but for picture and someone els must also can change the picture

Ok, I understand. Then you read in the AutoIt's helpfile, function FileOpenDialog:

FileOpenDialog ( "title", "init dir", "filter" [, options [, "default name"]] )

Parameters

title Title text of the Dialog GUI.

init dir Initial directory selected in the GUI file tree.

filter File type single filter such as "All (*.*)" or "Text files (*.txt)" or multiple filter groups such as "All (*.*)|Text files (*.txt)" (See Remarks).

options [optional] Dialog Options: To use more than one option, add the required values together.

1 = File Must Exist (if user types a filename)

2 = Path Must Exist (if user types a path, ending with a backslash)

4 = Allow MultiSelect

8 = Prompt to Create New File (if does not exist)

default name [optional] Suggested file name for the user to open.

Return Value

Success: Returns the full path of the file(s) chosen. Results for multiple selections are "Directory|file1|file2|..."

Failure: Sets @error to 1.

then you replace this line in script:

Case $msg=$loadpic
            $dir=FileOpenDialog ("Choose your pic","C:\","*.*")
            GUICtrlCreatePic ($dir,50,100,300,300);you should be adjust at size your image

You ever search in help file of AutoIt? There everything is...

Edited by elgabionline
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...