|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Parse and preserve an object in a classHi,
I am deliberately avoiding using an Modules in my app. Instead, I am using Classes. Is there a way to save a <form>.<object> to a Class from one Form so that the result can be used in another? For example, I have a MaskEdit for Date input. When the user selects a command button, the Calendar appears. The user selects the date he/she wants. The calendar disappears and the resulting date is displayed in the MaskEdit control. I need to hold the Form name and MaskEdit so that the Calendar double click transfers the correct date to it. Thank you. Tony No ......... now don't be lazy <g>
Show quoteHide quote "Tony" <speedil***@hotmail.com> wrote in message news:efIXITmZFHA.3364@TK2MSFTNGP09.phx.gbl... > Hi, > > I am deliberately avoiding using an Modules in my app. Instead, I am > using Classes. Is there a way to save a <form>.<object> to a Class from one > Form so that the result can be used in another? > > For example, I have a MaskEdit for Date input. When the user selects a > command button, the Calendar appears. The user selects the date he/she > wants. The calendar disappears and the resulting date is displayed in the > MaskEdit control. I need to hold the Form name and MaskEdit so that the > Calendar double click transfers the correct date to it. > > Thank you. > > Tony > > "Tony" <speedil***@hotmail.com> wrote And if you deliberately type using only one finger, then it will take you a lot> I am deliberately avoiding using an Modules in my app. Instead, I am > using Classes. longer to get done. That's just great if you get paid by the hour, but if you want to get the job done, then you might want to re-think your plans.... <g> LFS On Wed, 1 Jun 2005 10:54:10 -0500, "Larry Serflaten"
<serfla***@usinternet.com> wrote: > Actually Larry, using Classes can save quite a lot of time in the long>"Tony" <speedil***@hotmail.com> wrote > >> I am deliberately avoiding using an Modules in my app. Instead, I am >> using Classes. > >And if you deliberately type using only one finger, then it will take you a lot >longer to get done. That's just great if you get paid by the hour, but if you >want to get the job done, then you might want to re-think your plans.... run In this case I do not quite understand what the OP wants to do, but my hunch is that he should be using RaiseEvent to return the date. "J French" <erew***@nowhere.uk> wrote in I'd be one of the first to look to classes, but....> >> I am deliberately avoiding using an Modules in my app. Instead, I am > >> using Classes. > > <...> > > Actually Larry, using Classes can save quite a lot of time in the long > run They don't hold all the answers. When you need a global variable then there really is no reason to try to solve the problem with classes. Even if you create a class of global variables, where would you declare it to have application wide scope? > In this case I do not quite understand what the OP wants to do, but my I didn't look to close at the specifics either, since he stated a generic> hunch is that he should be using RaiseEvent to return the date. version in the first couple lines. But, looking back it look like he wants to turn his calender form into a UserInput form such that it will return the selected date. For that I'd call a function on the calander form that returns the date: Text1.Text = UserDate.GetDate() That way the calander form doesn't need to know who's calling it, or how to expose the date after its been selected. It returns the date from a function that shows the form and gets the desired input. The caller is blocked until the user dismisses the form.... LFS On Thu, 2 Jun 2005 07:42:29 -0500, "Larry Serflaten"
<serfla***@usinternet.com> wrote: Show quoteHide quote > Well, generally in MainMod.bas>"J French" <erew***@nowhere.uk> wrote in > >> >> I am deliberately avoiding using an Modules in my app. Instead, I am >> >> using Classes. >> > ><...> >> >> Actually Larry, using Classes can save quite a lot of time in the long >> run >I'd be one of the first to look to classes, but.... >They don't hold all the answers. When you need a global variable then >there really is no reason to try to solve the problem with classes. Even >if you create a class of global variables, where would you declare it >to have application wide scope? - it would start life off as a UDT Show quoteHide quote >> In this case I do not quite understand what the OP wants to do, but my I agree, but I suspect that he has somehow created the calendar>> hunch is that he should be using RaiseEvent to return the date. >I didn't look to close at the specifics either, since he stated a generic >version in the first couple lines. But, looking back it look like he wants >to turn his calender form into a UserInput form such that it will return >the selected date. For that I'd call a function on the calander form >that returns the date: > Text1.Text = UserDate.GetDate() >That way the calander form doesn't need to know who's calling it, or >how to expose the date after its been selected. It returns the date from >a function that shows the form and gets the desired input. The >caller is blocked until the user dismisses the form.... control on the fly (perhaps some sort of Dialog) The real thing I like about shoving stuff into Classes is that they (their contents) are not visible unless one decides to let them be visible. Using RaiseEvent to update a number of 'parents' is also blissful 'Parents should know very little about their children, and children should know /nothing/ about their parents'. Heh - he'll have problems distributing the Calendar Control ...
Creating a DLL and calling it from an app
How to calculate this? Sudden automation error with MS XML object Runtime error 53 memory leak ? SP5 to SP6: To update or not? Setting Label zorder above picture control Common dialog control App Protection How do I deploy a VB6 program to folder whose filename has spaces? |
|||||||||||||||||||||||