ActiveX too long for gui Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
Mipha
Posts: 18
Joined: 27 Jul 2018, 17:08

ActiveX too long for gui

19 Aug 2018, 16:08

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



When I run this code. A gui with a border appears that goes below the screen. How can I fix this so the entire border gets put inside the gui?
Mipha
Posts: 18
Joined: 27 Jul 2018, 17:08

Re: ActiveX too long for gui

20 Aug 2018, 18:44

Its been 2 days... Can someone maybe at least point me towards a thread where people have similar problems so I can read it and maybe get some insight? Or maybe tell me how I should search this problem. As in what words to use in the search (because I'm really bad at that)
A_AhkUser
Posts: 862
Joined: 06 Mar 2017, 16:18
Location: France

Re: ActiveX too long for gui

21 Aug 2018, 15:55

One guess: use vh - the viewport's height -, which is a relative measurement instead of %, which is an absolute measurement.
Mipha
Posts: 18
Joined: 27 Jul 2018, 17:08

Re: ActiveX too long for gui

22 Aug 2018, 18:30

A_AhkUser wrote:One guess: use vh - the viewport's height -, which is a relative measurement instead of %, which is an absolute measurement.

Hmm. I can't seem to get vh and vw working in AHK. Can you maybe give an example of how to use it?
A_AhkUser
Posts: 862
Joined: 06 Mar 2017, 16:18
Location: France

Re: ActiveX too long for gui

22 Aug 2018, 19:16

Mipha wrote:Hmm. I can't seem to get vh and vw working in AHK. Can you maybe give an example of how to use it?


Specify about:<!doctype html><meta http-equiv="X-UA-Compatible" content="IE=edge"> for the name of the ActiveX component:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Hope this helps.
Mipha
Posts: 18
Joined: 27 Jul 2018, 17:08

Re: ActiveX too long for gui

22 Aug 2018, 19:48

A_AhkUser wrote:
Mipha wrote:Hmm. I can't seem to get vh and vw working in AHK. Can you maybe give an example of how to use it?


Specify about:<!doctype html><meta http-equiv="X-UA-Compatible" content="IE=edge"> for the name of the ActiveX component:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Hope this helps.


I could not get your copy to work at first but when I added this part

Code: [Select all] [Download] GeSHi © Codebox Plus

GUI, Add, ActiveX, W400 H300 x0 y0 vHTMLDoc, about:<!doctype html><meta http-equiv="X-UA-Compatible" content="IE=edge">
HTMLDoc.document.write(html), HTMLDoc.document.close()


instead of my version

Code: [Select all] [Download] GeSHi © Codebox Plus

Gui, Add, ActiveX, W500 H500 x0 y0 vdoc, HTMLFile
doc.write(html)


it did work. The problem with this is the way how different your version is from mine. I do not plan on using the solution but thanks for the help anyways.

I do have a question though. Could I potentially solve this issue using a gui-wide table with a border? Or something else screenwide with a border? Because I noticed that the border extends outwards so when I add it to a 400W gui, the border makes it 402W or something. So if I could point the borders inwards instead of outwards that would solve the issue.
User avatar
jeeswg
Posts: 4965
Joined: 19 Dec 2016, 01:58
Location: UK

Re: ActiveX too long for gui

22 Aug 2018, 20:01

- Perhaps AdjustWindowRectEx will prove helpful, see here for info/examples:
slightly-improved dialogs - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=37&t=45220
- You start with the size of the client area that you want, calculate the required window area, and tell that to the Gui command.
A_AhkUser
Posts: 862
Joined: 06 Mar 2017, 16:18
Location: France

Re: ActiveX too long for gui  Topic is solved

23 Aug 2018, 15:18

As for me, its definitely not an ActiveX control-related size calculation problem.
What reinforces my belief in this is that an attempt to run the html source from the OP in firefox, for example, make you end up with the same 'issue'.
If it is question to keep the html source and force the GUI control to fit its size, I can't think of any solution.

I would assume that the aim here is to create some kind of frame encompassing the page, correct me if I'm wrong Mipha. If so, it might be possible to do this using a table element but div elements are the usual candidates - they are more flexible. The easiest way I can think of is to use four fixed div. An element positioned in a fixed position is positioned relative to the browser window; that is, it always remains in the same place, even if the page scrolls. With this technique, you can use both left: 0; right: 0; and top: 0; bottom: 0; in place of width: 100%; and height: 100%; respectively:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Css is definitely not my cup of tea - it might exist a nicer way to do this. Otherwise, both the before: and after: pseudo-property or the outline property could be helpful.

Hope this helps.
Mipha
Posts: 18
Joined: 27 Jul 2018, 17:08

Re: ActiveX too long for gui

23 Aug 2018, 18:25

A_AhkUser wrote:As for me, its definitely not an ActiveX control-related size calculation problem.
What reinforces my belief in this is that an attempt to run the html source from the OP in firefox, for example, make you end up with the same 'issue'.
If it is question to keep the html source and force the GUI control to fit its size, I can't think of any solution.

I would assume that the aim here is to create some kind of frame encompassing the page, correct me if I'm wrong Mipha. If so, it might be possible to do this using a table element but div elements are the usual candidates - they are more flexible. The easiest way I can think of is to use four fixed div. An element positioned in a fixed position is positioned relative to the browser window; that is, it always remains in the same place, even if the page scrolls. With this technique, you can use both left: 0; right: 0; and top: 0; bottom: 0; in place of width: 100%; and height: 100%; respectively:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Css is definitely not my cup of tea - it might exist a nicer way to do this. Otherwise, both the before: and after: pseudo-property or the outline property could be helpful.

Hope this helps.

This looks great. I'll experiment with it. See what I can do but for now. Thank you for your help.

Return to “Ask For Help”

Who is online

Users browsing this forum: GA-Fantonos and 88 guests