Jump to content
Sign in to follow this  

After minimizing and then maximizing the gui go bad

Recommended Posts

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)

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 )

I've Added the pictures ,

Thank You.

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






Edited by oren

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_CLOSE, "_Exit")

While Sleep(100)

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

Func _Exit()

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.



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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...