View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001657 | JEDI VCL | 04 Feature Request | public | 2004-04-17 01:30 | 2004-07-22 10:13 |
Reporter | obones | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0001657: Get a new style of appearing for TJvDesktopAlert | ||||
Description | Hi This addressed to everybody, but mostly to Peter as he is the one who created that nice component. As you already know, the fading doesn't work with D5 and C5. Moreover, even if it is compiled in the application, it won't work under windows before Windows 2000. So there is a need for an alternative method of appearing. I got the idea from Panda Antivirus which does the exact same thing, but instead of fading, it appears from the center as a growing rectangle. This is quite easy to do with regions applied to windows. However, I don't really have time to think about the way to implement this nicely, so I just launch the idea in the air, hoping that someone will grasp it <g>. | ||||
Tags | No tags attached. | ||||
|
It should work with D5 as long as the OS supports it (W2k+) Do you have any example code to look at regarding using regions to grow the form? I am thinking that maybe AnimateWindow might be used instead... |
|
This should work under Windows from NT3.51 and 95 up to the latest version. There shouldn't be much to modify for Linux, provided there is a way to apply regions to a window. <code> procedure GrowFromCenter(AForm: TForm; Appear: Boolean=True); var i: Integer; growthSteps: Integer; XGrowth, YGrowth: Integer; RegionRect: TRect; Region: HRGN; AppearFactor: Integer; begin // The number of growth steps should be determined from the // duration of appearing (disappearing) animation growthSteps := 50; // determine the growth rate for X and Y directions XGrowth := AForm.Width div growthSteps; YGrowth := AForm.Height div growthSteps; if Appear then begin RegionRect := TRect(0,0,0,0); AppearFactor := 1; end else begin RegionRect := TRect(0,0,AForm.Width,AForm.Height); AppearFactor := -1; end; for i := 0 to growthSteps-1 do begin Region := CreateRectRgnIndirect(@RegionRect); SetWindowRgn(AForm.Handle, Region, True); // Note: According to the documentation, we don't have to destroy the region // This of course only applies to Windows // Grow the rectangle and keep it centered InflateRect(RegionRect, AppearFactor*XGrowth, AppearFactor*YGrowth); OffsetRect(RegionRect, -AppearFactor*(RegionRect.right-RegionRect.left) div 2, -AppearFactor*(RegionRect.bottom-RegionRect.top) div 2); end; end; </code> edited on: 04-17-04 19:34 |
|
Thanks for the code, I will have a look at implementing this (as well as the MSN method) ASAP |
|
I won't have time to look into this issue, so someone else has to take over. |
|
This is now implemented and in CVS. Please see the comments in changelog.txt at the root of the source tree. |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-04-17 01:30 | obones | New Issue | |
2004-04-17 09:03 |
|
Note Added: 0003921 | |
2004-04-17 19:05 | obones | Note Added: 0003924 | |
2004-04-17 19:34 | obones | Note Edited: 0003924 | |
2004-04-18 01:57 |
|
Note Added: 0003926 | |
2004-04-18 01:57 |
|
Assigned To | => user72 |
2004-04-18 01:57 |
|
Status | new => assigned |
2004-06-25 05:06 |
|
Note Added: 0004630 | |
2004-06-25 05:06 |
|
Assigned To | user72 => |
2004-06-25 05:06 |
|
Status | assigned => acknowledged |
2004-07-05 00:38 | obones | Status | acknowledged => assigned |
2004-07-05 00:38 | obones | Assigned To | => obones |
2004-07-22 10:13 | obones | Status | assigned => resolved |
2004-07-22 10:13 | obones | Resolution | open => fixed |
2004-07-22 10:13 | obones | Note Added: 0004800 |