|
-
Jun 18th, 2013, 02:53 PM
#1
Thread Starter
New Member
moved from xp to windows 7 problem
Hi I have recently moved from Windows xp to 7. I have some older program that use the AxMSflexgrid. they are not published programs as I only used them locally. However I can no longer open these to work on in the editor as the reference to the flexgrid cannot be found. I can open individual vb.forms (e.g. form1.vb) but cannot open form1.design.vb. as I get this error " Me.Grid2 = New AxMSFlexGridLib.AxMSFlexGrid()" My question is - is it possible to recover these and change the flexgrid to datagridview. rewriting the code as I go along or have I lost these programs?
Any advice would be appreciated
-
Jun 18th, 2013, 04:44 PM
#2
Re: moved from xp to windows 7 problem
I've personally never worked with the ActiveX FlexGrid before, however with that being said I'm sure it's not to difficult to change the flexgrid to a datagridview. Taking a look at the properties of the FlexGrid here, there are some similarities and differences, but for the most part they're very similar.
-
Jun 18th, 2013, 08:45 PM
#3
Re: moved from xp to windows 7 problem
If you can't open the forms in the designer then you obviously can't delete the FlexGrid control(s) in the designer. What you can do is open the designer code file and delete the field referring to the control. In the Solution Explorer, click the Show All Files button at the top. You can then expand the node for your form and it will show the user code field and the designer code file. Double-click the designer code file to open it in the code editor.
You can then find the declaration for the Grid2 field and delete it. That will throw up some more errors where Grid2 is referred to in code, so you'll need to delete those lines as well. Once that's done, you should be able to open your form in the designer, add a DataGridView and then fix any other errors in your own code that still refer to the old FlexGrid.
-
Jun 19th, 2013, 05:16 AM
#4
Thread Starter
New Member
Re: moved from xp to windows 7 problem
Hi Thank you for your reply. Its the fact I can't get to the designer to change them. The next answer from jmcilhinney is what I am looking for (I think !!)
Thanks again for taking the trouble to respond
Mickyfyn
-
Jun 19th, 2013, 05:20 AM
#5
Thread Starter
New Member
Re: moved from xp to windows 7 problem
Hi
Thank you for your prompt reply, I will try what you suggest. I did look at this method but was put off by the fact it said 'Do not modify it using the code editor'.
Should keep me busy for a few nights.
Thank you again
Mickyfyn
-
Jun 19th, 2013, 05:35 AM
#6
Re: moved from xp to windows 7 problem
 Originally Posted by mickyfyn
Hi
Thank you for your prompt reply, I will try what you suggest. I did look at this method but was put off by the fact it said 'Do not modify it using the code editor'.
Should keep me busy for a few nights.
Thank you again
Mickyfyn
Editing designer-generated code by hand should generally be avoided for two reasons:
1. You might do something that will break the designer.
2. Each time you make a change in the designer it will regenerate the code, possibly wiping out your change.
Your designer is already broken though, so this is one of those situations where it's unavoidable. Taking a backup of your project before making any changes would probably be wise though.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|