Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #20  
Old 07-01-2018, 09:05
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,761
Thanks: 2,192
Thanked 11,242 Times in 2,318 Posts
Razor12911 is on a distinguished road
Quote:
Originally Posted by kassane View Post
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.
The problem is this uses DWM, which no longer works the way you want it to work in Windows 8.1 and doesn't work in Windows 10.
Reply With Quote
The Following User Says Thank You to Razor12911 For This Useful Post:
ShivShubh (24-11-2019)
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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



All times are GMT -7. The time now is 19:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com