Jump to content

Recommended Posts

Posted

Is their a way to create a PIC and have it stay at the bottom of all the controls, instead of it being at the top... Because i need some controls to appear ON/over it.

any way of doing this?

Posted (edited)

Is their a way to create a PIC and have it stay at the bottom of all the controls, instead of it being at the top... Because i need some controls to appear ON/over it.

any way of doing this?

disable it see http://www.autoitscript.com/forum/index.ph...ndpost&p=152818

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted (edited)

Im Trying to create a picture on top of the background picture.. it still does'nt seem to work.

here is what i tried to do with that script:

#include <GUIConstants.au3>

; Find a picture to use as Gui background.
Global $picture
If FileChangeDir(@WindowsDir & '\Web\Wallpaper') Then
    $handle = FileFindFirstFile('*.jpg')
    If $handle <> -1 Then
        $picture = FileFindNextFile($handle)
        FileClose($handle)
    EndIf
EndIf

; Setup the Gui
$title = 'Test Background with AutoIt ' & FileGetVersion(@AutoItExe)
$handle = GUICreate($title, 320, 240)
If FileExists($picture) Then
    GUICtrlCreatePic($picture, 0, 0, 320, 240)
    GUICtrlSetState(Default, $GUI_DISABLE)
Else
    MsgBox(0, '', 'A picture was not found to test with in ' & @WorkingDir)
    Exit
EndIf
$image = GUICtrlCreatePic("Resources/01.gif", 50, 50, 50, 50)

GuiSetState()
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd
Edited by CHRIS95219
Posted (edited)

That is the peice of code im trying to do it with.... ^

i kinda trashed my, cuz it was a few lines anyways, and am using this for now...

Im trying to create a Pic Control ontop of the Backround Pic... but for some reason it does'nt work.

Edited by CHRIS95219
Posted (edited)

works for me

#include <GUIConstants.au3>

; Find a picture to use as Gui background.
Global $picture
If FileChangeDir(@WindowsDir & '\Web\Wallpaper') Then
    $handle = FileFindFirstFile('*.jpg')
    If $handle <> - 1 Then
        $picture = FileFindNextFile($handle)
        FileClose($handle)
    EndIf
EndIf

; Setup the Gui
$title = 'Test Background with AutoIt ' & FileGetVersion(@AutoItExe)
$handle = GUICreate($title, 320, 240)
If FileExists($picture) Then
    GUICtrlCreatePic($picture, 0, 0, 320, 240)
    GUICtrlSetState(-1, $GUI_DISABLE)
    GUICtrlCreatePic(@SystemDir & "\oobe\images\mslogo.jpg", 50, 50, 200, 50)
    GUICtrlSetState(-1, $GUI_DISABLE)
Else
    MsgBox(0, '', 'A picture was not found to test with in ' & @WorkingDir)
    Exit
EndIf
$button = GUICtrlCreateButton("test", 10, 10)

GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted (edited)

I know the BUTTON one works fine... but the code that is in my post is an PIC CONTROL. And it does'nt work.

#include <GUIConstants.au3>

; Find a picture to use as Gui background.
Global $picture
If FileChangeDir(@WindowsDir & '\Web\Wallpaper') Then
    $handle = FileFindFirstFile('*.jpg')
    If $handle <> - 1 Then
        $picture = FileFindNextFile($handle)
        FileClose($handle)
    EndIf
EndIf

; Setup the Gui
$title = 'Test Background with AutoIt ' & FileGetVersion(@AutoItExe)
$handle = GUICreate($title, 320, 240)
If FileExists($picture) Then
    GUICtrlCreatePic($picture, 0, 0, 320, 240)
    GUICtrlSetState(-1, $GUI_DISABLE)
Else
    MsgBox(0, '', 'A picture was not found to test with in ' & @WorkingDir)
    Exit
EndIf
$button = GUICtrlCreateButton("test", 10, 10)
$mslogo = GUICtrlCreatePic(@SystemDir & "\oobe\images\mslogo.jpg", 50, 50, 200, 50)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $button
            MsgBox(0, "button", "pushed")
        Case $msg = $mslogo
            MsgBox(0, "pic", "pushed")
    EndSelect
    
WEnd
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted

wtf....... whenever i change it to whatever i want my image to be..(01.gif) it keeps bringing up that message, pushed.

urrrr... I Don't get why it does that.

#include <GUIConstants.au3>

; Find a picture to use as Gui background.
Global $picture
If FileChangeDir(@WindowsDir & '\Web\Wallpaper') Then
    $handle = FileFindFirstFile('*.jpg')
    If $handle <> - 1 Then
        $picture = FileFindNextFile($handle)
        FileClose($handle)
    EndIf
EndIf

; Setup the Gui
$title = 'Test Background with AutoIt ' & FileGetVersion(@AutoItExe)
$handle = GUICreate($title, 320, 240)
If FileExists($picture) Then
    GUICtrlCreatePic($picture, 0, 0, 320, 240)
    GUICtrlSetState(-1, $GUI_DISABLE)
Else
    MsgBox(0, '', 'A picture was not found to test with in ' & @WorkingDir)
    Exit
EndIf
$button = GUICtrlCreateButton("test", 10, 10)
$mslogo = GUICtrlCreatePic("01.gif", 50, 50, 1, 1)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $button
            MsgBox(0, "button", "pushed")
        Case $msg = $mslogo
            MsgBox(0, "pic", "pushed")
    EndSelect
    
WEnd
Posted

wtf....... whenever i change it to whatever i want my image to be..(01.gif) it keeps bringing up that message, pushed.

urrrr... I Don't get why it does that.

#include <GUIConstants.au3>

; Find a picture to use as Gui background.
Global $picture
If FileChangeDir(@WindowsDir & '\Web\Wallpaper') Then
    $handle = FileFindFirstFile('*.jpg')
    If $handle <> - 1 Then
        $picture = FileFindNextFile($handle)
        FileClose($handle)
    EndIf
EndIf

; Setup the Gui
$title = 'Test Background with AutoIt ' & FileGetVersion(@AutoItExe)
$handle = GUICreate($title, 320, 240)
If FileExists($picture) Then
    GUICtrlCreatePic($picture, 0, 0, 320, 240)
    GUICtrlSetState(-1, $GUI_DISABLE)
Else
    MsgBox(0, '', 'A picture was not found to test with in ' & @WorkingDir)
    Exit
EndIf
$button = GUICtrlCreateButton("test", 10, 10)
$mslogo = GUICtrlCreatePic("01.gif", 50, 50, 1, 1)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $button
            MsgBox(0, "button", "pushed")
        Case $msg = $mslogo
            MsgBox(0, "pic", "pushed")
    EndSelect
    
WEnd

if the pic isn't created then the return is 0 (zero) then that would happen, might want to put in a path to the pic

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted

okay, i got that to work... not this is only drawing 1 picture at the first spot...

$base = 0
Do 
For $i = 1 to 500
GUICtrlCreatePic(@ScriptDir & "\01.gif", $i, $base, 1, 1)
GUISetState()
Next
$base += 1
Until $base = 500

btw, thanks for helping me with the other one... i had to put the @ScriptDir macro in their too...

Posted

okay, i got that to work... not this is only drawing 1 picture at the first spot...

$base = 0
Do 
For $i = 1 to 500
GUICtrlCreatePic(@ScriptDir & "\01.gif", $i, $base, 1, 1)
GUISetState()
Next
$base += 1
Until $base = 500

btw, thanks for helping me with the other one... i had to put the @ScriptDir macro in their too...

your only creating it 1 pixel off from the other

here's an example showing it at 10 pixels which show's you what is happening

#include <GUIConstants.au3>

; Find a picture to use as Gui background.
Global $picture
If FileChangeDir(@WindowsDir & '\Web\Wallpaper') Then
 $handle = FileFindFirstFile('*.jpg')
 If $handle <> - 1 Then
  $picture = FileFindNextFile($handle)
  FileClose($handle)
 EndIf
EndIf

; Setup the Gui
$title = 'Test Background with AutoIt ' & FileGetVersion(@AutoItExe)
$handle = GUICreate($title, 320, 240)
If FileExists($picture) Then
 GUICtrlCreatePic($picture, 0, 0, 320, 240)
 GUICtrlSetState(-1, $GUI_DISABLE)
Else
 MsgBox(0, '', 'A picture was not found to test with in ' & @WorkingDir)
 Exit
EndIf
$button = GUICtrlCreateButton("test", 10, 10)

;~ $mslogo = GUICtrlCreatePic(@SystemDir & "\oobe\images\mslogo.jpg", 50, 50, 200, 50)

GUISetState()
$base = 50
Do
 For $i = 50 To 60
;~   GUICtrlCreatePic(@ScriptDir & "\01.gif", $i, $base, 1, 1)
  GUICtrlCreatePic(@SystemDir & "\oobe\images\mslogo.jpg", $i, $base, 200, 50)
;~ GUISetState()
 Next
 $base += 10
Until $base = 100

While 1
 $msg = GUIGetMsg()
 Select
  Case $msg = $GUI_EVENT_CLOSE
   Exit
  Case $msg = $button
   MsgBox(0, "button", "pushed")
;~   Case $msg = $mslogo
;~  MsgBox(0, "pic", "pushed")
 EndSelect
 
WEnd

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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
×
×
  • Create New...