For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > January 2006 > Help - What is the best approach?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Help - What is the best approach?
Lisa

2006-01-28, 7:55 am

Hi there. I have 2 separate applications right now, one that contains a grid
and the other contains a browser component. What I want to do is replace
both apps with just one that displays either the browser or the grid
depending on a setting.

My major problem is that I did not want to merge the functionality of both
applications into one but keep them separate. I was thinking about building
2 separate ActiveX controls, to replace each application, but I've never
built one and unsure as to whether this is the best approach.

Can anyone give me some options?

Thanks in advance.


MikeD

2006-01-28, 6:55 pm


"Lisa" <rforde48@hotmail.com> wrote in message
news:11tmpt6o7ipgh68@corp.supernews.com...
> Hi there. I have 2 separate applications right now, one that contains a
> grid
> and the other contains a browser component. What I want to do is replace
> both apps with just one that displays either the browser or the grid
> depending on a setting.
>
> My major problem is that I did not want to merge the functionality of both
> applications into one but keep them separate. I was thinking about
> building
> 2 separate ActiveX controls, to replace each application, but I've never
> built one and unsure as to whether this is the best approach.
>
> Can anyone give me some options?



If you don't want to "merge the functionality", then why are you re-writing
both apps into 1? That doesn't make any sense to me.

--
Mike
Microsoft MVP Visual Basic


Lisa

2006-01-28, 6:55 pm

Hi Mike. What I meant to say was that I did not want to take all of the code
from both applications (forms), which controls either the grid or browser,
and lump them into one form.

I guess what I want to do is just have 2 objects , or something...not sure
what else, representing either the grid or browser with all properties,
behaviour etc and just have to position them on a form in the new
application.

Thanks

"MikeD" <nobody@nowhere.edu> wrote in message
news:ur45gaBJGHA.1676@TK2MSFTNGP09.phx.gbl...
>
> "Lisa" <rforde48@hotmail.com> wrote in message
> news:11tmpt6o7ipgh68@corp.supernews.com...
both[color=darkred]
>
>
> If you don't want to "merge the functionality", then why are you

re-writing
> both apps into 1? That doesn't make any sense to me.
>
> --
> Mike
> Microsoft MVP Visual Basic
>
>



MikeD

2006-01-28, 6:55 pm


"Lisa" <rforde48@hotmail.com> wrote in message
news:11tn73ka8rpqd51@corp.supernews.com...
> Hi Mike. What I meant to say was that I did not want to take all of the
> code
> from both applications (forms), which controls either the grid or browser,
> and lump them into one form.
>
> I guess what I want to do is just have 2 objects , or something...not sure
> what else, representing either the grid or browser with all properties,
> behaviour etc and just have to position them on a form in the new
> application.



Well, I still don't fully understand your reasoning, but I suppose two
ActiveX controls would be the way to go.

--
Mike
Microsoft MVP Visual Basic


Ralph

2006-01-29, 6:55 pm


"Lisa" <rforde48@hotmail.com> wrote in message
news:11tmpt6o7ipgh68@corp.supernews.com...
> Hi there. I have 2 separate applications right now, one that contains a

grid
> and the other contains a browser component. What I want to do is replace
> both apps with just one that displays either the browser or the grid
> depending on a setting.
>
> My major problem is that I did not want to merge the functionality of both
> applications into one but keep them separate. I was thinking about

building
> 2 separate ActiveX controls, to replace each application, but I've never
> built one and unsure as to whether this is the best approach.
>
> Can anyone give me some options?
>
> Thanks in advance.
>


Another approach is to create a "code behind" class (object) for each
control and pass a control reference to its respective class. Declare the
reference in each class WithEvents and thus capture all events from the
control. You may also want the classes to define its own Event Interface.
You can use these classes within your project where ever and when ever you
need packaged behavior for their respective control.

This is an ideal OO solution as it further separates 'code' from
'presentation', but highly dependent on your service level requirements and
VBc idiosyncrasies. (ie, not necessarily a practical solution)

-ralph


Larry Serflaten

2006-01-29, 6:55 pm


"Lisa" <rforde48@hotmail.com> wrote in
> I guess what I want to do is just have 2 objects , or something...not sure
> what else, representing either the grid or browser with all properties,
> behaviour etc and just have to position them on a form in the new
> application.


Just to offer yet another means to an end, you might go the route of the
early Netscape Navigator application. Have a button on each that
simply hides itself and launches the other form?

LFS


Lisa

2006-01-30, 7:55 am

Thanks for the suggestions. Since I'm still not very good at VB, the one
thing I love about this newsgroup is that it sends me to do research.


"Lisa" <rforde48@hotmail.com> wrote in message
news:11tmpt6o7ipgh68@corp.supernews.com...
> Hi there. I have 2 separate applications right now, one that contains a

grid
> and the other contains a browser component. What I want to do is replace
> both apps with just one that displays either the browser or the grid
> depending on a setting.
>
> My major problem is that I did not want to merge the functionality of both
> applications into one but keep them separate. I was thinking about

building
> 2 separate ActiveX controls, to replace each application, but I've never
> built one and unsure as to whether this is the best approach.
>
> Can anyone give me some options?
>
> Thanks in advance.
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com