Page 10 of 20

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

Posted: 05 Nov 2016, 06:34
by think
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.

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

Posted: 08 Nov 2016, 07:50
by kczx3
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

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

Posted: 09 Nov 2016, 11:46
by think
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?

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

Posted: 09 Nov 2016, 13:13
by kczx3
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?

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

Posted: 10 Nov 2016, 15:19
by think
Yes, your dll works, I must have done something wrong... Do you still have your xml file?

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

Posted: 10 Nov 2016, 17:08
by kczx3
I added the xml file to the G-Drive folder I shared above.

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

Posted: 18 May 2017, 04:55
by jNizM
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

; ===============================================================================================================================

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

Posted: 18 May 2017, 06:11
by runie
Always been a fan of your settings gui concepts ._. Do you have code?

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

Posted: 18 May 2017, 06:16
by TheDewd
Run1e wrote:Always been a fan of your settings gui concepts ._. Do you have code?
Because related: https://autohotkey.com/boards/viewtopic ... 247#p53247

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

Posted: 18 May 2017, 07:08
by jNizM
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"

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

Posted: 18 May 2017, 07:20
by TheDewd
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. ;)

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

Posted: 18 May 2017, 09:22
by jNizM
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)

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

Posted: 18 May 2017, 11:33
by runie
Implemented jNizM's concept into Power Play. Might do some tweaking but pretty happy with how smooth the results ended up being.

Image

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

Posted: 18 May 2017, 13:56
by joedf
Ooooooh fancy! :D :3

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

Posted: 18 May 2017, 16:55
by runie
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

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

Posted: 18 May 2017, 18:28
by Klark92
do you have code @jnizm ? for computerstats ?

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

Posted: 19 May 2017, 01:05
by jNizM
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?

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

Posted: 19 May 2017, 08:17
by jNizM
Update code again. Should now work. And added Animation (on / off)

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

Posted: 23 May 2017, 12:10
by TheDewd
I made another attempt at creating a custom gui inspired by Windows 10 (and jNizM).

Script & Images attached (zip archive).

Image

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

Posted: 23 May 2017, 18:11
by joedf
Nice! thanks for sharing :+1: