Jump to content

Resize Button Autoit


Recommended Posts

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

 

Link to comment
Share on other sites

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,

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

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

@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 :)

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Reported.

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

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...