Re: The window does not have scroll bars..



I've seem to have solved my problem in this completely lame way:

Just making a wrap around function for createform in which creating the form is tried until it
succeeds (with a max of 20). Unsucessfull attempts are still logged for me to see but the customer
is spared this silly error.
The problems still shows up once a day, everytime the second attempt is succesfull at once and no
residue problems seem to be present..




procedure HCreateform(Formclass : TFormClass; var reference);
var
succes : boolean;
i : integer;
begin
i := 0;
succes := false;
while not succes do begin
inc(i);
try
application.createform(Formclass,reference);
succes := true;
except
on e:exception do handlederror('fout creëeren form ' + inttostr(i),e,false);
end;
if not succes then freeandnil(tobject(reference));
if i > 20 then begin
foutbox('fout venstercreatie, sluit en herstart Veterin');
break;
end;
end;
end;


On Wed, 19 Oct 2005 20:54:25 +0200, Hans Heintz <NOSPAMhh_000001@xxxxxxxxx> wrote:

>D4/win-xp-pro
>
>Since a month or so the workplace that beta-tests my program almost once every day experiences an
>error
>
>'The window does not have scroll bars..'
>.
>
>It occurs at every workstation and with creation of all different forms. It seems completely random.
>The comlete error message is listed below.
>The error might suggest a resource problem or handle problem. First i thought these type of errors
>should be rare in winxppro. Second running my program through memproof doesn't suggest leakage of
>any pointer. Third I am very careful to freeandnil anything i create.
>
>Also I 'd like to know how I could measure resource usage in windows-xp.
>
>I've browsed newsgroup histories for this problem but found nothing usefull.
>Since all forms seems to be able to get affected it must be some kind of general problem, but what?
>Can you have too many components on your forms? Can your program be too big?
>How can I find a solution to this?
>
>
>========================================================================
>The message:
>The last line being the line in my code where a form is created - varies depending on the form.
>
>
>exception class : EOutOfResources
>exception message : The window does not have scroll bars..
>
>main thread ($374):
>00442d8c pveterin.exe Graphics 2524 GDIError
>00463920 pveterin.exe Controls 5397 TWinControl.CreateHandle
>004671dc pveterin.exe Controls 7039 TWinControl.HandleNeeded
>004671f4 pveterin.exe Controls 7045 TWinControl.GetHandle
>00466f52 pveterin.exe Controls 6938 TWinControl.GetDeviceContext
>0045da87 pveterin.exe Controls 2697 TControlCanvas.CreateHandle
>00442933 pveterin.exe Graphics 2351 TCanvas.RequiredState
>004424d8 pveterin.exe Graphics 2213 TCanvas.TextExtent
>00442555 pveterin.exe Graphics 2226 TCanvas.TextHeight
>0047aeba pveterin.exe Forms 2616 TCustomForm.GetTextHeight
>0047abf1 pveterin.exe Forms 2558 TCustomForm.ReadState
>004358b9 pveterin.exe Classes 1717 TList.Add
>0043b649 pveterin.exe Classes 4756 TReader.ReadRootComponent
>00438d23 pveterin.exe Classes 3384 TStream.ReadComponent
>0043543e pveterin.exe Classes 1487 InternalReadComponentRes
>00435624 pveterin.exe Classes 1532 InitComponent
>00435694 pveterin.exe Classes 1541 InitInheritedComponent
>0047a4af pveterin.exe Forms 2401 TCustomForm.Create
>0048312c pveterin.exe Forms 6487 TApplication.CreateForm
>00591942 pveterin.exe UBehandelForm 670 TBehandelForm.Verwerkregels
.



Relevant Pages

  • The window does not have scroll bars..
    ... The window does not have scroll bars.. ... 00442d8c pveterin.exe Graphics 2524 GDIError ... 004671dc pveterin.exe Controls 7039 TWinControl.HandleNeeded ...
    (alt.comp.lang.borland-delphi)
  • Re: Scrolling window with child controls
    ... || I am aware of implementing the scroll if the window has some graphic ... in which case I can write the section of graphics objects into the ... | Why don't you just move the controls to the position you're currently ...
    (microsoft.public.win32.programmer.ui)
  • Windows.Forms.Timer does not fire
    ... On this panel I ... Graphics class. ... DataGridView, and a TabControl and a Splitter, between those controls and my ... If I now change the size of my Window in the running application, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Tomb Raider Legend Demo - and System Requirments!!!
    ... I doubt there is anyone who wants this game to work well more than I do. ... graphics and great gameplay do not necessarily go together... ... My one gripe so far is the camera and your key controls. ...
    (comp.sys.ibm.pc.games.action)
  • RE: What is the fastest method to switch picture files to produce animation
    ... Use image controls instead of picture box controls. ... Hide controls when setting properties to avoid multiple repaints. ... Unless you are using graphics methods, you ...
    (microsoft.public.vb.general.discussion)