Come and click on the topic, you can inherit the BOB008 original in 9CBS. Posted at 2005-04-04

xiaoxiao2021-03-06  24

Unit unit1;

Interface

uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, Menus; type TForm1 = class (TForm) img1: TImage; // left img2: TImage; // Top img3: TImage; // CAPTION IMG4: TIMAGE; // Right IMG5: TIMAGE; // Time Control Imgmin: TIMAGE; // RESTORSISIZE IMGMAX: TIMAGE; // MaxButton ImgClose: TIMAGE; // CloseButton

// These pictures are the window style pictures of the chirstmastime inside WinBlands 4, and the modification is more perfect.

// After the modification, use Photoshop to 256 colors (100%) OK, start loading the image into each image control, ready to start procedure formresize; procedure formcreate; Procedure FormPaint (Sender: Tobject) ); procedure FormDestroy (Sender: TObject); private {Private declarations} iStyle: Longint; // window style shuai: boolean; // state determination flag is used in NCMOUSEMOVE in procedure DrawActivate; // when this procedure DrawDeActivate Videos activity; // Do not active this PROTECTED Procedure WndProc (var message: tMessage); OVERRIDE; / / In fact, it is Override, here I only process

// the beginning of a NC non-news, you can also write according to their own style below WM_ACTIVATE procedure wmnchittest (var msg: TWMNCHITTEST); message WM_NCHITTEST; procedure wmncmousemove (var msg: TWMNcMousemove); message wm_ncmousemove; procedure wmnclbuttondown (var msg: Twmnclbuttondown); message wm_nclbuttondown; procedure wmnclbuttondblclk (var msg: TWMNCLButtonDblClk); message wm_nclbuttondblclk; procedure wmnclbuttonup (var msg: twmnclbuttonup); message wm_nclbuttonup; procedure wmncpaint (var msg: twmncpaint); message wm_ncpaint; public {public declarations} end;

VAR FORM1: TFORM1; CAPRECT: TRECT; PT: TPOINT; DCI: Integer; Implementation

{$ R * .dfm} // ----------------------------------------- ------------------------------------- Procedure TFORM1.FORMRESIZE (Sender: TOBJECT); VAR RGN: HRGN; Begin // To ensure the appearance of the window, set up form1.constraints.minHeight: = 40; form1.constraints.maxHeight: = getSystemMetrics (sm_cyscreen) - getSystemMetrics; SM_CYMIN

Rgn: = CreateroundRectrGN (0, 0, Width, Height, 5, 5); // The RGN here is mainly the subject file of Windows XP, don't do it, hey, true TMD ugly setWindowRgn (Handle, RGN, TRUE) ; // Set the window area and redraw, the drawing outside the area will not display

DeleteObject (RGN); // Used to remember to delete an object. Invalidate; // This sentence is also important, end; // -------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------ // -------------------------------------------------- ---------------------------- procedure tform1.drawactivate; var myhdc: hdc; ico: hicon; i: integer; ACV: TCANVAS; CAPRECT: TRECT; RCDW: Integer; J: Integer; K: Integer; Begin // Canvas.lock

MyHDC: = getWindowdc (Handle); acv: = tcanvas.create; try acv.handle: = myhdc; setstretchbltmode (acv.handle, stretch_deletesscans); with acv do begin Bitblt (acv.handle, 0, 0, 4, 31, Img1.canvas.handle, 0, 0, srcopy); // The top left corner, width 4 pixels, high 31 pixels SrcxxxxXXX is more bitblt (acv.handle, 4, 0, 30, 31, img2. Canvas.Handle, 0, 0, Srccopy; // Draw icon // To draw icons, let's get it ready to give it an ico: = icon.handle; // I want to be lazy. ^ - ^ Drawiconex (acv.handle, 18, 6, ICO, 16, 16, 0, 0, di_normal); // This topic ICON can also give a lot of friends, so the painting is the same as the original icon. Flash? No //, Icon is painted, we have to start the title text, first prepare, don't know how much I: = Length (caption) * 8 - 10; // Each text is probably, how to Almost 8 pixels wide Bitblt (acv.handle, 34, 0, 6, 31, img3.canvas.handle, 0, 0, srcopy); // Preparation below to shop with red carpets, ~ Groom bride into the hole - "Plop", a brick flying, I halo ~ Pour Stretchblt (acv.handle, 40, 0, i, 31, img3.canvas.handle, 6, 0, 10, 31, srcopy); // start painting Caption, there should be many friends who want to solve the problem for the reference CAV: = tcanvas.create; cav.brush.style: = bsclear; cav.handle: = myHDC; CapRect: = RECT (45, 10, i * 2 - 20, 26); cav.font.name: = 'Song body'; cav.font.size: = 9; cav.font.color: = CLWHITE; cav.font.charset: = GB2312_Charset; DrawText (Cav.handle, Pchar Caption, length (caption), caprect, dt_left; cav.free; // is ok, the title is also painted, now dry, then painting, still early // Start the title column sealing Bitblt (acv) .Handle, i 40, 0, 11, 31, img3.canvas.handle, 18, 0, srccopy); // Ok, mouth is also destroyed, do you have now? ? ? Then draw, depressed.

//, then the connection, you need to judge, depressed, rcdw: = width - i - 51 - 94; // If you need to draw, there is only 180 if you don't have 180, just draw the IF (RCDW <= 180) THEN BEGIN BIN Bitblt (ACV .Handle, I 51, 0, RCDW, 31, Img2.canvas.handle, 40, 0, srcopy; End // Otherwise, avoid waste resources ELSE IF (RCDW> 180) THEN Begin J: = Trunc (RCDW / 180); for K: = 0 to J - 1 Do Begin Bitblt (acv.handle, i 51 (k) * 180, 0, 180, 31, img2.canvas.handle, 40, 0, Srcopy; end; bitblt (acv.handle, i 51 j * 180, 0, (rcdw - j * 180), 31, img2.canvas.handle, 40, 0, srcopy); end; // The mouth is ready to make the docking, this is the ugliness that uses Stretchblt to pull it or use Bitblt Bitblt (acv.handle, (Width - 94), 0, 10, 31, Img2.canvas.Handle, 239, 0, Srccopy ); // still leave 4 pixels to the right side of the sealing Bitblt (acv.handle, (Width - 93), 0, 90, 31, img2.canvas.handle, 240, 0, srccopy); // Ok, The above Dongdong is completed, the seal, 55555, who makes this good color, ..., is it very troublesome Bitblt (acv.handle, (width - 5), 0, 4, 31, img4.canvas .Handle, 0, 0, Srcopy; // Oh, the above painting.

Start drawing left, pay attention to more bitblt (acv.handle, 0, 31, 4, 9, img1.canvas.handle, 0, 31, srcopy); Stretchblt (acv.handle, 0, 40 , 4, (Height - 59), Img1.canvas.Handle, 0, 40, 4, 28, Srcopy; Bitblt (acv.handle, 0, (Height - 20), 4, 19, img1.canvas.handle, 0, 58, srcopy); // Hey, painting here is still not very good, hurry to paint on the right, Copy is OK Bitblt (acv.handle, (width - 5), 31, 4, 9, img4. Canvas.Handle, 0, 31, Srccopy; Stretchblt (ACV.handle, (Width - 5), 40, 4 (Height - 58), Img4.canvas.Handle, 0, 40, 4, 28, srcopy; Bitblt (acv.handle, (Width - 5), (Height - 19), 4, 19, Img4.canvas.Handle, 0, 58, Srccopy); // Draw below Bitblt (acv.handle, 4, (Height - 10), 10, 9, Img5.canvas.handle, 0, 0, Srcopy; Stretchblt (Acv.handle, 14, (Height - 10), (Width - 28), IMG5.canvas.Handle , 10, 0, 21, 9, srccopy; Bitblt (acv.handle, (Width - 15), (Height - 10), 10, 9, IMG5.canvas.Handle, 31, 0, Srccopy; // Minimum Button Bitblt (acv.handle, (Width - 38), 1, 26, 29, ImgClose.canvas.handle, 0 , 0, srcopy); // Need to check if there is MaxButton, CloseButton is not checked, since it is definitely what to be a closeButton //? Depressed, forget it, I have no time to take care of you to maximize the button.

// Start the painting and then say, but also watching FORM is not a maximizing IF windowState = wsmaximized kilob // Imgrestore Bitblt (ACV.Handle, (Width - 64), 1, 26, 29, IMGRESTORE.CANVAS.HANDLE, 0 , 0, srcopy; Else if WindowsTate = WSNORMAL THEN BEGIN / / IMGMAX Bitblt (acv.handle, (Width - 64), 1, 26, 29, IMGMax.canvas.handle, 0, 0, srcopy; // Draw the minimize Button Bitblt (ACV.handle, (Width - 90), 1, 26, 29, Imgmin.canvas.handle, 0, 0, Srccopy; //canvas.unlock; // Using Canvas.unlock Pairing Also the same effect, I wrote here to recommend the recommended practices End; Finally ReleaseDC (Handle, Acv.handle); // Release device scene acv.free; end; end; // Titted message, watching the day to steal day Procedure tform1.wmncpaint (var msg: twmncpaint); begin drawactivate; // changed to an even folk drop end; // ------------------------- -------------------------------------------------- --- // If you are inactive, you should draw this // --------------------------------- ------------------------------------------ procedure tform1.drawdeactivate; var myhdc : HDC; ICO: Hicon; I: Integer; CAV: Tcanvas; DCV: Tcanvas; CapRect: TRECT; RCDW: Integer; J: Integer; K: Integer; begin //canvas.lock; myhdc: = getWindowdc (Handle); dcv: = tcanvas.create; Try dcv.handle: = myHDC; setstretchbltmode (dcv.handle, stretch_deletesscans); with dcv do begin Bitblt (dcv.handle, 0, 0, 4, 31, img1.canvas.handle, 4, 0, srcopy); // The top left corner, 4 pixels wide, high 31 pixels Srcxxxxx has a lot of Bitblt (dcv.handle, 4, 0, 30, 31, img2.canvas.handle, 0, 31, srcopy); // DRAW icon // I will draw an icon immediately, let's get it ready, ICO: = icon.handle;

Drawiconex (Dcv.handle, 18, 6, ICO, 16, 16, 0, 0, Di_NORMAL); // is ok, icon is painted, we have to start the title text, first prepare, don't know how much I: = Length (CAPTION) * 8 - 10; // Calculate the length, good painting Bitblt (Dcv.handle, 34, 0, 6, 31, img3.canvas.handle, 0, 31, srccopy); / / Below is ready to shop red carpets for capeni, ~ Groom bride into the hole - "Ploth" a brick flying, I halo ~ Pour StretchBLT (Dcv.Handle, 40, 0, I, 31, img3.canvas.handle, 6, 31, 10, 31, srcopy); // Start painting CAV: = tcanvas.create; cav.brush.style: = BSCLEAR; // Brush type, ~ 嘿嘿, even two bad brushes oh CAV. Handle: = myHDC; CapRect: = RECT (45, 10, i * 2 - 20, 26); cav.font.name: = 'Song Body'; cav.font.size: = 9; cav.font.color: = CLBLACK; CAV.FONT.CHARSET: = GB2312_Charset; DrawText (Cav.Handle, Pchar (CAPTION), Length (CAPTION), CAPRECT, DT_LEFT; cav.free; // is good, title is also painted, now dry scorpion , Then painting, early // Start the title bar sealing Bitblt (Dcv.handle, i 40, 0, 11, 31, img3.canvas.handle, 18, 31, srccopy); // Good, sealed Ok, do you do it now? ? ? Then draw, depressed.

// Then, the connection is needed, and it is necessary to judge. Img2.canvas.handle, 40, 31, srcopy; ELSE IF (RCDW> 180) THEN Begin J: = Trunc (RCDW / 180); for K: = 0 to j Do Begin Bitblt (dcv.handle, i 51 (k) * 180, 0, 180, 31, img2.canvas.handle, 40, 31, srcopy; end; bitblt (Dcv.handle, i 51 J * 180, 0, (RCDW - j * 180), 31, img2.canvas.handle, 40, 31, srcopy; end; // To open a mouth, prepare to engage in docking, here, the ugliness that can be pulled with StretchBLT or use Bitblt Bitblt (dcv.handle (Width - 94), 0, 10, 31, Img2.canvas.Handle, 239, 31, Srccopy; // Still staying 4 pixels to the right of the sealing Bitblt (dcv.handle, (Width - 93), 0, 90, 31, img2.canvas.handle, 240, 31, srccopy); // is good, the above Dongdong is completed, the seal, 55555, who makes it so good, ..., Not very troublesome Bitblt (dcv.handle, (width - 5), 0, 4, 31, img4.canvas.handle, 4, 0, srcopy); // -------------- -------------------------------------------------- 0--2 // Oh, the above is finished.

Start drawing the left, pay attention to how to get more about it // ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------- Bitblt (Dcv.handle, 0, 31, 4, 9, IMG1. Canvas.Handle, 0, 31, Srccopy; Stretchblt (Dcv.handle, 0, 40, 4, (Height - 59), Img1.canvas.Handle, 0, 40, 4, 28, Srcopy; Bitblt (DCV. Handle, 0, (Height - 18), 4, 19, Img1.canvas.handle, 0, 58, Srcopy; // --------------------- ------------------------------------- // Hey, painting here is still not very good, hurry Painted on the right, the top is OK above // ​​-------------------------------------- ---------------------------- Bitblt (Dcv.handle, (Width - 5), 31, 4, 9, IMG4. Canvas.Handle, 0, 31, Srccopy; Stretchblt (Dcv.handle, (Width - 5), 40, 4 (Height - 58), Img4.canvas.handle, 0, 40, 4, 28, srcopy; Bitblt (Dcv.handle, (Width - 5), (Height - 18), 4, 18, Img4.canvas.Handle, 0, 58, Srccopy; Bitblt (DCV.handle, 4, (Height - 10), 10 , 9, Img5.canvas.handle, 0, 9, Srccopy; Stretchblt (DCV.handle, 14, (Height - 10), (Width - 28), 9, Img5.canvas.handle, 10, 9, 21, 9, Srcopy; bitblt (Dcv.handle, (Width - 14), (Height - 10), 10, 9, Img5.canvas.Handle, 31, 9, Srccopy;

Bitblt (Dcv.handle, (Width - 38), 1, 26, 30, ImgClose.canvas.handle, 130, 0, srcopy;

IF WindowsTate = WSMaximized The begin // Imgrestore Bitblt (Dcv.handle, (Width - 64), 1, 26, 30, Imgrestore.cnvas.Handle, 130, 0, Srccopy; Else If WindowsTate = WSNORMAL THEN BEGIN / / Imgmax Bitblt (Dcv.handle, (Width - 64), 1, 26, 30, Imgmax.canvas.handle, 130, 0, Srccopy; End; Bitblt (Dcv.handle, (Width - 90), 1, 26, 30, imgmin.canvas.handle, 130, 0, srcopy; //canvas.unlock; // Use canvas.unlock pairing is also the same effect, I wrote here is recommended for End; Finally ReleaseDC (Handle, DCV. Handle; dcv.free; end; end; // Title bar mouse left mouse PROCEDURE TFORM1.WMNCLButtondown (var msg: twmnclbuttondown); var DC: hdc; cvs: tcanvas; begin DC: = getWindowdc (Handle) CVS: = tcanvas.create; try cvs.handle: = DC; with cvs do beg If msg.hittest = HTMINBUTTON THEN BEGIN Bitblt (cvs.handle, (Width - 90), 1, 26, 30, Imgmin.canvas. Handle, 26, 0, srcopy; end else if msg.hittertest = htmaxbutton the Begin if windowstate = WSNORMAL THEN BEGIN Bitblt (Width - 64), 1, 26, 30, Imgmax.canvas.Handle, 26, 0, Srcopy; Else IF WindowsTate = WSMaximized The Begin Bitblt (CVS. Handle, (Width - 64), 1, 26, 30, IMGRESTORE.cAS.Handle, 26, 0, Srcopy; End; Else if msg.hittetertest = htclose dam Bitblt (cvs.handle, (Width - 38) , 1, 26, 30, IMGClose.canvas.handle, 26, 0, srcopy; end; fin, cvs.handle; cvs.free; end; end; // Title bar mouse left Key to open procedure tform1.wmnclButtonup (var msg: twmnclbutton); begin if msg.hittest =

htminbutton then begin application.Minimize; end else if msg.HitTest = htmaxbutton then begin if windowstate = wsNormal then begin windowstate: = wsMaximized; left: = left 6; top: = top 3; end else if windowstate = wsMaximized then begin windowstate: = wsNormal; end; end else if msg.HitTest = htclose then begin application.Terminate; end else inherited; end; procedure TForm1.wndproc (var message: Tmessage); begin inherited wndproc (message); if message.msg = wm_activate then begin case message.WParamLo of wa_active, wa_clickactive: begin DrawActivate; shuai: = true; end; wa_inactive: begin DrawDeActivate; shuai: = false; end; end; end; if message.msg = wm_ncactivate then begin message.Result: = 1; // Return a fixed value, so as not to flash, go, go to the multi-painted N times;

End; // Tell the news with this, it is best, take the first procedure tform1.wmnchittestest (var msg: twmnchittest); var cpRect: TRECT; / / Define the RECT of the title bar (which is a square area) MinRect: TRECT; / / minimizes Rect MaxRect: TRECT; / / Maximize the Rect Closecture: TRECT; // Close the Rect Pt: TPOINT; / / Mouse Pointer Begin CPRECT: = Rect (36, - GetSystemMetrics (SM_CYMIN) 6, Width - 98, 31); // Setting Rect minRect: = RECT ((Width - 90), -Getsystemmetrics (SM_CYMIN) 1, (Width - 65), -GetsystemMetrics (SM_CYMIN) 29 ); MaxRect: = Rect ((Width - 64), -Getsystemmetrics (SM_CYMIN) 1, (Width - 39), -GetsystemMetrics (SM_CYMIN) 29); Closecture: = Re ((Width - 38), -Getsystemmetrics SM_CYMIN) 1, (Width - 13), -getsystemmetrics (SM_CYMIN) 29); pt.x: = screenToClient (mouse.cursorpos) .x; // mouse x pt.y: = screenToClient (mouse.cursorpos). Y; // y value // Prepare the spoofing system, because the form of the BSNone style is if PtinRect (MinRect, Pt) dam, the IF.Result: = htminButton // tells it to the next button Else if PtinRect (MaxRect, Pt) Then msg.result: = htmaxbutton // Tell it to maximize the button else if PtinRect (CloseRect, Pt) Then msg.Result: = htclose // Tell it in closing button else If PtinRect (CPRECT, PT) THEN MSG.Result: = htcaption // Tell it here in the title bar here else if (pt.x <5) and (pt.y <-getsystemmetrics (SM_CYMIN) 8) Then msg.Result: = httopleft // tells it in the upper left corner else if (pt.x> width - 13) and (pt.y <-getsystemmetrics) Then msg.result: = httopright // tells it in the upper right corner ELSE IF (pt.x> width - 13) and (pt.y>

Height - 5 - GetSystemMetrics (sm_cymin)) THEN msg.result: = htbottomright // Tell it in the lower right corner ELSE IF (Pt.x <5) and (pt.y> height - 5 - getSystemMetrics) The MSG. Result: = htbottomlease tells it in the lower left corner else if (pt.x <5) the msg.result: = htleft // 左 ELSE IF (pt.y <-getsystemmetrics) THEN MSG. Result: = httop // I was above, I won't look up else if (pt.x> width - 9) Then msg.result: = htright // Even the right ELSE IF (Pt.y> Height - 5 - GetSystemMetrics SM_CYMIN)) THEN MSG.Result: = htbottom // 下 中 农 ELSE inherited; {http://www.9cbs.net BOB008 Original 2005-03-14 Double-click the title bar of the message, to simulate crash about procedure TForm1.wmnclbuttondblclk (var msg: TWMNCLButtonDblClk); begin if msg.HitTest = htCaption then if windowstate = wsMaximized then windowstate: = wsNormal else if windowstate = wsNormal then begin windowstate: = wsMaximized; LEFT: = Left 6; TOP: = TOP 3; End; // Title Bar On Mouse Movement Procedure TForm1.Wmncmousemove (VAR Msg: TwmpMouse); VAR DC: HDC; CV: Tcanvas; Begin DC: = getWindowdc (Handle); CV: = Tcanvas .Create; try cv.handle: = dc; with cv do beg, = dc; true dam = = htminButton The Begin Bitblt (Cv.handle, (Width - 90), 1, 26, 30, Imgmin.canvas .handle, 52, 0, srcopy; Else Begin Bitblt (Cv.Handle, (Width - 90), 1, 26, 30, Imgmin.canvas.handle, 0, 0, Srccopy; End; if msg.hittestest =

htmaxbutton then begin if windowstate = wsNormal then begin Bitblt (cv.handle, (width - 64), 1, 26, 30, imgMax.canvas.handle, 52, 0, SRCcopy); end else if windowstate = wsMaximized then begin Bitblt ( Cv.handle, (Width - 64), 1, 26, 30, IMGRESTORE.CANVAS.HANDLE, 52, 0, SRCCOPY; End; Else if windowstate = WSNORMAL THEN BEGIN BITBLT (Cv.handle, (Width - 64) , 1, 26, 30, imgmax.canvas.handle, 0, 0, srccopy; end else ing windowstate = wsmaximized the begin Bitblt (Cv.handle, (Width - 64), 1, 26, 30, IMGRESTORE.cANVAS. Handle, 0, 0, srcopy; end; if msg.hittest = HTClose Then Begin Bitblt (Cv.handle, (Width - 38), 1, 26, 30, ImgClose.canvas.Handle, 52, 0, Srccopy; END ELSE BEGIN Bitblt (Cv.handle, (Width - 38), 1, 26, 30, ImgClose.canvas.Handle, 0, 0, SRCCPY; End; End; Finally ReleaseDC (Handle, Cv.Handle); CV.Free; end; end; // ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------ // What should we do? // The Button makes them to kill them, save them bad things / /, of course, you should do it, do your own things / / ---------------------------------------------------- -------------------------------------------------- ------------ Procedure TFORM1.FORMCREATE (Sender: Tobject); var hsizens: hicon; // good interface with good cursor! HSIZEWE: HICON; HSIZEALL: HICON; HICON; HICON; HICON; HICON; HICON; HiCon; Harrow: hicwriting: hade; hicon; hade; hade; hade; hade; hade: Hicon;

hcross: Hicon; hibeam: Hicon; hhand: Hicon; hup: Hicon; begin hsizens: = loadcursorfromfile ( 'cursors / sizens.ani'); hsizewe: = loadcursorfromfile ( 'cursors / sizewe.ani'); hsizeall: = loadcursorfromfile ( 'cursors / sizeall.cur'); hsizeall1: = loadcursorfromfile ( 'cursors / sizeall1.cur'); hsizenesw: = loadcursorfromfile ( 'cursors / sizenesw.ani'); hsizenwse: = loadcursorfromfile ( 'cursors / sizenwse.ani') ; hwait: = loadcursorfromfile ( 'cursors / wait.ani'); happstart: = loadcursorfromfile ( 'cursors / appstarting.ani'); harrow: = loadcursorfromfile ( 'cursors / arrow.cur'); hhandwriting: = loadcursorfromfile ( 'cursors /Handwriting.ani '; hhelp: = loadingcursorfromfile (' Cursors / Help.ani '); hno: = loadingcursorfromfile (' Cursors / No.Ani '); hcross: = loadingcursorfromfile (' Cursors / Cross.ani '); HiBeam : = loadcursorfromfile ( 'cursors / ibeam.ani'); hhand: = loadcursorfromfile ( 'cursors / hand.ani'); hup: = loadcursorfromfile ( 'cursors / uparrow.ani'); setsystemcursor (harrow, ocr_normal); setsystemcur sor (hsizens, ocr_sizens); setsystemcursor (hsizewe, ocr_sizewe); setsystemcursor (hsizeall, ocr_sizeall); setsystemcursor (hsizeall1, ocr_size); setsystemcursor (hsizenesw, ocr_sizenesw); setsystemcursor (hsizenwse, ocr_sizenwse); setsystemcursor (hwait, ocr_wait); setsystemcursor (happstart, ocr_appstarting); setsystemcursor (hhandwriting, OIC_note); setsystemcursor (hhelp, OCR_ICOCUR); setsystemcursor (hno, ocr_no); setsystemcursor (hcross, ocr_cross); setsystemcursor (hibeam, ocr_ibeam); setsystemcursor (hhand, OCR_HAND); setsystemcursor ( HUP, OCR_UP);

iStyle: = setwindowlong (handle, gwl_style, getwindowlong (handle, gwl_style) and not ws_minimizebox and not ws_maximizebox and not ws_sysmenu); // window style set will have the same SYSMENU CLOSEBUTTON of the // to the SYSMENU also removed, such that no The default button drawn will affect our Application.minimize; // MS does not know how to do it, the state switching message when the form is loaded, wow, more pressing an application.restore; // device scene The amount of memory, everyone New A Project Look at 1 Form 3.2MB

/ / 1.6MB after the minimumization, if the user has always made your software in normal state (no minimization) then then the extra 1.6MB

// The memory will not be released, so we seem to be a work first

END;

Procedure TFORM1.FORMPAINT (Sender: TOBJECT); Begin DrawActiVate; // Doll's end;

Procedure TForm1.FormDestroy (Sender: Tobject); BeginsystemParametersInfo (SPI_SETCURSORS, 0, NIL, SPIF_SENDCHANGE); // Restore system cursor // huh, couple is self-private, do not allow you to use the programs of the mouse pattern END;

End.

转载请注明原文地址:https://www.9cbs.com/read-39866.html

New Post(0)