|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB6 User Control next problempost. This time, I want to expose the DataFormat and DataSource (and DataField but that's an Extender object and I think I can figure it out). When I try to run the user control, it tells me that a User Defined Type is not defined. My code for DataFormat is below with the "error line" noted. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES! 'MappingInfo=txtDatePicker,txtDatePicker,-1,DataFormat <note - this is the line that errors> Public Property Get DataFormat() As IStdDataFormatDisp </note> Set DataFormat = txtDatePicker.DataFormat End Property Public Property Set DataFormat(ByVal New_DataFormat As IStdDataFormatDisp) Set txtDatePicker.DataFormat = New_DataFormat PropertyChanged "DataFormat" End Property If I comment all this out, I get the same error on the same line (adjusted for the new property, of course) with the DataSource property. Any ideas? d
Show quote
Hide quote
"Darhl Thomason" <darhlt@papamurphys.nospamplease.com> skrev i meddelandet A blind shot from not knowing, is txtDatePicker within scope for accessing?news:%23y6kwwUUHHA.5068@TK2MSFTNGP03.phx.gbl... > I used the ActiveX Control Interface Wizard as Ken H suggested in a previous > post. > > This time, I want to expose the DataFormat and DataSource (and DataField but > that's an Extender object and I think I can figure it out). When I try to > run the user control, it tells me that a User Defined Type is not defined. > My code for DataFormat is below with the "error line" noted. > > 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES! > 'MappingInfo=txtDatePicker,txtDatePicker,-1,DataFormat > <note - this is the line that errors> > Public Property Get DataFormat() As IStdDataFormatDisp > </note> > Set DataFormat = txtDatePicker.DataFormat > End Property > Public Property Set DataFormat(ByVal New_DataFormat As IStdDataFormatDisp) > Set txtDatePicker.DataFormat = New_DataFormat > PropertyChanged "DataFormat" > End Property > > If I comment all this out, I get the same error on the same line (adjusted > for the new property, of course) with the DataSource property. > > Any ideas? > > d > /Henning "Henning" <computer_h***@coldmail.com> wrote in message Yes it is. I can access other properties (like TEXT) from txtDatePicker so news:45d4e307$0$36417$57c3e1d3@news3.bahnhof.se... > > A blind shot from not knowing, is txtDatePicker within scope for > accessing? > > /Henning > I know that part is working. d
Show quote
Hide quote
"Darhl Thomason" <darhlt@papamurphys.nospamplease.com> skrev i meddelandet scope? Else I don't know if it dislikes the DataFormat as the name, it'snews:ubkF7HWUHHA.5108@TK2MSFTNGP06.phx.gbl... > > "Henning" <computer_h***@coldmail.com> wrote in message > news:45d4e307$0$36417$57c3e1d3@news3.bahnhof.se... > > > > A blind shot from not knowing, is txtDatePicker within scope for > > accessing? > > > > /Henning > > > Yes it is. I can access other properties (like TEXT) from txtDatePicker so > I know that part is working. > > d > >Then as I see it, there is just IStdDataFormatDisp left. Is this also in also a property of the DTPicker. /Henning "Henning" <computer_h***@coldmail.com> wrote in message I don't know how to tell if it's "in scope" or not. But I'm getting the news:45d5161f$0$36418$57c3e1d3@news3.bahnhof.se... > >Then as I see it, there is just IStdDataFormatDisp left. Is this also in > scope? Else I don't know if it dislikes the DataFormat as the name, it's > also a property of the DTPicker. > > > /Henning > same error when I try to expose DataSource. d
Show quote
Hide quote
"Darhl Thomason" <darhlt@papamurphys.nospamplease.com> skrev i meddelandet Is IStdDataFormatDisp defined in a .bas module and not Private, or in thenews:O1vSqsfUHHA.1364@TK2MSFTNGP06.phx.gbl... > > "Henning" <computer_h***@coldmail.com> wrote in message > news:45d5161f$0$36418$57c3e1d3@news3.bahnhof.se... > > > >Then as I see it, there is just IStdDataFormatDisp left. Is this also in > > scope? Else I don't know if it dislikes the DataFormat as the name, it's > > also a property of the DTPicker. > > > > > > /Henning > > > I don't know how to tell if it's "in scope" or not. But I'm getting the > same error when I try to expose DataSource. > > d > same form as the Property Get? If defined on a different form you have to access it as WhateverForm.IStdDataFormatDisp. /Henning
Show quote
Hide quote
"Henning" <computer_h***@coldmail.com> wrote in message Sorry for the late reply, I've been traveling for the last couple of weeks news:45d61406$0$36420$57c3e1d3@news3.bahnhof.se... >> > >> I don't know how to tell if it's "in scope" or not. But I'm getting the >> same error when I try to expose DataSource. >> >> d >> > Is IStdDataFormatDisp defined in a .bas module and not Private, or in the > same form as the Property Get? > If defined on a different form you have to access it as > WhateverForm.IStdDataFormatDisp. > > /Henning > > and didn't have time to check the NG. IStdDataFormatDisp is not defined in a .bas module, I'd have to say I didn't know I needed to do that. I assumed (and you know what happens when you assume) that since I was enabling via the wizard it would take care of what needed to be done. So I'll definitely need more explicit help on this i.e. how exactly to define IStdDataFormatDisp and how to "use" it in my user control. Thanks! d
Data Type String
VB6 App Deployment in Vista Problems after installing Visual Basic 6 on XP Professional SP2 OT - MS: $4,000 for Daylight Saving Fix Within a *.exe Looking for a way to call LogOff and Shutdown. Cannot quit Excel called from VB6 Source Control via Network Drive Autologon on Vista Centering a datagrid's column headers |
|||||||||||||||||||||||