Sign in to follow this  
Followers 0
oren

After minimizing and then maximizing the gui go bad

7 posts in this topic

#1 ·  Posted (edited)

Hello ,

I have a gui problem.. I don't know if its the right sub-forum to post But because its not that I have a question how to do something its just that the something go bad I decided to post in here.

Anyway a few examples:

Before Minimize it look good like this

Posted Image

After minimize and then restore from task-bar it look like this

Posted Image

Any reason why? and How can I fix it?

For the background I use

GUICtrlCreatePic ( "BackPic.jpg", 1, 1,800,600)
 GuiCtrlSetState(-1,$GUI_DISABLE)
 GUISetState(@sw_show)

and for the pieces I use (Example..)

$Board[1][$s][0] = guictrlcreatepic("",720,30+40*$s)
$hGreen1  = _Icons_Bitmap_Load(@ScriptDir & "\white.png")
_SetHImage($Board[1][$s][0],$hGreen1 )
GuiCtrlSetState(-1,$GUI_DISABLE)

I've Added the pictures ,

Thank You.

I've added a example Just download all the files to the same dir and run ForumTest

post-35491-0-15893600-1290103513_thumb.j

post-35491-0-53530400-1290103522_thumb.p

ForumTest.au3

Icons.au3

post-35491-0-03666400-1290103536_thumb.p

Edited by oren

Share this post


Link to post
Share on other sites



Please add full source file so we can test.

Nice "tabla" game BTW

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks.

I build something for the GUI Testing.

Forum.rar

Edited by oren

Share this post


Link to post
Share on other sites

AnyOne can help me?

Sorry for double posting...

Share this post


Link to post
Share on other sites

I would suggest to disable minimize button.It is a workaround though but an easy one.

Share this post


Link to post
Share on other sites

Here a not best solution:

...
$op = 0
$Dice = -1
$Dice1 = -1
$progres = -2
$Tempo = 0

Opt("GUIOnEventMode", 1)
GUISetOnEvent($GUI_EVENT_RESTORE, "Test")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")

While Sleep(100)
WEnd

Func Test()
    GUICtrlCreatePic("BackPic.jpg", 1, 1, 800, 600)
    SetTable()
EndFunc

Func _Exit()
    Exit
EndFunc

Func SetTable() ;;First Function to set the board at starting position
    ;; Starting setting Board white first
...

Just replace the code above with the appropriate section in original code.

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

The solution i found elsewhere on the forum is to specify the dimensions like this:

$Board[1][$s][0] = GUICtrlCreatePic("", 720, 30 + 40 * $s, 41, 40)

and not

$Board[1][$s][0] = guictrlcreatepic("",720,30+40*$s)

BTW i have a question for the author - how do you move the pieces across the board ?

I mean how do you select the pieces with the mouse and drop them on the desired place?

The actual move i guess is done by GUICtrlSetPos.

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