Re: Form load errors

Tech-Archive recommends: Fix windows errors by optimizing your registry




"Jan Hyde (VB MVP)" <StellaDrinker@xxxxxxxxxxxxxxxxxxx> wrote in message
news:nq6ob31oq45k3f5kujcg2ad8ifch14bj5n@xxxxxxxxxx
"Steve Barnett" <noname@xxxxxxxxxxxx>'s wild thoughts were
released on Fri, 10 Aug 2007 08:00:42 +0100 bearing the
following fruit:


"Rick Rothstein (MVP - VB)" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx> wrote in
message news:ubXYoWq2HHA.2752@xxxxxxxxxxxxxxxxxxxxxxx
Not sure what's happened here, but I've started getting form load
errors when I open one of my forms in a large-ish project. I've never
had these errors before anywhere in the project. When I look at the
log, I see:

Line 156: Property Left in tbPreview could not be set.
Line 156: Property Width in tbPreview could not be set.


Do you have a backup copy of that form? If not, and you "keep saving
it", you've lost that toolbar (obviously). It's now a picturebox.

Just open a "good" form in notepad and compare the "Object=" line to
that "bad" form. If they don't match, copy the "good" declaration and
pasted it over the "bad" declaration.

fwiw, you don't need to set Top/Left for it to fail. The control
itself
needs to know where it is on the form, so those errors are probably
coming from the control itself (or the fact that the declaration's no
longer valid)

That's the thing, the toolbar is there and it fully functional. There's
nothing wrong with it, all the icons are there and it continues to work
without error.

While I don't think this is your problem, let's give it a "what the
hell"
try anyway.<g>

Go to Project/Reference in VB's menu and see if anything is marked as
"Missing" (or marked in any other way) and, if so, either check or
uncheck
(as appropriate) any item so marked.

Rick

Nothing missing.

Even stranger - I would have expected to see the error when I displayed
the
form in the designer. I don't, I get the error when I run the code.

I think I'll go back to a backup copy of the form and copy/paste the
changed
code, just in case there's a corruption in the frx file.


You can't set the left and top for a docked toolbar. If your
doing this in code you will get an error. This would explain
any error during run time. However your OP states it occurs
when opening the project and this would not be affected by
your code so there must be something else going on.


--
Jan Hyde

https://mvp.support.microsoft.com/profile/Jan.Hyde

I've done a find throughout the whole project and don't set the left or
width of this control anywhere. I would also have expected it to throw an
error in the code rather than the IDE giving me a "load errors" message.

I've gone back to a previous version of this code and it loads and works
fine. Since that version, the only thing I've added is a timer control and
the code to handle it.

Very strange.

Steve


.



Relevant Pages

  • Ultimate Page Control SuiteT for Borland DelphiT
    ... ADVANCE Information Systems is proud to announce its Ultimate Page Control ... and from an innovative navigation ... feature multiple wrapping, paged toolbar regions, and integral paged related ...
    (alt.comp.lang.borland-delphi)
  • Ultimate Page Control SuiteT for Borland DelphiT
    ... ADVANCE Information Systems is proud to announce its Ultimate Page Control ... and from an innovative navigation ... feature multiple wrapping, paged toolbar regions, and integral paged related ...
    (comp.lang.pascal.delphi.components.misc)
  • Ultimate Page Control SuiteT for Borland DelphiT
    ... ADVANCE Information Systems is proud to announce its Ultimate Page Control ... and from an innovative navigation ... feature multiple wrapping, paged toolbar regions, and integral paged related ...
    (comp.lang.pascal.delphi.advocacy)
  • Re: ColorIndex of the current application
    ... I'll leave the SendMessage idea for you but I had a quick go with GetPixel, ... can get the pixel directly from the desktop. ... simple but of course will only work if the fill control is visible on the ... toolbar window, which if it works, does not require the control to be ...
    (microsoft.public.excel.programming)
  • Re: RTF Control not displaying data
    ... Are you able to use the Form in the sample MDB you downloaded from the RTF2 ... I said the standard Access Toolbar which refers to the sample Access Toolbar ... the RTF2 control didn't show me highlighted text when I first added ... Is using/loading the RTF toolbar the only way to allow the user to ...
    (microsoft.public.access.forms)