Jump to content
dphuc

Resize Button Autoit

Recommended Posts

dphuc

Hi all, I have some problem, please help me solve this problem (Below)
-------------------------------------------------------------------------------------------------------------
Firstly, I created a Input with two buttons, and it look like (Below)
31531291_161993037972714_8400638250640736256_n.png?_nc_cat=0&oh=120799e1e809b562e44e1017bb56e42a&oe=5B5043A2
Secondly, when I click to Maximize button, Button2, Button1, and even Input1 look like (Below)
image.thumb.png.2f9dee703f63bed3215bb905b6f999fe.png
Question: How to make my GUI look like (Below)
31959087_161993107972707_6177103741284515840_n.png?_nc_cat=0&oh=765fbbbc297ef2237946f1ecfce9c0ce&oe=5B5B3B69
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thank all, and here is my code (Below)
 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 626, 446, 184, 116)
$Input1 = GUICtrlCreateInput("Input1", 0, 416, 489, 21)
$Button1 = GUICtrlCreateButton("Button1", 496, 416, 75, 25)
$Button2 = GUICtrlCreateButton("Button2", 576, 416, 43, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

 

Share this post


Link to post
Share on other sites
TheSaint

Hi dphuc, welcome to the forum.

Have a look at the DOCK options for GUICtrlSetResizing, in the Function Reference -> GUI Management -> GUI Control Update section of the Help file.

Have a play with those until you get what you need,


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
dphuc

Hi TheSaint, thank you for your support but I can not understand it, can you capture it or even a video, thank you!

Share this post


Link to post
Share on other sites
TheSaint
1 hour ago, dphuc said:

Hi TheSaint, thank you for your support but I can not understand it, can you capture it or even a video, thank you!

You must be kidding. :blink:

Most of us here (volunteers) have the philosophy that we teach you how to fish so you can catch fish for yourself.

Show us some code of what you have tried, doesn't matter if it doesn't work. We can explain what needs to change.

We teach, rather than provide code on a platter, on request.

We help those who help themselves. :D


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
dphuc

I posted my code in my topic :(

 

Share this post


Link to post
Share on other sites
TheSaint
7 minutes ago, dphuc said:

I posted my code in my topic :(

Funny, I missed that.

Spoiler

Just kidding. :P

Provide the same code, but with an attempt at the solution I gave you. i.e. Look at the Help file and try something it examples for GUICtrlSetResizing.

o:)

Edited by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
TheDcoder

@dphuc I recommend you start by looking at the documentation for the GUICtrlSetReszing function and it's example (available in the help file or the linked page). This should get you started on making resizable GUIs, there are also several topics and pages about this concept in the forum and wiki. DuckDuckGo is your best friend :)

  • Thanks 1

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites
dphuc

Will you help me?
 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 626, 446, 184, 116)
$Input1 = GUICtrlCreateInput("Input1", 0, 416, 489, 21)
$Button1 = GUICtrlCreateButton("Button1", 496, 416, 75, 25)
$Button2 = GUICtrlCreateButton("Button2", 576, 416, 43, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

 

Share this post


Link to post
Share on other sites
TheSaint

Perhaps you need to do some tutorials first ... walk before you run.

Re-posting the same code, without showing something you have tried, achieves nothing.

Here's a clue to go on with.

$Button1 = GUICtrlCreateButton("Button1", 496, 416, 75, 25)
GUICtrlSetResizing($Button1, $DOCKAUTO)

Or something close to that. May have mis-remembered the parameter name.

Edited by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
dphuc

Will you help me?
 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 626, 446, 184, 116)
$Input1 = GUICtrlCreateInput("Input1", 0, 416, 489, 21)
$Button1 = GUICtrlCreateButton("Button1", 496, 416, 75, 25)
$Button2 = GUICtrlCreateButton("Button2", 576, 416, 43, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Thank you so much
Địt con mẹ mày

Share this post


Link to post
Share on other sites
TheSaint

Reported.


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
dphuc

I only need a help, you can report me :P I can create too many account :P 

Share this post


Link to post
Share on other sites
Earthshine

You catch more flies with honey than being vile. No help either 


My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×