Re: Form load errors
- From: "Steve Barnett" <noname@xxxxxxxxxxxx>
- Date: Fri, 10 Aug 2007 14:15:17 +0100
"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
.
- Follow-Ups:
- Re: Form load errors
- From: Larry Serflaten
- Re: Form load errors
- References:
- Form load errors
- From: Steve Barnett
- Re: Form load errors
- From: Ken Halter
- Re: Form load errors
- From: Steve Barnett
- Re: Form load errors
- From: Rick Rothstein \(MVP - VB\)
- Re: Form load errors
- From: Steve Barnett
- Re: Form load errors
- From: Jan Hyde (VB MVP)
- Form load errors
- Prev by Date: Re: Convert Negative Long in to UInt64
- Next by Date: Re: Upgrade via VB6???
- Previous by thread: Re: Form load errors
- Next by thread: Re: Form load errors
- Index(es):
Relevant Pages
|