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

Post your working scripts, libraries and tools for AHK v1.1 and older
Reynbow
Posts: 10
Joined: 27 Sep 2017, 22:30

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

07 Jun 2018, 19:00

I would share the code if I could! But not only does it have so many random dependencies for my work environment, but it's also got a decent amount of personal information in the code. :)
burque505
Posts: 1731
Joined: 22 Jan 2017, 19:37

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

21 Jul 2018, 20:01

A minimalist GUI using images.
XL2CSV.PNG
XL2CSV.PNG (160.67 KiB) Viewed 8285 times
User avatar
joedf
Posts: 8937
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

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

22 Jul 2018, 10:09

I like the attempt, but it seems a little cartoony like something out of a game?
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]
_Ne0n
Posts: 7
Joined: 31 Aug 2018, 08:20

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

31 Aug 2018, 08:47

Hello, i wrote two small classes for picture button.
I present to you Class_PictureButton. I have uploaded two versions.
------------------------------------------------------------------------------------
Class_PictureButton_v1.ahk
Advantage:
- Does not use/require third-party libraries. Written with built-in AHK functions
Flaw:
- There are flickers when you change the picture(that is, when you hover/when you press / when you disable / enable the button)


------------------------------------------------------------------------------------
Class_PictureButton_v2.ahk
Advantage:
- Flicker-free
- When creating - > ability to set the image as Bitmap, and the path to the image
- When deleting - > ability to clear Bitmap, thus free up memory, or not
Flaw:
- Uses Gdi (not so scary)

------------------------------------------------------------------------------------

Download link: https://github.com/Ne0n-git/Class_PictureButton
P.S. on assessment of. Not the final version.
Alibaba
Posts: 480
Joined: 29 Sep 2013, 16:15
Location: Germany

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

31 Aug 2018, 15:48

_Ne0n wrote:I present to you Class_PictureButton. I have uploaded two versions.
Very nice idea, I like them! :)
"Nothing is quieter than a loaded gun." - Heinrich Heine
_Ne0n
Posts: 7
Joined: 31 Aug 2018, 08:20

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

31 Aug 2018, 19:39

Very nice idea, I like them! :)
Hehe, thank you. It will be updated soon.
User avatar
emmanuel d
Posts: 90
Joined: 17 Nov 2013, 04:45

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

24 Sep 2018, 13:44

FileExplorer with BroadcrumbBar and 3 Listviews
simple but it does the job.

the listviews are on 2 or 3 child Gui's so the scrollbar can be hidden :D
20180924202501_screenshot.jpg
Explorer
20180924202501_screenshot.jpg (415.43 KiB) Viewed 3087 times
Last edited by emmanuel d on 08 Nov 2020, 08:26, edited 1 time in total.
User avatar
emmanuel d
Posts: 90
Joined: 17 Nov 2013, 04:45

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

24 Sep 2018, 13:52

Same Style of Gui for my ahk texteditor
The app icons opens the menu

one listview one treeview and a scintella textcontrol
20180924202717_screenshot.jpg
20180924202717_screenshot.jpg (358.81 KiB) Viewed 3087 times
Last edited by emmanuel d on 08 Nov 2020, 08:23, edited 1 time in total.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

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

24 Sep 2018, 15:15

Pretty neat! Interesting color palette...
User avatar
emmanuel d
Posts: 90
Joined: 17 Nov 2013, 04:45

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

25 Sep 2018, 11:48

i forgot to mention that the breadcrumb bar in that file explorer is made of a bunch of text controls put next to each other and hidden and shown when needed.
when clicked in the background, you click on a editbox, and all the text controls hide.
its an ugly solution but it does the job.

Code: Select all

#SingleInstance Force         ;[force|ignore|off]
#NoEnv                        ; 4 performance
SetBatchLines, -1             ; 4 performance  the script run's at maximum speed.
ListLines Off                 ; 4 performance
SetWorkingDir %A_ScriptDir%
global    G_ScriptFullPath, G_ScriptNameExt, G_ScriptDir, G_ScriptExt, G_ScriptName, G_ScriptDrive, G_Temp
SplitPath,A_ScriptFullPath, G_ScriptNameExt, G_ScriptDir, G_ScriptExt ,G_ScriptName, G_ScriptDrive
G_ScriptFullPath := A_ScriptFullPath, G_Temp := A_Temp "\" G_ScriptName
global G_IconSize := 48

Gui,Main:New,-DPIScale                            ; create the main GUI
Notify_BroadCrumbBar(G_IconSize, "Create","s12","Arial")
Notify_BroadCrumbBar("", "Update","G:\.Development\Ahk\BroadCrumbBar\pres F1 for different path\test","G:\.Development\Ahk")
Gui,Main:Show,W900 H100                           ; show the GUI
Return
F1::Notify_BroadCrumbBar("", "Update","G:\tweet\tweeter\twatter\trili\lala","G:\tweet\tweeter\twatter")

; Notify_BroadCrumbBar is made like:
; [v1.1.20+]: If not a valid label name, 
; a function name can be used instead. 
; Alternatively, the GuiControl command can be used 
; to associate a function object with the control. 
; The function can optionally accept the following parameters 
; (where gCtrlEvent sets the function):
; CtrlEvent(CtrlHwnd, GuiEvent, EventInfo, ErrorLevel:="")
Notify_BroadCrumbBar(CtrlHwnd, GuiEvent, EventInfo, ErrorL:=""){
	; Made by: Emmanuel Deketele
	local x, w,  idx, Position:=0 ; position need it for A_LoopDelimiter
	static PrevBCPath, PrevBCIdx, ControlCount := 0
	static FontOptions, FontType, h
	if (GuiEvent="Create"){  ; Custom event call it to create the bar
		FontOptions  := EventInfo                     ; use readeble variable
		FontType     := ErrorL                        ; use readeble variable
		h            := CtrlHwnd                      ; The height of the control
		s := TextCTRL_Get_FontSize(CtrlHwnd)          ; Get the desired font size
		Gui,BCB:New,-DPIScale +ParentMain -Caption    ; Create a GUI
		Gui,BCB:Margin , 0, 0                         ; No margins
		Gui,BCB:font,% "norm s" s,wingdings           ; Set Font for the computer icon
		Gui,BCB:Add,Text,x0 y0 w%h% h%h% cBlue Center 0x200 BackgroundTrans vBCBarItem0 gNotify_BroadCrumbBar ,: ;Add computer icon ; 0x200 center vertical
		Gui,BCB:font,% "norm " FontOptions,%FontType% ; Set the font for the rest of the text
		Gui,BCB:Show,X0 Y0 H%h% W2000                 ; Show the gui 

		}
	else if (GuiEvent="Update"){ ; Custom event to update the bar 
		BCPath      := EventInfo                      ; use readeble variable
		TabPath     := ErrorL                         ; TabPath is the selected full path
		if !(!ForceRedraw && PrevBCPath = BCPath) {  ; if Redraw needed
			x:=h                                        ; first item is the desktop icon and is skipped
			loop,%ControlCount% {                       ; Loop All BroadCrumbs Controls
				GuiControl,BCB:hide, BCBarItem%A_Index%   ; Hide the controls
				if ErrorLevel=1                           ; If we deleted the gui
					ControlCount--                          ; Remove the control from the counter
				}
			loop,Parse,BCPath,\|
				{
				Position        += StrLen(A_LoopField) + 1       ; Find the position of the Delimiter
				A_LoopDelimiter := SubStr(BCPath, Position, 1)   ; Get the Delimiter
				w:=TextCTRL_Get_Width(A_LoopField A_LoopDelimiter,FontOptions,FontType)
				if (A_Index>ControlCount){                ; If we have not enough text controls
					;!!An ampersand (&) may be used in the text to underline one of its letters, To disable all special treatment of ampersands, include 0x80 in the control's options.
					Gui,BCB:add, text, x%x% w%w% y0 h%h% vBCBarItem%A_Index% 0x200 0x80 cBlue gNotify_BroadCrumbBar backgroundtrans,%A_LoopField%%A_LoopDelimiter%
					ControlCount++                          ; Add the control from the counter
					}
				else {
					GuiControl,BCB:        , BCBarItem%A_Index%,%A_LoopField%%A_LoopDelimiter% ; Set the new text
					GuiControl,BCB:MoveDraw, BCBarItem%A_Index%,x%x% w%w% ; Set the new position
					GuiControl,BCB:show    , BCBarItem%A_Index%           ; Show the Control
					}
				x+=w                                      ; Set the new x coordinat
				}
			}
		Stringsplit,TabPath,TabPath,\|                ; Create a array so we Know the depth of the Path
		BCIdx := TabPath0
		if !(PrevBCPath=BCPath && PrevBCIdx=BCIdx) {    ; if something changed
			GuiControl,BCB:+cBlue   ,BCBarItem%PrevBCIdx% ; Remove the color from the old item
			GuiControl,BCB:MoveDraw ,BCBarItem%PrevBCIdx% ; Repaint the old item
			GuiControl,BCB:+cred    ,BCBarItem%BCIdx%     ; set the highlighting color
			GuiControl,BCB:MoveDraw ,BCBarItem%BCIdx%     ; Paint the new color
			}
		PrevBCPath := BCPath                          ; save the previous path
		PrevBCIdx  := BCIdx                           ; save the Selected one
		}
	else if (GuiEvent="Normal") {                   ; we clicked on a item
		BreadCrumbIdx := SubStr(A_GuiControl,10)      ; the BreadCrumb index we clicked on
		IfEqual,BreadCrumbIdx,%PrevBCIdx%,Return      ; Return if we clicked the active one
		NewTabPath    := GetDirectory(PrevBCPath,BreadCrumbIdx,FolderName) ; Get the new Path
		Notify_BroadCrumbBar("", "Update",PrevBCPath,NewTabPath) ; Update the BreadcrumbBar
		}
	}

GetDirectory(Directory,Index,byref FolderName:="") { ; Get the directory to a certain depth(idx)
	; Made by: Emmanuel Deketele
	NewDirectory := ""                              ; this is needed to use .= 
	Stringsplit,Directory,Directory,\|              ; create a aray of the path
	IfEqual,Index,0,return,"",FolderName:="My Computer" ; If we are at root, return the propper values
	loop,%Index%                                    ; Loop the directory structure
		NewDirectory.= Directory%A_Index% (A_Index < Index ? "\" : "") ; Add the foldername to the Path
		,FolderName := Directory%A_Index%             ; Set the curent foldername
	Return,NewDirectory                             ; Return the new directory
	}
TextCTRL_Get_Width(Text,FontOptions:="",FontType:="") { ; Get the Width of a textcontrol
	; Made by: Emmanuel Deketele
	Gui,GetTextW:New,-DPIScale                      ; Create a new GUI
	Gui,GetTextW:font,%FontOptions%,%FontType%      ; Set the font for the text
	Gui,GetTextW:Add,Text,hwndhtxt,%Text%           ; create the text control
	GuiControlGet, Pos,GetTextW: Pos,%htxt%         ; get the width of the control
	Gui,GetTextW:Destroy                            ; Destroy the gui
	Return,Posw                                     ; Return the width
	}
TextCTRL_Get_FontSize(PXH) { ; Determin the FontSize For a givven Height in pixels
	; Made by: Emmanuel Deketele
	Gui, TextFontH: New,-DPIScale                   ; Create a new GUI
	loop,%PXH% {                                    ; Start a loop
		L_FS:= PXH - A_Index + 1                      ; reverse the loop
		Gui,TextFontH: Font, s%L_FS% norm, Lucida Console ; Set font
		Gui,TextFontH: Add, Text,hwndhtext ,Sometext  ; Add some text
		GuiControlGet, L_F,TextFontH:Pos,%htext%      ; get the size
		} until L_FH <= PXH                           ; Loop untill text fits the height
	Return,L_FS                                     ; Return the fontSize
	}
User avatar
emmanuel d
Posts: 90
Joined: 17 Nov 2013, 04:45

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

13 Oct 2018, 13:39

after reading this toppic, i made a media player.
No icons where used yet, just some fancy fonts.
with a fake progress on the top(blue)
2 channel volume progress(red)
fully clickable titlebar to seek, drag to move window and double-click to maximize.
minimal player shows by accident on the bottom right(compiled version was playing)

ps does anybody knows why my attachments disappear? is there a time limit or something?
20181013195835_screenshot.jpg
MediaPlayer
20181013195835_screenshot.jpg (232.24 KiB) Viewed 3087 times
Last edited by emmanuel d on 08 Nov 2020, 08:30, edited 1 time in total.
treashunter

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

17 Oct 2018, 13:27

Hey -

This is an HTML gui - i reworked an old ahk script using only HTML/CSS in order to allow for easier scrolling listviews with row coloring. Started with just the listviews\tables, ended up redoing the whole shabang. Let me know what you think! :)


Gif:
https://imgur.com/a/kEwD4Ij

Thanks!
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

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

17 Oct 2018, 15:54

treashunter wrote:
17 Oct 2018, 13:27
Hey -

This is an HTML gui - i reworked an old ahk script using only HTML/CSS in order to allow for easier scrolling listviews with row coloring. Started with just the listviews\tables, ended up redoing the whole shabang. Let me know what you think! :)


Gif:
https://imgur.com/a/kEwD4Ij

Thanks!
That's quite impressive! It appears that the code likely contains information that you can't share but I'd love to see some of it. What did you use on the JavaScript side? jQuery?
ozzii
Posts: 481
Joined: 30 Oct 2013, 06:04

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

18 Oct 2018, 02:45

@treashunter
Very nice.
Can/want you post the sources?
Tre4shunter
Posts: 139
Joined: 26 Jan 2016, 16:05

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

18 Oct 2018, 07:52

Thanks guys :D

Actually, i specifically did not want to use any external libraries, so its all done in pure CSS/HTML - no jQuery or anything. Also - the only Javascript i used was to attached onclick handlers and such to certain dynamically created elements.

Here is a highly modified version - normally all of the html inside of the .content class is rendered dynamically through the script. in this case i just have it hardcoded in the HTML file. As well as removed most of the AHK functions (not really relevent to the GUI Demo)

Also Please forgive me for the horrible CSS organization - i probably could cut it in half, but it was a learn as you go kind of thing!

File contains .ahk as well as CSS/HTML. Note - the LOADING CSS animation is not mine :P

https://www.dropbox.com/s/ut5sb63v7u5gh ... i.zip?dl=0

-Treas

******EDIT****
-You will have to change the paths in the <link> tags for the CSS sheets (at the top of the HTMLFullGUI file) to wherever you download the script to. ActiveX control would not allow me to use relative paths :( so if anyone has a solution to that, id be eternally grateful! :D
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

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

18 Oct 2018, 08:21

Neat. You mostly just utilized the DOM APIs from the AHK side. Thanks much for sharing!
ozzii
Posts: 481
Joined: 30 Oct 2013, 06:04

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

19 Oct 2018, 01:41

Thanks for the share.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 67 guests