Jump to content
Sign in to follow this  

Gui Like This !

Recommended Posts


what i did is to make a tooltip the shows my computer status

It's always "OnTop" even on full screen movies

"Lightweight" not using lots of my processor

"have shadow--means nice"

the question is

how to make a png transparent Gui with all these features


Share this post

Link to post
Share on other sites

Well maybe have a look at the GUI styles.

Specifically $WS_EX_TOPMOST.

Then once you have created the PNG and made the GUI, its pretty simple from there...

So just give it a go?


Share this post

Link to post
Share on other sites

Hi Ibrahim

I don't have a definitive answer at hand

but look into GDI and GDI+ for painting text as an overlay on video

search forum, maybe 'text on video'

there are many GDI+ examples

here's a modified helpfile GDI example

tested on fullscreen avi with media player classic

#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <FontConstants.au3>

Global $tRECT, $hFont, $hOldFont, $hDC

HotKeySet("{ESC}", "_Exit")

$tRECT = DllStructCreate($tagRect)
DllStructSetData($tRECT, "Left", 10)
DllStructSetData($tRECT, "Top", 5)
DllStructSetData($tRECT, "Right", 400)
DllStructSetData($tRECT, "Bottom", 50)

$hDC = _WinAPI_GetDC(0)
$hFont = _WinAPI_CreateFont(50, 0, 0, 0, 400, False, False, False, $DEFAULT_CHARSET, _
$hOldFont = _WinAPI_SelectObject($hDC, $hFont)

_WinAPI_SetTextColor($hDC, 0x00FFFF)
_WinAPI_SetBkColor($hDC, 0x000000)
; comment next line to get black background instead of transparent one

While 1
    _WinAPI_DrawText($hDC, "Hello world!", $tRECT, $DT_CENTER)
    _WinAPI_InvalidateRect(0, 0)
    _WinAPI_DrawText($hDC, "Goodbye world!", $tRECT, $DT_CENTER)
    _WinAPI_InvalidateRect(0, 0)

Func _Exit()
    _WinAPI_SelectObject($hDC, $hOldFont)
    _WinAPI_ReleaseDC(0, $hDC)
    _WinAPI_InvalidateRect(0, 0)
    $tRECT = 0
EndFunc  ;==>_Exit

I see fascists...

Share this post

Link to post
Share on other sites

With the whole fullscreen movies thing, it'll be a bit complicated. I don't know too much about it and can't help that much, apart from providing this information, but the way a video is drawn can vary by Windows version and the Media Player being used. For instance, if it's in Overlay mode, which is most common for XP and older Media Players, then graphic card settings might prevent any "on top" drawing. VMR7 is the default in XP though, which uses DirectX 7 to render the video. In Vista and Windows Media Player, EVR is used, and would require a .NET 3.5 communication of some sort to draw over the top of it.

With that said, the physical program that is drawing the video might need to be modified by AutoIt3 somehow. A DLL hook might be needed to interface directly with whatever rendering engine is being used (or in the case of EVR, some fancy .NET 3.5 stuff that I know zero about).

My point is, I think it will be a bit more involved then simply setting a foremost flag for GDI+ drawing of what you want to do. I could be wrong, but yeah. Try experimenting with MPlayerC as your video player too, as it allows you to specifically choose the output method of the video drawing.

Edited by DanielC

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this