Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Setting column width with msflexgrid in vb.net

Posted on 2005-04-25
4
Medium Priority
?
1,061 Views
Last Modified: 2008-01-09
Hello,

I set the old vb6 com object MSFlexgrid as a reference in one of my vb.net applications.  However, I've noticed a property that I used to use all the time in vb6 is no longer available.  I used to be able to set the colwidth by doing MSFlexgrid1.ColWidth(column integer goes here) = 1000 etc.....The ColWidth option isn't availble any more even though I am using the same .ocx file that I used to use in vb6.  Any suggestions?

0
Comment
Question by:neo8820
  • 2
4 Comments
 
LVL 5

Expert Comment

by:fadloun
ID: 13861082
hello neo
Check this link it could help :

http://www.developer.com/tech/article.php/10923_1007341_2

Go to [ActiveX Components in .NET]
I don't have .net installed on my PC ,so I couldn't test it
regards
0
 
LVL 11

Expert Comment

by:andrewbleakley
ID: 13899043
MSFlexGrid1.set_ColWidth(1, 1000)

use the object browser to find the "hidden" (actually just renamed) methods - look down under the set_ and get_ methods
0
 
LVL 1

Author Comment

by:neo8820
ID: 13935101
Is there a reason some methods/properties are like this?  I.e. a rule of thumb to help me in the future.
0
 
LVL 11

Accepted Solution

by:
andrewbleakley earned 2000 total points
ID: 13939631
Look up Windows Forms ActiveX Control Importer (Aximp.exe) in MSDN or Google

It seems to have someting to do with either property visibility or naming clashes. To be honest I have really not looked into it in great depth because I came from the C++ school were I got used to accessor functions prefixed with get and set.

Rule of Thumb:
If you cant find it by it's old name look under set_ or get_ the importer will not remove any functionality, just rename some of it.
A better rule of thumb is to move away from ActiveX controls on windows forms and use native controls .
See "Considerations When Hosting an ActiveX Control on a Windows Form" in MSDN for reason why, it makes valid points about file size, security and containment.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question