Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

Post your working scripts, libraries and tools for AHK v1.1 and older
think
Posts: 136
Joined: 09 Feb 2014, 05:20

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

05 Nov 2016, 06:34

Thanks for pointing me in the right direction, I will try this.

It would be great if you could share your working example with us, try to make a dropbox link or similar.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

08 Nov 2016, 07:50

See if this link will work. This should be to a folder on my Google Drive that contains a zip called main.zip for the ribbon.

AHK Ribbon Demo
think
Posts: 136
Joined: 09 Feb 2014, 05:20

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

09 Nov 2016, 11:46

Thanks. I see your example is based on SimpleRibbon.xml example from Microsoft. I was able to compile it with Visual Studio (free edition) and rename it to dll. However when I try to load it with Main.ahk I get an error - Failed to load ribbon. Some other examples load well... I wonder what might be the issue...

Did you use any visual editor for ribbon xml?
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

09 Nov 2016, 13:13

I just used Visual Studio 2015. It prompted me to uplift the project or something, which I did. I have extremely little experience with compiling code and using Visual Studio. Does it work if you use the .dll that I provided?
think
Posts: 136
Joined: 09 Feb 2014, 05:20

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

10 Nov 2016, 15:19

Yes, your dll works, I must have done something wrong... Do you still have your xml file?
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

10 Nov 2016, 17:08

I added the xml file to the G-Drive folder I shared above.
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

18 May 2017, 04:55

Windows 10 Settings Concept
Image

Todo:
Atm the Tab-Style-Buttons lose colors when other controls get the focus
Possible solution is catch the active tab-button and set the defaulted color as normal color for this button. After switch set back to normal.
Or disable the button if defaulted and color them. Enable if switch to another button.

Code:

Code: Select all

; GLOBAL SETTINGS ===============================================================================================================

#NoEnv
#SingleInstance Force
SetBatchLines -1

global version := 0.03

global IBAnimation := True                                                     ; enable / disable (hover-fade) animation
global IBNames     := ["Startpage", "Menu 1", "Menu 2", "Menu 3", "Menu 4"]
global IBClrStyles := [ [0, 0x80FFFFFF, , 0xD3000000, 0, , 0x80FFFFFF, 1]      ; normal
                      , [0, 0x80E6E6E6, , 0xD3000000, 0, , 0x80E6E6E6, 1]      ; hover
				      , [0, 0x80CCCCCC, , 0xD3000000, 0, , 0x80CCCCCC, 1]      ; pressed
				      , [0, 0x80F3F3F3, , 0x000078D7, 0, , 0x80F3F3F3, 1] ]    ; disabled (defaulted)

; GUI ===========================================================================================================================

Gui, Margin, 0, 0
Gui, Color, FFFFFF
Gui, Font, s12, Segoe UI

Gui, Add, Button, xm ym  w150 h30 0x100 hWndhBTN01 gMN_SELECT vMN_TAB_1, % "  " IBNames[1]
ImageButton.Create(hBTN01, IBClrStyles*)

Gui, Add, Button, xm y+0 w150 h30 0x100 hWndhBTN02 gMN_SELECT vMN_TAB_2, % "  " IBNames[2]
ImageButton.Create(hBTN02, IBClrStyles*)

Gui, Add, Button, xm y+0 w150 h30 0x100 hWndhBTN03 gMN_SELECT vMN_TAB_3, % "  " IBNames[3]
ImageButton.Create(hBTN03, IBClrStyles*)

Gui, Add, Button, xm y+0 w150 h30 0x100 hWndhBTN04 gMN_SELECT vMN_TAB_4, % "  " IBNames[4]
ImageButton.Create(hBTN04, IBClrStyles*)

Gui, Add, Button, xm y+0 w150 h30 0x100 hWndhBTN05 gMN_SELECT vMN_TAB_5, % "  " IBNames[5]
ImageButton.Create(hBTN05, IBClrStyles*)

Gui, Add, Tab2, xm ym w0 h0 -Wrap Choose1 AltSubmit vMyMenuTab, % "1|2|3|4|5"

Gui, Tab, 1
Gui, Font, s14 c474747, Segoe UI
Gui, Add, Text, xm+150 ym w250 h250, % "  " IBNames[1]

Gui, Tab, 2
Gui, Font, s14 c474747, Segoe UI
Gui, Add, Text, xm+150 ym w250 30, % "  " IBNames[2]
Gui, Add, Button, xm+150 y+5 w80 h30, % "Test"

Gui, Tab, 3
Gui, Font, s14 c474747, Segoe UI
Gui, Add, Text, xm+150 ym w250 h250, % "  " IBNames[3]

Gui, Tab, 4
Gui, Font, s14 c474747, Segoe UI
Gui, Add, Text, xm+150 ym w250 h250, % "  " IBNames[4]

Gui, Tab, 5
Gui, Font, s14 c474747, Segoe UI
Gui, Add, Text, xm+150 ym w250 h250, % "  " IBNames[5]

SystemParametersInfo(IBAnimation)
Gui, Show, AutoSize, % "AHK-Concept: Win10 Settings"
return

; SCRIPT ========================================================================================================================

MN_SELECT:
    GuiControl, Choose, MyMenuTab, % k := SubStr(A_GuiControl, 8)

    loop % IBNames.MaxIndex() {
        if (k = A_Index)
            GuiControl, Disable, MN_TAB_%A_Index%
		else
            GuiControl, Enable, MN_TAB_%A_Index%
	}
return

; FUNCTIONS =====================================================================================================================

CtlColorBtns()                                    ; https://github.com/jNizM/AHK_Scripts/blob/master/src/gui/GUI_CtlColorBtns.ahk
{
    static init := OnMessage(0x0135, "CtlColorBtns")
    return DllCall("gdi32\CreateSolidBrush", "uint", 0xFFFFFF, "uptr")
}

SystemParametersInfo(toggle := 0)                               ; https://msdn.microsoft.com/en-us/library/ms724947(v=vs.85).aspx
{
    static SPI_SETCLIENTAREAANIMATION := 0x1043
    if !(DllCall("user32\SystemParametersInfo", "uint", SPI_SETCLIENTAREAANIMATION, "uint", 0, "int", toggle, "uint", 0))
        throw Exception("SystemParametersInfo failed: " A_LastError, -1)
    return true
}

; INCLUDES ======================================================================================================================

#Include Class_ImageButton.ahk                                  ; https://github.com/AHK-just-me/Class_ImageButton

; EXIT ==========================================================================================================================

GuiClose:
GuiEscape:
ExitApp

; ===============================================================================================================================
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

18 May 2017, 06:11

Always been a fan of your settings gui concepts ._. Do you have code?
User avatar
TheDewd
Posts: 1507
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

18 May 2017, 06:16

Run1e wrote:Always been a fan of your settings gui concepts ._. Do you have code?
Because related: https://autohotkey.com/boards/viewtopic ... 247#p53247
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

18 May 2017, 07:08

But a different style =)

Because related: https://autohotkey.com/boards/viewtopic ... 439#p21439 :P
Image
and
Image

Btw I love your examples in this thread TheDewd.. but I wanted some new for my ComputerStats Concept so I created it with ImageButton.ahk from "just me"
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
TheDewd
Posts: 1507
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

18 May 2017, 07:20

jNizM wrote:But a different style =)
Thanks for sharing the code! I like it very much! Awesome! :D
jNizM wrote:Btw I loved your work TheDewd.. but I wanted some new for my ComputerStats Concept so I created it with ImageButton.ahk from "just me"
My code isn't very great :oops: I just shared the link since they are both "Windows 10" inspired. ;)
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

18 May 2017, 09:22

Edit code with a temporary solution to keep the defaulted color even if you click on other controls and lose focus (test button on Menu1)
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

18 May 2017, 11:33

Implemented jNizM's concept into Power Play. Might do some tweaking but pretty happy with how smooth the results ended up being.

Image
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

18 May 2017, 16:55

jNizM wrote:Edit code with a temporary solution to keep the defaulted color even if you click on other controls and lose focus (test button on Menu1)
I found that setting the "selected" button to disabled (and setting the disabled option array in .Create() to your "active" colors) to give it permanent coloring is better and also makes the animations smooth either way as you don't have to re-create the imagebuttons.
Here's what that looks like in Power Play:
Image
User avatar
Klark92
Posts: 161
Joined: 18 Jan 2015, 19:33

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

18 May 2017, 18:28

do you have code @jnizm ? for computerstats ?
Smart Kombo 1.0 | One of the best Knight Online's key combo program...
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

19 May 2017, 01:05

Run1e wrote:I found that setting the "selected" button to disabled (and setting the disabled option array in .Create() to your "active" colors) to give it permanent coloring is better and also makes the animations smooth either way as you don't have to re-create the imagebuttons.
Interesting.. will test it

Klark92 wrote:do you have code @jnizm ? for computerstats ?
For the gui or with the info?
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

19 May 2017, 08:17

Update code again. Should now work. And added Animation (on / off)
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
TheDewd
Posts: 1507
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

23 May 2017, 12:10

I made another attempt at creating a custom gui inspired by Windows 10 (and jNizM).

Script & Images attached (zip archive).

Image
Attachments
Windows10Gui.zip
(10.66 KiB) Downloaded 800 times
User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Examples of Non-Standard GUIs (ActiveX, GDI, etc.)

23 May 2017, 18:11

Nice! thanks for sharing :+1:
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 133 guests