Dismiss Notice

REGISTRATION IS AFTER ADMIN ACTIVATION

DONATIONS WITH PAYPAL CLICK TO BUTTON

1 MONTH VIP - 5$; 3 MONTHS VIP - 10$; 6 MONTHS VIP - 20$; 1 YEAR VIP - 30$; 2 YEARS VIP - 50$; GOLD USER FOR LIFE VIP - 150$

DONATIONS WITH Bitcoin Address:3NRs3CK3fhXifrNYxHEZKpETDd9vNLMsMD

Dismiss Notice
The registration is approved by the Administrator. It takes about 1 day to approve your registration
Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

Custom Form Modules

Discussion in 'Delphi Programming' started by N0body, Jan 30, 2014.

  1. N0body
    Online

    N0bodyN0body is a Verified Member DelphiFan Administrator Staff Member DF Staff

    if you're interested in programming, you may want to view the video below. In it I describe how you can use image files to produce creative Windows forms. 


    Video Here

    For the curious, this is how how you can create the effect in your own projects. Just pass this procedure your window, and a graphic object with a canvas. For the best effect, make sure your graphic refers to a 32bit image.



    Code:
    [font=Verdana, Arial, Helvetica, sans-serif]procedure UpdateAlphaWindow(Wnd: HWND; Image: TGraphic;
    Canvas: TCanvas; Opacity: Byte = $FF);
    var
    Blend: TBlendFunction;
    Rect: TRect;
    P1, P2: TPoint;
    S: TSize;
    DC: HDC;
    begin
    if Image.Height = 0 then Exit;
    SetWindowLong(Wnd, GWL_EXSTYLE,
    GetWindowLong(Wnd, GWL_EXSTYLE) or WS_EX_LAYERED);
    GetWindowRect(Wnd, Rect);
    P1.X := Rect.Left;
    P1.Y := Rect.Top;
    with Blend do
    begin
    BlendOp := AC_SRC_OVER;
    BlendFlags := 0;
    SourceConstantAlpha := Opacity;
    AlphaFormat := AC_SRC_ALPHA;
    end;
    DC := GetDC(0);
    P2 := Point(0, 0);
    S.cx := Image.Width;
    S.cy := Image.Height;
    UpdateLayeredWindow(Wnd, DC, @P1, @S, Canvas.Handle,
    @P2, 0, @Blend, ULW_ALPHA);
    ReleaseDC(0, DC);
    end;[/font]
     
  2. cpoutlook
    Offline

    cpoutlookcpoutlook is a Verified Member DF Member DF Payment Group

    Thanks.

     
     
  3. cyb0r
    Offline

    cyb0r DF Member

    cool thanks
     
  4. nnlscxlm
    Offline

    nnlscxlm DF Member

    Very nice! :)
    What is TOverlayForm?
     
  5. jimsweb
    Offline

    jimsweb DF Junior

    awesome tutorial - can we get the source that the guy in the video is using? The about box looks so professional.
     
  6. death_claws
    Offline

    death_claws DF Junior

    that is very nice like.
     
  7. jimsweb
    Offline

    jimsweb DF Junior

    it's very useful. thanks for sharing.
     

Share This Page

Laws
Our website, law, laws, copyright and aims to be respectful of individual rights. Our site, as defined in the law of 5651 serves as a provider of space. According to the law, contrary to the law of site management has no obligation to monitor content. Therefore, our site has adopted the principle of fit and remove. Works are subject to copyright laws and is shared in a manner that violated their legal rights, or professional associations, rights holders who, adsdelphi@gmail.com I can reach us at e-mail address. Complaints considered to be infringing on the examination of the content will be removed from our site.
Donate Help To Us and Be VIP
DONATIONS WITH PAYPAL CLICK TO BUTTON
6 MONTHS VIP - 20$; 1 YEAR VIP - 30$; 2 YEARS VIP - 50$; GOLD USER FOR LIFE VIP - 150$
Social Block