Hollow Gadget+windows

Share your advanced PureBasic knowledge/code with the community.
User avatar
dobro
Enthusiast
Enthusiast
Posts: 766
Joined: Sun Oct 31, 2004 10:54 am
Location: France
Contact:

Hollow Gadget+windows

Post by dobro »

for a Fun :)

Code: Select all



;***********************************************
;Titre  : HOLLOW Gadget+windows
;Auteur  : Dobro
;Date  :31/10/2013
;Heure  :14:08:59
;Version Purebasic :  PureBasic 5.20 LTS (Windows - x86)
;Version de l'editeur :EPB V2.52
; Libairies necessaire : Aucune 
;***********************************************



#win=1
#editor=1



OpenWindow(#win, 0, 0, 400, 255, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)


LoadFont(9,"Courier New",18)
EditorGadget(#editor, 8, 8, 350, 210,#PB_Editor_WordWrap)
SetGadgetColor(#editor,#PB_Gadget_BackColor,$FF0000)
SetGadgetColor(#editor,#PB_Gadget_FrontColor,$FFFFFF)
SetGadgetFont(#editor,FontID(9))
For a = 0 To 5
	AddGadgetItem(#editor, a, "Line "+Str(a))
Next
SetActiveGadget(#editor); we put the cursor in the EditorGadget
SetWindowColor(#Win,#Blue)
SetWindowLong_(WindowID(#Win), #GWL_EXSTYLE, #WS_EX_LAYERED | #WS_EX_TOPMOST)
SetLayeredWindowAttributes_(WindowID(#Win),#Blue,0,#LWA_COLORKEY)

Repeat
	Event = WaitWindowEvent()
	
Until Event = #PB_Event_CloseWindow
DeleteObject_(hBrush); EPB

or juste editor : the blue color make Hollow

Code: Select all



;***********************************************
;Titre  : HOLLOW Gadget
;Auteur  : Dobro
;Date  :31/10/2013
;Heure  :14:08:59
;Version Purebasic :  PureBasic 5.20 LTS (Windows - x86)
;Version de l'editeur :EPB V2.52
; Libairies necessaire : Aucune 
;***********************************************

; the blue color make Hollow ;)

#win=1
#editor=1



OpenWindow(#win, 0, 0, 400, 255, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)


LoadFont(9,"Courier New",18)
EditorGadget(#editor, 8, 8, 350, 210,#PB_Editor_WordWrap)
SetGadgetColor(#editor,#PB_Gadget_BackColor,#blue)
SetGadgetColor(#editor,#PB_Gadget_FrontColor,$FFFFFF)
SetGadgetFont(#editor,FontID(9))
For a = 0 To 5
	AddGadgetItem(#editor, a, "Line "+Str(a))
Next
SetActiveGadget(#editor); we put the cursor in the EditorGadget
SetWindowColor(#Win,#Red)
SetWindowLong_(WindowID(#Win), #GWL_EXSTYLE, #WS_EX_LAYERED | #WS_EX_TOPMOST)
SetLayeredWindowAttributes_(WindowID(#Win),#Blue,0,#LWA_COLORKEY)

Repeat
	Event = WaitWindowEvent()
	
Until Event = #PB_Event_CloseWindow
DeleteObject_(hBrush); EPB
or juste Window : the blue color make Hollow

Code: Select all



;***********************************************
;Titre  : HOLLOW Gadget+windows
;Auteur  : Dobro
;Date  :31/10/2013
;Heure  :14:08:59
;Version Purebasic :  PureBasic 5.20 LTS (Windows - x86)
;Version de l'editeur :EPB V2.52
; Libairies necessaire : Aucune 
;***********************************************

; the blue color make Hollow ;)

#win=1
#editor=1



OpenWindow(#win, 0, 0, 400, 255, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)


LoadFont(9,"Courier New",18)
EditorGadget(#editor, 8, 8, 350, 210,#PB_Editor_WordWrap)
SetGadgetColor(#editor,#PB_Gadget_BackColor,#green)
SetGadgetColor(#editor,#PB_Gadget_FrontColor,$FFFFFF)
SetGadgetFont(#editor,FontID(9))
For a = 0 To 5
	AddGadgetItem(#editor, a, "Line "+Str(a))
Next
SetActiveGadget(#editor); we put the cursor in the EditorGadget
SetWindowColor(#Win,#blue)
SetWindowLong_(WindowID(#Win), #GWL_EXSTYLE, #WS_EX_LAYERED | #WS_EX_TOPMOST)
SetLayeredWindowAttributes_(WindowID(#Win),#Blue,0,#LWA_COLORKEY)

Repeat
	Event = WaitWindowEvent()
	
Until Event = #PB_Event_CloseWindow
DeleteObject_(hBrush); EPB
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/