Jump to content

Recommended Posts

Posted

Hey all :graduated:

So I've built a little tool with a GUI, and I'm having problems with the pictures.

Right now there's something like this in the code (This is just an example for Start Button):

$Start = GUICtrlCreatePic("c:\Documents and Settings\USER\My Documents\My Pictures\PlayButton.jpg", 155, 112, 45, 45)

The problem is that I need to define a specific location,

and the whole purpose of this script is that you will be able to use it on any computer.

Is there a way to "attach" the picture into the program?

Thank you ;)

Posted

Have a look on 'FileInstall'.

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Posted (edited)

A little more advanced use of FileInstall()

$Logo_jpg = @TempDir & "\XPClean-logo.jpg" ; so the pics do not show in the script directory

FileInstall("C:\XPClean-web\Settings\XPClean-pics\XPClean-Main-Pic-Jpg.jpg", $Logo_jpg) ;source must be literal string

... Then use $Logo_jpg throughout your program.

... when the program ends you can use FileDelete($Logo_jpg) ...and the pic can not be found

8)

Edited by Valuater

NEWHeader1.png

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
  • Recently Browsing   0 members

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