Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.basic.visual.misc > #436
| From | "Ivar" <ivar.ekstromer000@ntlworld.com> |
|---|---|
| Newsgroups | comp.lang.basic.visual.misc |
| Subject | Strange behavior of user controls |
| Message-ID | <yTMeq.905$vg.316@newsfe29.ams2> (permalink) |
| Organization | virginmedia.com |
| Date | 2011-09-22 21:30 +0100 |
Hi all. I have a weird problem that I will do my best to describe I have written an app on a machine with Winders 7 64 using VB6 service pack 5 The app has two UserControls (Done by me) One is entirely graphical using APIs to do the drawing and one contains a textbox and a shape control Both controls have default properties that are stored as constants in the usercontrol code EG: Private Const m_Def_Caption = "Hello World" When designing a form I put a UserControl on the form and the UserControl shows it's default properties EG: the caption shows "Hello World" Still in the form design window of VB6 I change the properties of the UserControl (As in, put "Have a nice day" in the caption property ) and the control on the form (In the IDE) shows the new property. I run The App in the IDE and the usercontrols displays properly. Caption reads "Have a nice day" I compile the app and all is well with the usercontrol displaying the properties as they should (on the development machine) I install the app on two other machines, both running Winders XP and all usercontrols (both types) show up with their default properties. As in the caption being displayed is "Hello World" instead of "Have a nice day" It seems as if the app is forgetting the properties set at design time I've never seen this before, but this is the first time I have run an app on another machine that I have developed using VB6 on Winders 7 If, for example I put a piece of code in the app such as: Private Sub Form_Activate() MyControl.Caption = "Have a nice Day" End Sub Then the compiled app on the other XP machines will display the correct caption. I've been using these two user controls for years and I have never seen this before Does anybody have any idea why the usercontrols will show with default properties instead of the set properties? Thanks for any replies Ivar
Back to comp.lang.basic.visual.misc | Previous | Next — Next in thread | Find similar
Strange behavior of user controls "Ivar" <ivar.ekstromer000@ntlworld.com> - 2011-09-22 21:30 +0100
Re: Strange behavior of user controls "Nobody" <nobody@nobody.com> - 2011-09-23 16:31 -0400
Re: Strange behavior of user controls "Ivar" <ivar.ekstromer000@ntlworld.com> - 2011-09-23 23:27 +0100
Re: Strange behavior of user controls "Nobody" <nobody@nobody.com> - 2011-09-24 21:08 -0400
csiph-web