View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005981 | JEDI VCL | 00 JVCL Components | public | 2012-09-05 13:12 | 2012-09-11 17:07 |
Reporter | moore | Assigned To | |||
Priority | normal | Severity | block | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | ||||
Summary | 0005981: AboutJVCL property form blocks IDE | ||||
Description | Just create a new project, put any JCVL control, and click to see its AboutJVCL property, the IDE is not accesible and there is need to kill bds.exe process and restart. Delphi version is XE2 update4.. | ||||
Tags | No tags attached. | ||||
|
confirm |
2012-09-07 11:59
|
|
|
there were plugins for WinCmd to enable/disable windows... http://wincmd.ru/plugring/tiptop.html http://wincmd.ru/plugring/procfs.html I used ProcFS to scan BDS.exe The window focused on screenshot was disabled. After i re-enabled it, the IDE was normal. Until i launched the About box again Microsoft Spy++ also shows WS_DISABLEd style, but does not allow to undo it |
|
The control flows like that: Design Editor calls JvclAboutComponent.Execute(); JvCommonDialog.Execute() tries few smart tricks to get one if ParentWnd = 0 then ParentWnd := GetForegroundWindow; if ParentWnd = 0 then ParentWnd := GetDesktopWindow; Result := Execute(ParentWnd); Dunno if it succeed the quest or not. This calls function TJvJVCLAboutComponent.Execute(ParentWnd: HWND) And that calls class function TJvJVCLAboutForm.Execute(ParentWnd; false): Which creates and shows the window. with Self.Create(Application) do ParentWindow := ParentWnd; Result := ShowModal = mrOk; |
2012-09-07 12:26
|
jvcl5981exe.rar (1,873,812 bytes) |
2012-09-07 12:26
|
JVCL-0005981-src.ZIP (1,091 bytes) |
|
That looks a bug in stock VCL - now the question is how to workaround it. I propose form's OnShow event. http://qc.embarcadero.com/wc/qcmain.aspx?d=108580 |
|
Fix 0000001: Open TJvJVCLAboutForm and set BorderStyle = bsDialog; Either in DFM or in class function TJvJVCLAboutForm.Execute. That probably was intended mode, lost somewhen. Fix #2: in procedure TJvJVCLAboutForm.FormShow(Sender: TObject); add variable: procedure TJvJVCLAboutForm.FormShow(Sender: TObject); {$IFDEF MSWINDOWS} var VersionInfo: TOSVersionInfoEx; {$IFDEF DelphiXE2_up} H: HWND; // see below, re-enable windows {$EndIf} {$ENDIF MSWINDOWS} begin ... and a loop at the end of procedure: ... {$IFDEF DelphiXE2_up} // http://issuetracker.delphi-jedi.org/view.php?id=5981 // http://qc.embarcadero.com/wc/qcmain.aspx?d=108580 h := Self.Handle; repeat EnableWindow(h, true); h := GetParent(h); until (h = 0); {$ENDIF} end; Also would be nice to add "Position := poOwnerFormCenter" into class function TJvJVCLAboutForm.Execute |
|
PS: Andy, would you revive VCLFix project ? :-) |
|
Didn't EMBT applied all VCLFixPack fixes into the RTL/VCL? I thought they did except for some not so safe fixes. |
|
They probably did not considered this particular usecase I feel they can close that QC108580 "as designed" intending everyone to switch to FMX and drop VCL. At best case, they'd fix it in XE3, but probably we'd skip that version. |
|
moore - would you test the fix and confrim it's working ? |
|
For me this is not a bug. If the form's Parent property is set, the form becomes embedded because it gets the WS_CHILD flag. Your solution with fsDialog only works because the WS_CHILD flag is in conflict with WS_POPUP that is set by fsDialog. What the developer should have done instead is to set the form's PopupParent. Parent und PopupParent are treated differently. The first adds WS_CHILD whereas the later doesn't. |
|
Looks like you're mixing issues. Actually i cannot understand which bug you refer to. JVCL has a bug - it does freeze IDE. The fact that it was not discovered earlier i attibute to the property being almost never used. How to fix it - if your proposal is D7 compatible - you have SVN access and all. VCL i believe also has a bug. Ubiquitous call should not cause total DoS. Twice so when ti is no documented. BTW, TCommonDialog.Execute does neither use Parent nor PopupParent, it uses ParentHWND. Is there D7-compatible PopupParentHWND ? Frankly, i don't remember such properties in D5, but never used D7 so who knows... |
|
I referred to the VCL bug (VCLFixPack). PopupParent was introduced in Delphi 2006. I have now removed the "ParentWindow := ParentWnd" and use the CreateParams.WndParent for that, so that the About dialog will be always above the ParentWnd. That means no WS_CHILD flag for the dialog what it should have been all the time. |
|
Problem solved in daily svn JVCL3-2012-09-11.7z Thnx for a wonderful work and an excellent suite, I just can't live without JVCL :) |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-09-05 13:12 | moore | New Issue | |
2012-09-07 11:49 | Arioch | Note Added: 0020161 | |
2012-09-07 11:59 | Arioch | File Added: jvcl_about_dis.png | |
2012-09-07 12:08 | Arioch | Note Added: 0020162 | |
2012-09-07 12:18 | Arioch | Note Added: 0020163 | |
2012-09-07 12:26 | Arioch | File Added: jvcl5981exe.rar | |
2012-09-07 12:26 | Arioch | File Added: JVCL-0005981-src.ZIP | |
2012-09-07 12:45 | Arioch | Note Added: 0020164 | |
2012-09-07 14:07 | Arioch | Note Added: 0020166 | |
2012-09-07 14:09 | Arioch | Note Edited: 0020166 | |
2012-09-07 14:14 | Arioch | Note Edited: 0020164 | |
2012-09-07 14:26 | Arioch | Status | new => confirmed |
2012-09-07 14:28 | Arioch | Note Added: 0020167 | |
2012-09-07 19:07 | AHUser | Note Added: 0020169 | |
2012-09-07 19:22 | Arioch | Note Added: 0020170 | |
2012-09-07 19:23 | Arioch | Note Added: 0020171 | |
2012-09-08 00:45 | AHUser | Note Added: 0020172 | |
2012-09-08 01:01 | Arioch | Note Added: 0020173 | |
2012-09-08 01:02 | Arioch | Note Edited: 0020173 | |
2012-09-08 12:22 | AHUser | Note Added: 0020174 | |
2012-09-11 16:21 | moore | Note Added: 0020175 | |
2012-09-11 17:07 | Arioch | Status | confirmed => closed |
2012-09-11 17:07 | Arioch | Resolution | open => fixed |