Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / November 2005



Tip: Looking for answers? Try searching our database.

Passing MSHFlexGrid to ActiveX exe

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 03 Nov 2005 13:16 GMT
I am attempting to pass a MSHFlexgrid, complete with all formatting to an
ActiveX exe.
It would appear that I have to pass it as an Object, as VB throws a
compilation error if I try to use MSHFlexGrid in the parameters. This would
appear to work OK, and I can even assign it within the ActiveX exe to a
MSHFlexGrid variable. However, I cannot then assign this variable to a
MSHFlexGrid control that is held on one of the ActiveX Exe's forms. I can
iterate through the MSHFlexGrid variable and move the values of all
textMatrix entries to the grid on the form, but this omits all of the
formatting that existed within the original grid.

How can effectively pass a 'clone' of the MSHFlexGrid from the orinal code
into my ActiveX Exe so they resultant grid looks identival to the original?

Thanks for your assistance,

Steve.
Norm Cook - 03 Nov 2005 14:08 GMT
From a post by Jeff Johnson:

"You have posted this question individually to
multiple groups. This is called Multiposting
and it's BAD. Replies made in one group will
not be visible in the other groups, which
may cause multiple people to respond to your
question with the same answer because they
didn't know someone else had already done it.
This is a waste of time.

If you MUST post your message to multiple
groups, post a single message and select all
the groups (or type their names manually,
separated by commas) in which you want it to
be seen. This is called Crossposting and when
used properly it is GOOD."

> I am attempting to pass a MSHFlexgrid, complete with all formatting to an
> ActiveX exe.
[quoted text clipped - 13 lines]
>
> Steve.
Ken Halter - 03 Nov 2005 21:55 GMT
>I am attempting to pass a MSHFlexgrid, complete with all formatting to an
> ActiveX exe.

After reading the following article, I've given up trying to pass controls
around.

PRB: Passing ActiveX Control to Component Gives "Type Mismatch" Error
Message
http://support.microsoft.com/default.aspx?scid=kb;en-us;190210

If you have, or grab a copy of, Matt Curland's Advanced Visual Basic 6 (link
below), he includes an addin that'll get rid of the core problem... that
problem is, as the article above states, when you pass a control, you're
actually passing VBs wrapper for that control (the extender object) and
that's where the problems start. His addin, gets rid of that problem
nicely... as a benefit, you may notice a vast difference in that grids
performance (the performance increase is different for each type of control
so ymmv)

Advanced Visual Basic 6: Power Techniques for Everyday Programs
http://www.amazon.com/gp/product/0201707128/002-0664696-4168844?v=glance&n=28315
5&v=glance


If you grab a used copy, don't even touch it if it doesn't include the CD.

Signature

Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..

Steve - 16 Nov 2005 15:37 GMT
Thanks forn the assistance Ken. For now I've just passed the data through as
a table and effectively reconstructed the grid within the ActiveX Exe -
laborious but it worked. That book isn't within my collection so I may well
have a look at it.

Regards,

Steve.

> >I am attempting to pass a MSHFlexgrid, complete with all formatting to an
> > ActiveX exe.
[quoted text clipped - 19 lines]
>
> If you grab a used copy, don't even touch it if it doesn't include the CD.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.