A prompt box pops up in the lower right corner of Delphi

Source: Internet
Author: User
Tags domain name registration

Create a prompt box gradually popped up from the bottom right corner of the screen _ Delphi tutorial for netizens CLICK: 0 Western Digital-top 10 national virtual hosts! More than 20 VM management functions, leading the country! The 6th-generation dual-line VM ensures smooth north-south access! Virtual Hosts can be extracted online by rar, and virtual directories can be set for automatic data recovery. VM free access statistics, enterprise post office. CN domain name registration 10 yuan/year, self-built site construction 480 yuan, free trial 7 days, satisfied with the payment! P4 host rent 799 yuan/month. Monthly payment free of pressure! Page number: [1] every product of Microsoft, whether functional or interface design, will bring us some surprises, such as the officexp, office2003, and messenger interface design, it has already become an object that many software are competing to imitate. For messenger, I have seen several sets of online video conferencing software that draw on its interface style. Some time ago, a shortcut prompt form should be added to the original software. This Prompt window must be eye-catching and beautiful when displayed, which will attract user attention and will not affect user operations after display, can be turned off. Naturally, I thought of the message prompt form that gradually popped up from the bottom right corner of the screen. However, I prefer the Color Style of the QQ Olympic edition to the Messenger version. I just want to steal more information, the following shortcut key prompts the final effect of the window: This form has the following features: 1. It is displayed gradually from the lower right corner of the screen; 2. It is a untitled form, however, it must allow users to move and change the size, so the technology of untitled form dragging and size change is required; 3. It is an irregular form, it is mainly in the upper left corner and the upper right corner of the circle, so to create an shape for the form, and the form must be rebuilt when it is changed; 4. Its title and content display area have a gradient, the title has a few tips. You can use a clever method to fill the title directly. Of course, the interface can be stolen, and the Code must be honestly written. below is the interface design diagram and implementation code: interface formpshotkey. FRM content [the content is long. Please click here to open/collapse] object frmpshotkey: tfrmpshotkey left = 192 Top = 107 borderstyle = bsnone caption = shortcut prompt clientheight = 168 clientwidth = 343 color = clwhite constraints. minwidth = 350 font. charset = gb2312_charset font. color = clwindowtext font. height =-12 font. name = fonfont. style = [] formstyle = fsstayontop oldcreateorder = false on Create = formcreate onpaint = formpaint onresize = formresize designsize = (343 168) pixelsperinch = 96 textheight = 12 object imgtitlebar: timage left = 0 Top = 0 width = 343 Height = 12 cursor = crsizeall align = altop autosize = true center = true picture. data = {075400009746d6170ee000000000dee0000000000000000000006e000000280000003900 00000c00000001000400000000008000000120b0000120b00000e0000000e00 0 201710000000088888888888888888888888888888888888888888000bbbb666666666666 6666666666666666666666666666666666666666666660008888777777777777 10944cc44cc44c C44cc44cc44cc44cc44cc44cc44cc44cc400077231c231c231c running 9999999999999999999999999999999999999999999990005035 aaaaaaaaaaaa running bbbbbbbbbbbbbbbbbbbbbbbbbbbbb Required bytes} onmousedown = imgtitlebarmousedown onmousemove = imgtitlebarmousemove end object imgtitlebarbg: timage left = 248 Top = 32 width = 7 Height = 12 autosize = true picture. Data = {required bytes 00b00 00000000222011111110777777705555555066666660999999908888888088888880} visible = false end object imgshapebg: timage left = 280 Top = 48 width = 3 Height = 56 autosize = true picture. Data = {075400009746d6170da000000000dda00000000000000000fa000000280000000300 0000380000000100 080000000000e0000000120b0000120b000030000003100 00000000000000000000ffffffff00fffcfc00fffd00fff9f800fff900fffbfa00fff6 0000000000000000ea00fff3ed00fff5f000fff7f3 00fff9f600fffbf900fffdfc00ffe9dd00ffec 0000000000000000000000002a000808001a1a1a001a1a002b2b2b00 09090900040404000e0e0e000505 limit 030003030300} visible = false end object speedbutton1: tspeedbutton left = 323 Top = 16 width = 14 Height = 14 anchors = [aktop, akright] Flat = true glyph. data = {8a0000000000d8a000000000000000000420000002800000009000000090000000100 04000000000048000000120b0000120b00000300000003000000be604200ffff ff000000000 01111111110000200100111001000111110001000100010011100 0001100010001110001110001100110000011000111010001000100011001001 1100100010001111111110001001} onclick = speedbutton1click end object label1: tlabel left = 16 Top = 24 width = 60 Height = 12 caption = shortcut key prompt font. charset = gb2312_charset font. color = clwindowtext font. height =-12 font. name = fonfont. style = [] parentfont = false transparent = T Rue end object label2: tlabel left = 16 Top = 99 width = 294 Height = 12 caption = A: When the cursor is in the "Number" column, switch the data type to "Step Type" transparent = true end object label3: tlabel left = 16 Top = 118 width = 318 Height = 12 caption = B: When the cursor is in the "Number" column, switch the data type to "process requirement type" transparent = true end object label4: tlabel left = 16 Top = 138 width = 294 Height = 12 caption = C: when the cursor is in the "Number" column, switch the data type to "material type" transparent = true end object label5: T Label left = 16 Top = 42 width = 132 Height = 12 caption = Alt + tip: Open the drop-down list box transparent = true end object label6: tlabel left = 16 Top = 61 width = 108 Height = 12 caption = Ctrl + INS: Insert a row transparent = true end object label7: tlabel left = 16 Top = 80 width = 120 Height = 12 caption = Ctrl + DEL: Delete the current row transparent = true end object label8: tlabel left = 174 Top = 42 width = 138 Height = 12 caption = INS: Open "process name table" transparent = true end object label9: tlabel left = 174 Top = 61 width = 90 Height = 12 caption = F11: insert "℃" transparent = true end object label10: tlabel left = 174 Top = 80 width = 90 Height = 12 caption = F12: Insert "'" transparent = true end object label11: tlabel left = 0 Top = 165 width = 343 Height = 3 cursor = crsizens align = Albottom autosize = false transparent = true onmousedown = Label11mousedown onmousemove = label11mousemove end object label12: tlabel left = 0 Top = 12 width = 3 Height = 153 cursor = crsizewe align = alleft autosize = false transparent = true onmousedown = label12mousedown end object label13: tlabel left = 340 Top = 12 width = 3 Height = 153 cursor = crsizewe align = alright autosize = false transparent = true onmousedown = label13mousedown end code fo Rmpshotkey. PAS content unit formpshotkey; interface uses Windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, extctrls, stdctrls, buttons; {===================================================== ====================================== design: peng Guohui Date: 2004-10-28 site: http://kacarton.yeah.net/blog: http://blog.csdn.net/nhconch Email: [email protected] the original article for the author, please contact me before reprint, reprinted, please indicate the source of the article, retain the author information, thank you Thank you! ========================================================== =====================================} Type tfrmpshotkey = Class (tform) imgtitlebar: timage; frequency: timage; speedbutton1: tspeedbutton; label1: tlabel; label2: tlabel; label3: tlabel; label4: tlabel; label5: tlabel; label6: tlabel; label7: tlabel; label8: tlabel; label9: tlabel; label10: tlabel; label11: tlabel; label12: tlabel; label 13: tlabel; Procedure formpaint (Sender: tobject); procedure invoke (Sender: tobject; button: tmousebutton; shift: tshiftstate; X, Y: integer); Procedure formcreate (Sender: tobject); Procedure speedbutton1click (Sender: tobject); Procedure label11mousedown (Sender: tobject; button: tmousebutton; shift: tshiftstate; X, Y: integer); Procedure formresize (Sender: tobject); Procedure label12m Ousedown (Sender: tobject; button: tmousebutton; shift: tshiftstate; X, Y: integer); Procedure label13mousedown (Sender: tobject; button: tmousebutton; shift: tshiftstate; X, Y: integer); Procedure imgtitlebarmousemove (Sender: tobject; shift: tshiftstate; X, Y: integer); Procedure label11mousemove (Sender: tobject; shift: tshiftstate; X, Y: integer ); private {private Declarations} public {public d Eclarations} end; var frmpshotkey: tfrmpshotkey; implementation {$ R *. DFM} procedure tfrmpshotkey. formcreate (Sender: tobject); begin Tag: = height; Height: = 16; // locate top: = screen. height-40; left: = screen. width-width-2; show; // The while height <tag do begin Height: = height + 5; top: = Top-5; update; application is displayed gradually in the lower right corner of the screen. processmessages; sleep (10); end; Height: = tag; Tag: = 0; colo R: = $ f4ba9d; formresize (sender); end; Procedure tfrmpshotkey. formpaint (Sender: tobject); var I: integer; RGN: hrgn; R: trect; begin with canvas do begin // use imgtitlebarbg to draw the title background for I: = 0 to clientwidth Div imgtitlebarbg. width do draw (I * imgtitlebarbg. width, 0, imgtitlebarbg. picture. bitmap); If tag <> 0 Then exit; // if the form is in the pop-up status, do not draw the content panel background // draw the content panel background setrect (R, 5, 15, width-5, height-5); stretchdraw (R, I Mgshapebg. picture. bitmap); pen. color: = $ c97f55; brush. style: = bsclear; roundrect (R. left, R. top, R. right, R. bottom, 6, 6); // draw the form border RGN: = createrectrgn (0, 0, 0); getjavaswrgn (self. handle, RGN); brush. color: = $ be796b; windows. framergn (handle, RGN, brush. handle, 2, 2); deleteobject (RGN); end; Procedure tfrmpshotkey. imgtitlebarmousedown (Sender: tobject; button: tmousebutton; shift: tshiftstat E; X, Y: integer); begin // when you press the mouse button in the title, you can move the form or change the size of the form. If x <5 then perform (wm_syscommand, $ f004, 0) else if x> width-5 then perform (wm_syscommand, $ f005, 0) else if y <3 then perform (wm_syscommand, $ f003, 0) else perform (wm_syscommand, $ f012, 0); end; Procedure tfrmpshotkey. formresize (Sender: tobject); var RGN, rgn2: hrgn; begin if tag <> 0 Then exit; // rebuild RGN: = createro when the form is changed Undrectrgn (0, 0, width + 1, height, 4, 4); rgn2: = createrectrgn (0, 11, width, height); combinergn (RGN, RGN, rgn2, rgn_or); setjavaswrgn (handle, RGN, true); deleteobject (RGN); deleteobject (rgn2); invalidate; end; Procedure tfrmpshotkey. speedbutton1click (Sender: tobject); begin close; end; // The following labels are used to change the form size: Procedure tfrmpshotkey. label11mousedown (Sender: tobject; button: tmousebutton; shift: tshift State; X, Y: integer); begin releasecapture; if x <5 then perform (wm_syscommand, $ f007, 0) else if x> width-5 then perform (wm_syscommand, $ f008, 0) else perform (wm_syscommand, $ f006, 0); end; Procedure tfrmpshotkey. label12mousedown (Sender: tobject; button: tmousebutton; shift: tshiftstate; X, Y: integer); begin releasecapture; perform (wm_syscommand, $ f001, 0); end; Procedure tfrmpshotkey. label 13 mousedown (Sender: tobject; button: tmousebutton; shift: tshiftstate; X, Y: integer); begin releasecapture; perform (wm_syscommand, $ f002, 0); end; // The following Code determines the cursor position and changes the cursor, prompting you to drag the form or change the size of procedure tfrmpshotkey. imgtitlebarmousemove (Sender: tobject; shift: tshiftstate; X, Y: integer); begin if x <5 then imgtitlebar. cursor: = crsizenwse else if x> width-5 then imgtitlebar. cursor: = crsizenesw els E if y <3 then imgtitlebar. cursor: = crsizens else imgtitlebar. cursor: = crsizeall; end; Procedure tfrmpshotkey. label11mousemove (Sender: tobject; shift: tshiftstate; X, Y: integer); begin if x <5 then label11.cursor: = crsizenesw else if x> width-5 then label11.cursor: = crsizenwse else label11.cursor: = crsizens; end. article: Western Digital-professional domain name registration, virtual host service http://www.west263.com and the above information is an integral part of the article, If you want to reprint this article, please keep the above information. Thank you!

A prompt box pops up in the lower right corner of Delphi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.