Discussion:
UpDown Control(s) turns into PictureBox(s)
(too old to reply)
sid
2006-11-22 20:30:37 UTC
Permalink
UpDown Control(s) turns into PictureBox(s)

Has anyone ever seen this and knows the cause, or how to prevent it.
Apparently, the form loaded and could not find the library to load the
updown control from, but why ?
I have the updown control on other forms in the project.

Any help is appreciated.

Sid.
Sinna
2006-11-23 07:15:38 UTC
Permalink
Post by sid
UpDown Control(s) turns into PictureBox(s)
Has anyone ever seen this and knows the cause, or how to prevent it.
Apparently, the form loaded and could not find the library to load the
updown control from, but why ?
I have the updown control on other forms in the project.
Any help is appreciated.
Sid.
That is common behavior when the library containing the UpDown control
cannot be found.
My experience is that VB sometimes scrambles up your project file
(referring to an oca-file instead of the correct ocx-file) causing the
control no longer to be found.
In that case I just shut down VB - without saving the project !!! - and
edit the vbp-file to set it correct manually.

Sinna
sid
2006-11-23 16:06:14 UTC
Permalink
Sinna,

My project has a lot of forms and this has happened on one of my config
forms that I have not looked at for some time. Do you think I am safe
in finding the form in its correct version in one of my backup zips and
swapping it back in ?

Otherwise your advise would have been correct.

Thanks

Sid.
Post by Sinna
Post by sid
UpDown Control(s) turns into PictureBox(s)
Has anyone ever seen this and knows the cause, or how to prevent it.
Apparently, the form loaded and could not find the library to load the
updown control from, but why ?
I have the updown control on other forms in the project.
Any help is appreciated.
Sid.
That is common behavior when the library containing the UpDown control
cannot be found.
My experience is that VB sometimes scrambles up your project file
(referring to an oca-file instead of the correct ocx-file) causing the
control no longer to be found.
In that case I just shut down VB - without saving the project !!! - and
edit the vbp-file to set it correct manually.
Sinna
Sinna
2006-11-24 07:27:12 UTC
Permalink
Post by sid
Sinna,
My project has a lot of forms and this has happened on one of my config
forms that I have not looked at for some time. Do you think I am safe
in finding the form in its correct version in one of my backup zips and
swapping it back in ?
Otherwise your advise would have been correct.
Thanks
Sid.
That's what I do in most cases: restore a backup of the vbp-file. If
nothing has changed in the project (in means of files and settings) it
is safe to do so.
You don't need to go after the form (unless you did save it after the
error occurred) as it should be valid.

Sinna
sid
2006-11-26 18:02:05 UTC
Permalink
Sinna,

Its too late, I did. I use the updown w/textboxes to allow the user to
save settings about 10 times on the config form. All those are now
picture boxes. I am thinking about making a control in the project that
has the textbox with updown attached and then use that control every
time I let the user change a value. This way if I every loose the
updown again, I can just replace it one place. It should save on all
of that "buddycontrol=true, buddyproperty=text, updown jumps on top of
the textbox, updown jumps on top of the wrong textbox and won't get let
go ..."

Do you forsee any issues with using a usercontrol ?

Thanks

Sid.
Post by Sinna
Post by sid
Sinna,
My project has a lot of forms and this has happened on one of my config
forms that I have not looked at for some time. Do you think I am safe
in finding the form in its correct version in one of my backup zips and
swapping it back in ?
Otherwise your advise would have been correct.
Thanks
Sid.
That's what I do in most cases: restore a backup of the vbp-file. If
nothing has changed in the project (in means of files and settings) it
is safe to do so.
You don't need to go after the form (unless you did save it after the
error occurred) as it should be valid.
Sinna
Sinna
2006-11-27 07:18:17 UTC
Permalink
Post by sid
Sinna,
Its too late, I did. I use the updown w/textboxes to allow the user to
save settings about 10 times on the config form. All those are now
picture boxes. I am thinking about making a control in the project that
has the textbox with updown attached and then use that control every
time I let the user change a value. This way if I every loose the
updown again, I can just replace it one place. It should save on all
of that "buddycontrol=true, buddyproperty=text, updown jumps on top of
the textbox, updown jumps on top of the wrong textbox and won't get let
go ..."
Do you forsee any issues with using a usercontrol ?
Thanks
Sid.
I don't think switching to UserControls is really an option to avoid the
behavior you're seeing concerning the UpDown-control, except if the
UserControl(s) you implement are part of the same project. If not part
of the same project, there's also a chance that VB doesn't find the file
containing your ActiveX Controls.

A side-note: why implement the UpDown-control yourself? If it performs
as it should (read: you don't run into some nasty bug) then I should
stay with the UpDown-control. For me it doesn't make sense to re-invent
the wheel unless the existing wheel is too small to fit my needs.

Sinna
sid
2006-11-27 20:12:02 UTC
Permalink
My intent was not to reinvent the control, just create a project
contained user-control and textbox that could be reused. And if it lost
the library, all I have to do is fix it one place, the control.

I was trying to infer that it would be a lot easier to implement as
well.

Sid.
Post by Sinna
Post by sid
Sinna,
Its too late, I did. I use the updown w/textboxes to allow the user to
save settings about 10 times on the config form. All those are now
picture boxes. I am thinking about making a control in the project that
has the textbox with updown attached and then use that control every
time I let the user change a value. This way if I every loose the
updown again, I can just replace it one place. It should save on all
of that "buddycontrol=true, buddyproperty=text, updown jumps on top of
the textbox, updown jumps on top of the wrong textbox and won't get let
go ..."
Do you forsee any issues with using a usercontrol ?
Thanks
Sid.
I don't think switching to UserControls is really an option to avoid the
behavior you're seeing concerning the UpDown-control, except if the
UserControl(s) you implement are part of the same project. If not part
of the same project, there's also a chance that VB doesn't find the file
containing your ActiveX Controls.
A side-note: why implement the UpDown-control yourself? If it performs
as it should (read: you don't run into some nasty bug) then I should
stay with the UpDown-control. For me it doesn't make sense to re-invent
the wheel unless the existing wheel is too small to fit my needs.
Sinna
Sinna
2006-11-28 07:17:40 UTC
Permalink
Post by sid
My intent was not to reinvent the control, just create a project
contained user-control and textbox that could be reused. And if it lost
the library, all I have to do is fix it one place, the control.
I was trying to infer that it would be a lot easier to implement as
well.
Sid.
I don't think I get you right here.
If you think that creating a reusable project with a UserControl and a
TextBox, there's a chance you'll run into the same troubles you've had
already.
Oh... now I see (8 in the morning, still waking up...). You are about to
create a new ActiveX Control containing a UserControl holding the
TextBox and the coupled UpDown Control. Once created you'll replace all
TextBox-UpDown-Control combinations with your control.
For as fas as I can see that's the way to go.
One thing to keep in mind: if your ActiveX Control can't find the UpDown
control either ... This shouldn't be an issue if the ActiveX Control is
not loaded as project in the workspace you're working with.


Sinna
sid
2006-11-28 17:00:07 UTC
Permalink
Sinna,

Can you perform an experiment for me. It appears that on my machine
the the UpDn control does not like to be buddied on the face of a
user-control. I keep getting this message "AutoBuddy not set, no
potential buddy controls found". I deleted both controls and tried it
again, same result. I assume it wants to serach the form.controls for
another control and can't find its host form.

Do I have to manually sink all the events ?

Please let me know what you find.

Thanks

Sid.
Post by Sinna
Post by sid
My intent was not to reinvent the control, just create a project
contained user-control and textbox that could be reused. And if it lost
the library, all I have to do is fix it one place, the control.
I was trying to infer that it would be a lot easier to implement as
well.
Sid.
I don't think I get you right here.
If you think that creating a reusable project with a UserControl and a
TextBox, there's a chance you'll run into the same troubles you've had
already.
Oh... now I see (8 in the morning, still waking up...). You are about to
create a new ActiveX Control containing a UserControl holding the
TextBox and the coupled UpDown Control. Once created you'll replace all
TextBox-UpDown-Control combinations with your control.
For as fas as I can see that's the way to go.
One thing to keep in mind: if your ActiveX Control can't find the UpDown
control either ... This shouldn't be an issue if the ActiveX Control is
not loaded as project in the workspace you're working with.
Sinna
Sinna
2006-11-29 07:13:45 UTC
Permalink
Post by sid
Sinna,
Can you perform an experiment for me. It appears that on my machine
the the UpDn control does not like to be buddied on the face of a
user-control. I keep getting this message "AutoBuddy not set, no
potential buddy controls found". I deleted both controls and tried it
again, same result. I assume it wants to serach the form.controls for
another control and can't find its host form.
Do I have to manually sink all the events ?
Please let me know what you find.
Thanks
Sid.
Oh oh... are you using VB.NET ?
I don't know the property AutoBuddy.

If so, you're asking in the wrong group and I can't help you any
further. Perhaps you can re-ask your question in a newsgroup with vsnet
in its name.


Sinna
sid
2006-11-29 14:49:01 UTC
Permalink
Sorry, in another thread I found a suggested to make sure I am using v6
of the controls library, I was indeed using v5. The user control now
works perfectly.

Thanks

Sid.
Post by Sinna
Post by sid
Sinna,
Can you perform an experiment for me. It appears that on my machine
the the UpDn control does not like to be buddied on the face of a
user-control. I keep getting this message "AutoBuddy not set, no
potential buddy controls found". I deleted both controls and tried it
again, same result. I assume it wants to serach the form.controls for
another control and can't find its host form.
Do I have to manually sink all the events ?
Please let me know what you find.
Thanks
Sid.
Oh oh... are you using VB.NET ?
I don't know the property AutoBuddy.
If so, you're asking in the wrong group and I can't help you any
further. Perhaps you can re-ask your question in a newsgroup with vsnet
in its name.
Sinna
sid
2006-11-30 19:41:01 UTC
Permalink
Another issue, the updown control on the user-control only works on the
first instance of the user control, each additional instance has the
updown control grayed out like has been disabled or did not load
correctly.

Have you seen anything like this ?

Thanks

Sid.
Post by sid
Sorry, in another thread I found a suggested to make sure I am using v6
of the controls library, I was indeed using v5. The user control now
works perfectly.
Thanks
Sid.
Post by Sinna
Post by sid
Sinna,
Can you perform an experiment for me. It appears that on my machine
the the UpDn control does not like to be buddied on the face of a
user-control. I keep getting this message "AutoBuddy not set, no
potential buddy controls found". I deleted both controls and tried it
again, same result. I assume it wants to serach the form.controls for
another control and can't find its host form.
Do I have to manually sink all the events ?
Please let me know what you find.
Thanks
Sid.
Oh oh... are you using VB.NET ?
I don't know the property AutoBuddy.
If so, you're asking in the wrong group and I can't help you any
further. Perhaps you can re-ask your question in a newsgroup with vsnet
in its name.
Sinna
Loading...