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

Post your working scripts, libraries and tools
think
Posts: 35
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: 640
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: 35
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: 640
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: 35
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: 640
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: 2329
Joined: 30 Sep 2013, 01:33
GitHub: jNizM
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] 1.1.30.00 x64 Unicode | [WIN] 10 Pro (Version 1803) x64 | [GitHub] Profile
Donations are appreciated if I could help you
User avatar
RUNIE
Posts: 279
Joined: 03 May 2014, 14:50
GitHub: Run1e

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: 1112
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
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
User avatar
jNizM
Posts: 2329
Joined: 30 Sep 2013, 01:33
GitHub: jNizM
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] 1.1.30.00 x64 Unicode | [WIN] 10 Pro (Version 1803) x64 | [GitHub] Profile
Donations are appreciated if I could help you
User avatar
TheDewd
Posts: 1112
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. ;)
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
User avatar
jNizM
Posts: 2329
Joined: 30 Sep 2013, 01:33
GitHub: jNizM
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] 1.1.30.00 x64 Unicode | [WIN] 10 Pro (Version 1803) x64 | [GitHub] Profile
Donations are appreciated if I could help you
User avatar
RUNIE
Posts: 279
Joined: 03 May 2014, 14:50
GitHub: Run1e

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
joedf
Posts: 6498
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

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

18 May 2017, 13:56

Ooooooh fancy! :D :3
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500 @ 3.00 GHz, 16GB DDR4 3200 MHz, NVIDIA GTX 1060 6GB | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]
User avatar
RUNIE
Posts: 279
Joined: 03 May 2014, 14:50
GitHub: Run1e

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: 149
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: 2329
Joined: 30 Sep 2013, 01:33
GitHub: jNizM
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] 1.1.30.00 x64 Unicode | [WIN] 10 Pro (Version 1803) x64 | [GitHub] Profile
Donations are appreciated if I could help you
User avatar
jNizM
Posts: 2329
Joined: 30 Sep 2013, 01:33
GitHub: jNizM
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] 1.1.30.00 x64 Unicode | [WIN] 10 Pro (Version 1803) x64 | [GitHub] Profile
Donations are appreciated if I could help you
User avatar
TheDewd
Posts: 1112
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 229 times
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
User avatar
joedf
Posts: 6498
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
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 @ 3.00 GHz, 16GB DDR4 3200 MHz, NVIDIA GTX 1060 6GB | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]

Return to “Scripts and Functions”

Who is online

Users browsing this forum: Banayat, gwarble, skribb and 24 guests