<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Динамичный Gui - изменение размера Gui с помощью Slider]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=16168</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16168&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Динамичный Gui - изменение размера Gui с помощью Slider».]]></description>
		<lastBuildDate>Thu, 11 Mar 2021 07:51:09 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Динамичный Gui - изменение размера Gui с помощью Slider]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146728#p146728</link>
			<description><![CDATA[<p><strong>__Михаил__</strong><br />Теперь классно все работает!<br />Очень признателен за помощь!<br />Спасибо!</p>]]></description>
			<author><![CDATA[null@example.com (BlackCat)]]></author>
			<pubDate>Thu, 11 Mar 2021 07:51:09 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146728#p146728</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Динамичный Gui - изменение размера Gui с помощью Slider]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146723#p146723</link>
			<description><![CDATA[<div class="codebox"><pre><code>ProgName := &quot;TEST&quot;

GuiW := 400
GuiH := 100

Gui 1: Add, Text, % &quot;cBlue w&quot; GuiW &quot; h&quot; GuiH &quot; gGui2 Center&quot;, Открыть настройки
Gui 1: Show, % &quot;w&quot; GuiW &quot; h&quot; GuiH, % ProgName
Return

Gui2:
Hotkey, % &quot;~vk1&quot; , Info, On UseErrorLevel
Gui 2: +AlwaysOnTop +hwndhGui
Try
{
 Gui 2: Add, Slider, x0 w400 Range400-1000 vGuiW gSetGuiW TickInterval60, % GuiW
 Gui 2: Add, Slider, x0 w400 Range100-300  vGuiH gSetGuiH TickInterval50, % GuiH
}
Gui 2: Show
Return


2GuiEscape:
2GuiClose:
Hotkey, % &quot;~vk1&quot; , Info, Off UseErrorLevel
Gui 2: Destroy
Return



SetGuiW:
SetTimer, Info, -1
Gui 1: Hide
Gui 1: Show, % &quot;NA w&quot; GuiW &quot; h&quot; GuiH &quot; xCenter&quot;, % ProgName
Return


SetGuiH:
SetTimer, Info, -1
Gui 1: Hide
Gui 1: Show, % &quot;NA w&quot; GuiW &quot; h&quot; GuiH &quot; yCenter&quot;, % ProgName
Return



Info:
MouseGetPos,,,, Control
If GetKeyState(&quot;vk1&quot;,&quot;p&quot;)
{
 MouseGetPos,,Y,hG	;, Control
 If (hG = hGui)
 {
  I := GetInfo(Control)
  Gui 1: Submit, NoHide
  ToolTip, % I,,Y+20
  SetTimer, Info, -1
 }
}
Else
 ToolTip
Return


GetInfo(Control){
 WinGetClass, T, A
 ControlGet, Hwnd, Hwnd,, % Control , % &quot;ahk_class &quot; T
 SendMessage, 0x0400,,,, ahk_id %Hwnd%  ;  TBM_GETPOS
 Return ErrorLevel
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Wed, 10 Mar 2021 21:55:16 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146723#p146723</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Динамичный Gui - изменение размера Gui с помощью Slider]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146722#p146722</link>
			<description><![CDATA[<p>У меня есть код, но пока не вышло его нормально прицепить к ToolTip.</p>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Wed, 10 Mar 2021 21:49:20 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146722#p146722</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Динамичный Gui - изменение размера Gui с помощью Slider]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146721#p146721</link>
			<description><![CDATA[<p><strong>__Михаил__</strong><br />Это я заметил.<br />Хотелось бы в реалтайм сделать, но не знаю как.</p>]]></description>
			<author><![CDATA[null@example.com (BlackCat)]]></author>
			<pubDate>Wed, 10 Mar 2021 20:59:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146721#p146721</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Динамичный Gui - изменение размера Gui с помощью Slider]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146719#p146719</link>
			<description><![CDATA[<p>Недостаток в том, что данные в ToolTip не обновляются при перетаскивании мыши. Нужно иначе извлекать данные.</p>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Wed, 10 Mar 2021 18:49:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146719#p146719</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Динамичный Gui - изменение размера Gui с помощью Slider]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146718#p146718</link>
			<description><![CDATA[<p><strong>__Михаил__</strong><br />Прикольно получилось!<br />Огромное спасибо за помощь!<br />Запись в реестр я опять добавлю - это сохранение настроек для следующего запуска.</p>]]></description>
			<author><![CDATA[null@example.com (BlackCat)]]></author>
			<pubDate>Wed, 10 Mar 2021 18:16:08 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146718#p146718</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Динамичный Gui - изменение размера Gui с помощью Slider]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146715#p146715</link>
			<description><![CDATA[<p>Примерно так вышло, вырезал лишнее:</p><div class="codebox"><pre><code>ProgName := &quot;TEST&quot;

GuiW := 400
GuiH := 100

Gui 1: Add, Text, % &quot;cBlue w&quot; GuiW &quot; h&quot; GuiH &quot; gGui2 Center&quot;, Открыть настройки
Gui 1: Show, % &quot;w&quot; GuiW &quot; h&quot; GuiH, % ProgName
Return

Gui2:
Hotkey, % &quot;~vk1&quot; , Info, On UseErrorLevel
Gui 2: +AlwaysOnTop
Try
{
 Gui 2: Add, Slider, x0 w400 Range400-1000 vGuiW gSetGuiW TickInterval, % GuiW
 Gui 2: Add, Slider, x0 w400 Range100-300  vGuiH gSetGuiH TickInterval, % GuiH	; +ToolTIp
}
Gui 2: Show
Return


2GuiEscape:
2GuiClose:
Hotkey, % &quot;~vk1&quot; , Info, Off UseErrorLevel
Gui 2: Destroy
Return



SetGuiW:
SetTimer, Info, -1
Gui 1: Hide
Gui 1: Show, % &quot;NA w&quot; GuiW &quot; h&quot; GuiH &quot; xCenter&quot;, % ProgName
Return


SetGuiH:
SetTimer, Info, -1
Gui 1: Hide
Gui 1: Show, % &quot;NA w&quot; GuiW &quot; h&quot; GuiH &quot; yCenter&quot;, % ProgName
Return



Info:
If GetKeyState(&quot;vk1&quot;,&quot;p&quot;)
{
 MouseGetPos,x,y,, control
 If (control ~= &quot;msctls_trackbar&quot;)
 {
  Gui 1: Submit, NoHide
  ToolTIp, % GuiW &quot;, &quot; GuiH,x,y+20
  SetTimer, Info, -1
 }
}
Else
 ToolTIp
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Wed, 10 Mar 2021 17:47:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146715#p146715</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Динамичный Gui - изменение размера Gui с помощью Slider]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146714#p146714</link>
			<description><![CDATA[<p>Перехват ЛКМ и вывод через свою метку.</p>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Wed, 10 Mar 2021 17:25:30 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146714#p146714</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Динамичный Gui - изменение размера Gui с помощью Slider]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146712#p146712</link>
			<description><![CDATA[<p><strong>__Михаил__</strong> Это я знаю, но не очень нравится.<br />Может есть другие варианты?</p>]]></description>
			<author><![CDATA[null@example.com (BlackCat)]]></author>
			<pubDate>Wed, 10 Mar 2021 17:23:44 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146712#p146712</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Динамичный Gui - изменение размера Gui с помощью Slider]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146711#p146711</link>
			<description><![CDATA[<p>Добавить опцию &#039;+ToolTIp&#039; в контрол &#039;Slider&#039;.</p>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Wed, 10 Mar 2021 17:14:26 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146711#p146711</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Динамичный Gui - изменение размера Gui с помощью Slider]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146707#p146707</link>
			<description><![CDATA[<p>Написал тестовый вариант Gui, размер которого можно изменять с помощью Slider.<br />Это нужно для того, если использовать Gui, например c +ToolWindow -Caption<br /></p><div class="codebox"><pre><code>ProgName := &quot;TEST&quot;


RegRead GuiW, HKCU, % &quot;Software\&quot; ProgName, Gui-W
	If ErrorLevel {
		GuiW := &quot;400&quot;
		RegWrite REG_SZ, HKCU, % &quot;Software\&quot; ProgName, Gui-W, % GuiW
		}
RegRead GuiH, HKCU, % &quot;Software\&quot; ProgName, Gui-H
	If ErrorLevel {
		GuiH := &quot;100&quot;
		RegWrite REG_SZ, HKCU, % &quot;Software\&quot; ProgName, Gui-H, % GuiH
		}
		
		
Gui 1: Add, Text, % &quot;w&quot; GuiW &quot; h&quot; GuiH &quot; gGui2 Center&quot;, Открыть настройки
Gui 1: Show, % &quot;w&quot; GuiW &quot; h&quot; GuiH, % ProgName
Return

Gui2:
Gui 2: Add, Slider, x0 w400 Range400-1000 vGuiW gSetGuiW TickInterval, % GuiW
Gui 2: Add, Slider, x0 w400 Range100-300 vGuiH gSetGuiH TickInterval, % GuiH
Gui 2: Show
Return

SetGuiW:
RegWrite REG_SZ, HKCU, % &quot;Software\&quot; ProgName, Gui-W, % GuiW
Gui 1: Hide
Gui 1: Show, % &quot;w&quot; GuiW &quot; h&quot; GuiH &quot; xCenter&quot;, % ProgName
Return

SetGuiH:
RegWrite REG_SZ, HKCU, % &quot;Software\&quot; ProgName, Gui-H, % GuiH
Gui 1: Hide
Gui 1: Show, % &quot;w&quot; GuiW &quot; h&quot; GuiH &quot; yCenter&quot;, % ProgName
Return</code></pre></div><p>Возможно ли сделать так, чтобы под каждым Slider отображались цифры размера Gui в реальном времени?</p>]]></description>
			<author><![CDATA[null@example.com (BlackCat)]]></author>
			<pubDate>Wed, 10 Mar 2021 09:55:37 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146707#p146707</guid>
		</item>
	</channel>
</rss>
