With -Caption and +Resize Gui Object Options, how would I drag or resize the window?
Here are 3 ways.
1. Use the Gui itself. (OnMessage WM_LBUTTONDOWN and OnMessage WM_SIZE)
2. Use a Gui control. (text box with OnEvent Click and OnMessage WM_SIZE)
3. Use Javascript. (onmousedown, onmouseup, onmousemove, and onresize)
To make WebView2.ahk easy to use, "WebView2_Init" is all you need in a project to setup the WebView2 Control.
The WebView2.ahk "Globals", and "Run_JS" combinations are the things that make a project function.
The first example use these globals "NavStr,wvTop,wvRight,wvBottom".
NavStr is the basic WebView2 Control and is an HTML string.
wvTop brings the WebView2 Control down 20 leaving the Gui exposed.
wvRight and wvBottom are the width and height of the WebView2 Control you want.
If these globals "wvLeft,wvTop,wvRight,wvBottom" are not used the WebView2 Control is the size of Gui.Show options
The second example is a Gui control on WebView2 control and uses "NavStr" global.
The aqua drag ball sometimes distortes when resizing.(no biggy)
The third example use globals "NavUri,Event_Name".
NavUri is the basic WebView2 Control using a web site ("https www.google.com "). Broken Link for safety
Or You can create an HTML file, like this example which makes the url cursor on over work.
Event_Name is the connection from AHK to Javascript.
Tested with these:
Window 7 Professional Service Pack 1 64bit
AHK version = 2.0-a130-c7408b6b 64bit
Edge WebView2 Runtime version = 89.0.774.68
Edge WebView2Loader.dll version = 1.0.824.0 64bit
Please, Check it out.
- Home Board index AutoHotkey (v2, current version) Scripts and Functions (v2)
- Search
-
- It is currently 16 Apr 2024, 00:27
- All times are UTC-05:00
[2.0-a130] Drag And Resize Gui WebView2 Control
Post your working scripts, libraries and tools.
Return to “Scripts and Functions (v2)”
Jump to
- AutoHotkey Foundation
- About This Community
- Forum Issues
- AutoHotkey (v2, current version)
- Ask for Help (v2)
- Gaming
- Scripts and Functions (v2)
- Gaming
- Tutorials (v2)
- Tips and Tricks
- Wish List
- Suggestions on Documentation Improvements
- Bug Reports
- AutoHotkey Development
- AutoHotkey_H
- Ask for Help
- Development
- Editors
- Adventure IDE
- Old Topics
- AHK Studio
- Notepad++
- Pulovers Macro Creator
- SciTE4AutoHotkey
- Visual Studio Code
- Announcements
- General Discussion
- AutoHotkey (v1.1 and older)
- Ask for Help (v1)
- Gaming Help (v1)
- Scripts and Functions (v1)
- Gaming Scripts (v1)
- Tutorials (v1)
- Tips and Tricks (v1)
- General
- Other Utilities & Resources
- Other Programming Languages
- C/C++
- ASM
- C#
- KeySharp
- Off-topic Discussion
- RPA
- Other languages
- Looking for Volunteers in other languages
- Deutsch (German)
- Ich brauche Hilfe
- Spiele
- Skripte und Funktionen
- Tutorials
- Tooltime
- Allgemeines
- 中文 (Chinese)
- 请求帮助
- 脚本函数
- 教程资料
- 相关工具
- 其他
- Español (Spanish)
- Pedir Ayuda
- Automatización de Juegos
- Scripts y Funciones
- Tutoriales
- Otras Utilidades y Recursos
- General
- Русский (Russian)
- Помощь
- Скрипты для Игр
- Скрипты и библиотеки
- Статьи и руководства
- Прочие ресурсы и ПО.
- Свободное общение
- Français (French)
- J'ai besoin d'aide
- Scripts et Fonctions
- Tutoriels
- Autres Utilitaires et Ressources
- Hors Sujet
- Português (Portuguese)
- Ajuda e Suporte Geral
- Scripts e Funções
- Tutoriais
- Outras Ferramentas e Recursos
- Outros Assuntos
- 한국어 (Korean)
Who is online
Users browsing this forum: jiming0516, MrDoge and 16 guests