Sign in to follow this  
Followers 0
dustback

GUICtrlSetImage Problem... It's making the image bigger each time I call it...

4 posts in this topic

#1 ·  Posted (edited)

Just run the code ...

Read the comments or the edit box in the script

It will explain my whole problem

[autoit]

;PROBLEM: <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

;Ok so here is the issue....

;Select a image (a big one larger that 100x100)

;Next.

;click Re-Set about 10 times

;Watch the right-most image get bigger and bigger

;then Minimize

;And it goes back to normal size....

;I tested this on WIN XP SP2 & SP3

;AutoIt Version 3.3.6.1 / Beta 3.3.5.6

;Let me know your results...

;Same results complied or when run as a script

;I don't think this is supposed to happen...

;

;

;SOLUTIONL: ?? %2

Edited by dustback

Share this post


Link to post
Share on other sites



Just run the code ...

Read the comments or the edit box in the script

It will explain my whole problem [autoit];PROBLEM: <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

;Ok so here is the issue....

;Select a image (a big one larger that 100x100)

;Next.

;click Re-Set about 10 times

;Watch the right-most image get bigger and bigger

;then Minimize

;And it goes back to normal size....

;I tested this on WIN XP SP2 & SP3

;AutoIt Version 3.3.6.1 / Beta 3.3.5.6

;Let me know your results...

;Same results complied or when run as a script

;I don't think this is supposed to happen...

;

;

;SOLUTIONL: ?? %2

Run what code?

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Run what code?

;)

I put it in my post in AutoIt tags.... but..

when I went to edit it.. i guess something went wrong

Sorry/thanks

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$gui = GUICreate("Image Test... Wierd things happening?", 623, 442, 456, 124)
Global $Pic1 = GUICtrlCreatePic("", 8, 8, 100, 100)
Global $Pic2 = GUICtrlCreatePic("", 160, 8, 100, 100,  $ss_notify)
Global $Pic3 = GUICtrlCreatePic("", 308, 8, 100, 100, $SS_BITMAP,BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
$Edit1 = GUICtrlCreateEdit("", 16, 264, 273, 169, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY))
GUICtrlSetData(-1, StringFormat("Ok so here is the issue....\r\nSelect a image   (a big one larger that 100x100)\r\nNext.\r\nclick  Re-Set about 10 times\r\n\r\nWatch the right-most image get bigger and bigger\r\nthen Minimize\r\nAnd it goes back to normal size....\r\n\r\nI tested this on WIN XP SP2 & SP3\r\nAutoIt Version 3.3.6.1 / Beta 3.3.5.6\r\nLet me know your results...\r\n\r\nSame results complied or when run as a script\r\n\r\nI don"&Chr(39)&"t think this is supposed to happen...."))
$Button1 = GUICtrlCreateButton("SET / RE-SET", 544, 408, 75, 25)
GUISetState(@SW_SHOW)
Global $path = FileOpenDialog("select picture JPG only  -- Big image 200x200 +", @DesktopDir & "\", "Images (*.jpg)", 1,"",$gui )
SetPic()
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            SetPic()
    EndSwitch
WEnd
Func SetPic()
    GUICtrlSetImage($Pic1,$path)
    GUICtrlSetImage($Pic2,$path)
    GUICtrlSetImage($Pic3,$path)
Endfunc
;PROBLEM:                  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
;Ok so here is the issue....
;Select a image   (a big one larger that 100x100)
;Next.
;click  Re-Set about 10 times
;Watch the right-most image get bigger and bigger
;then Minimize
;And it goes back to normal size....
;I tested this on WIN XP SP2 & SP3
;AutoIt Version 3.3.6.1 / Beta 3.3.5.6
;Let me know your results...
;Same results complied or when run as a script
;I don't think this is supposed to happen...
;
;
;SOLUTIONL:   ??             <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
;It should be clear that I have a solution because 2 of the 3 do not get bigger each time I press the button
;but as you (may have) noticed the 3rd image keeps getting bigger each time.  I can see that it has something
;to do with the style that I have set.

Share this post


Link to post
Share on other sites

dustback,

No idea why adding either of the extended styles to your Pic control does that. ;)

But you can get around it like this: :)

Global $Pic1 = GUICtrlCreatePic("", 8, 8, 100, 100)
Global $Pic2 = GUICtrlCreatePic("", 160, 8, 100, 100)
GUICtrlCreateLabel("", 305, 5, 106, 106, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
GUICtrlSetState(-1, $GUI_DISABLE)
Global $Pic3 = GUICtrlCreatePic("", 308, 8, 100, 100)

You now have the same effect and can click as often as you want without your 3rd image altering size.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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