By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,312 Members | 1,248 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,312 IT Pros & Developers. It's quick & easy.

Another .Net question..using the MSFlexGrid

P: n/a
Hello all..thanks for everyone's advice regarding my SHBrowseForFolder
API problem, I was able to put together a public class that runs
great! But I have another migration headache regarding the MSFlexGrid.

I have been able to successfully add a COM object MSFlexGrid in my
VB.Net project. I can successfully populate and manipulate the grid.
But, I have two problems, that I used to be able to do with no issues
in VB 6.

1) AutoSizing the grid at run-time. I have a function that auto sizes
the Grid at run-time. However, this grid implements the old
Form1.TextHeight() and TextWidth() properties of VB 6. .Net does not
have this property. I have tried using the graphics class but I can't
get what I need. What I need to be able to do is something like this
(in VB, it would be like this:)

lRHeight = lRHeight + Form1.TextHeight("xx" /5)

Basically, how can I get the textHeight of a standard string and
manipulate it so I can auto size my MSFlexGrid, has anyone had any
success auto sizing a MSFlexGrid in .Net?

2) Printing the MSFlexGrid. I REALLY need the ability to print out my
MSFlexGrid. Does anyone know of a way to do this in .Net. Even if it
is a graphics method of simply taking the FlexGrid and printing it out
to the standard printer object (even if I lose the grid lines)..I have
a class module in VB that does the trick, but this is completely
incompatible in .Net

If anyone has had success printing out a MSFlexGrid or auto sizing
MSFlexGrid columns, I would be grateful for any insight. Thanks in
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.