|
|
|
#1
|
||||
|
||||
|
Console App
My Test Delphi:
![]() Code:
program ConsoleGlassDelphi;
{$APPTYPE CONSOLE}
uses
Windows,
SysUtils;
type
DWM_BLURBEHIND = record
dwFlags : DWORD;
fEnable : BOOL;
hRgnBlur : HRGN;
fTransitionOnMaximized : BOOL;
end;
//function to enable the glass effect
function DwmEnableBlurBehindWindow(hWnd : HWND; const pBlurBehind : DWM_BLURBEHIND) : HRESULT; stdcall; external 'dwmapi.dll' name 'DwmEnableBlurBehindWindow';
//get the handle of the console window
function GetConsoleWindow: HWND; stdcall; external kernel32 name 'GetConsoleWindow';
function DWM_EnableBlurBehind(hwnd : HWND; AEnable: Boolean; hRgnBlur : HRGN = 0; ATransitionOnMaximized: Boolean = False; AFlags: Cardinal = 1): HRESULT;
var
pBlurBehind : DWM_BLURBEHIND;
begin
pBlurBehind.dwFlags:=AFlags;
pBlurBehind.fEnable:=AEnable;
pBlurBehind.hRgnBlur:=hRgnBlur;
pBlurBehind.fTransitionOnMaximized:=ATransitionOnMaximized;
Result:=DwmEnableBlurBehindWindow(hwnd, pBlurBehind);
end;
begin
try
DWM_EnableBlurBehind(GetConsoleWindow(), True);
Writeln('See my glass effect');
Writeln('Go Delphi Go');
Readln;
except
on E:Exception do
Writeln(E.Classname, ': ', E.Message);
end;
end.
__________________
"There are three things that sages fear... The tormented sea, a moonless night and the wrath of a gentleness man." - The fear of the Sages. |
| The Following 4 Users Say Thank You to kassane For This Useful Post: | ||
| Sponsored Links |
|
#2
|
||||
|
||||
|
Quote:
|
| The Following User Says Thank You to Razor12911 For This Useful Post: | ||
ShivShubh (24-11-2019) | ||
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fast Brute (test) | Razor12911 | Conversion Tutorials | 49 | 07-06-2016 03:44 |
| Reflate test | Razor12911 | Conversion Tutorials | 8 | 09-09-2015 00:35 |
| Test My Setup Installer Version 2 GamerZone | lhanz678 | Conversion Tutorials | 3 | 13-01-2015 19:24 |
| Need a contact form | regina | Software | 1 | 31-07-2007 04:44 |