Converting Access Forms to WinForms or WPF
-
First question. (Please don't hit me just because I'm stupid.) :sigh: I have a short-deadline (90-day) assignment to convert an almost-working Access 2000 application to C#.net. The application has fifty forms, covered with fiddly little fields that have to be precisely aligned. I am relatively inexperienced in C# .Net development, but I have learned the basics, and have completed several applications of a complexity similar to this assignment. The job is easily achievable within the time limit if the forms don't have to be drawn, but for me to draw them to an acceptable quality will take at least 90% of the time available for the project. Plumbing the code behind the forms holds little terror for me, and can be done easily within the time limit. Here's the question: Does anyone know of existing software (Codeproject article, other article, commercial software, shareware) that can convert MSAccess 2000 forms to the Visual Studio .Net environment? Retaining the names of the objects would be nice, but not necessary, all I really need is the wireframes of the forms with the objects in their prior spatial arrangement. The development platform is XP. Searching the web, EvolutionOne seemed to offer hope that I could do a three-cornered MSAccess>VB.Net>C#.Net kludge, but drilling down to their demo software found their website hollow. Looks like they died about 2002. My bosses are willing to spend up to about 500 (US$)for a product that can do this with a short learning curve. Particularly when faced with the costs of hiring a squad of temporary mouse-wranglers to draw the hateful forms within the time allotted. Any sensible suggestions will be regarded with gratitude.
"To do is to be." [Descartes] "To be is to do." [Voltaire] "Do be do be do..."[Frank Sinatra]
-
First question. (Please don't hit me just because I'm stupid.) :sigh: I have a short-deadline (90-day) assignment to convert an almost-working Access 2000 application to C#.net. The application has fifty forms, covered with fiddly little fields that have to be precisely aligned. I am relatively inexperienced in C# .Net development, but I have learned the basics, and have completed several applications of a complexity similar to this assignment. The job is easily achievable within the time limit if the forms don't have to be drawn, but for me to draw them to an acceptable quality will take at least 90% of the time available for the project. Plumbing the code behind the forms holds little terror for me, and can be done easily within the time limit. Here's the question: Does anyone know of existing software (Codeproject article, other article, commercial software, shareware) that can convert MSAccess 2000 forms to the Visual Studio .Net environment? Retaining the names of the objects would be nice, but not necessary, all I really need is the wireframes of the forms with the objects in their prior spatial arrangement. The development platform is XP. Searching the web, EvolutionOne seemed to offer hope that I could do a three-cornered MSAccess>VB.Net>C#.Net kludge, but drilling down to their demo software found their website hollow. Looks like they died about 2002. My bosses are willing to spend up to about 500 (US$)for a product that can do this with a short learning curve. Particularly when faced with the costs of hiring a squad of temporary mouse-wranglers to draw the hateful forms within the time allotted. Any sensible suggestions will be regarded with gratitude.
"To do is to be." [Descartes] "To be is to do." [Voltaire] "Do be do be do..."[Frank Sinatra]
-
First question. (Please don't hit me just because I'm stupid.) :sigh: I have a short-deadline (90-day) assignment to convert an almost-working Access 2000 application to C#.net. The application has fifty forms, covered with fiddly little fields that have to be precisely aligned. I am relatively inexperienced in C# .Net development, but I have learned the basics, and have completed several applications of a complexity similar to this assignment. The job is easily achievable within the time limit if the forms don't have to be drawn, but for me to draw them to an acceptable quality will take at least 90% of the time available for the project. Plumbing the code behind the forms holds little terror for me, and can be done easily within the time limit. Here's the question: Does anyone know of existing software (Codeproject article, other article, commercial software, shareware) that can convert MSAccess 2000 forms to the Visual Studio .Net environment? Retaining the names of the objects would be nice, but not necessary, all I really need is the wireframes of the forms with the objects in their prior spatial arrangement. The development platform is XP. Searching the web, EvolutionOne seemed to offer hope that I could do a three-cornered MSAccess>VB.Net>C#.Net kludge, but drilling down to their demo software found their website hollow. Looks like they died about 2002. My bosses are willing to spend up to about 500 (US$)for a product that can do this with a short learning curve. Particularly when faced with the costs of hiring a squad of temporary mouse-wranglers to draw the hateful forms within the time allotted. Any sensible suggestions will be regarded with gratitude.
"To do is to be." [Descartes] "To be is to do." [Voltaire] "Do be do be do..."[Frank Sinatra]
There is nothing that will convert Access Forms to C#, or any other language for that matter. Access Forms work quite a bit differently from others, so there is no real direct conversion possible. You're going to have to redesign the forms, by hand.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
There is nothing that will convert Access Forms to C#, or any other language for that matter. Access Forms work quite a bit differently from others, so there is no real direct conversion possible. You're going to have to redesign the forms, by hand.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Converting the app as a whole would be a massive undertaking, but if I understand correctly the OP would only need something to create the designer code on the real language side. That would be a significantly simpler task, unfortunately AFAIK there's no tool to even do that much.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains. -- Pride and Prejudice and Zombies
-
First question. (Please don't hit me just because I'm stupid.) :sigh: I have a short-deadline (90-day) assignment to convert an almost-working Access 2000 application to C#.net. The application has fifty forms, covered with fiddly little fields that have to be precisely aligned. I am relatively inexperienced in C# .Net development, but I have learned the basics, and have completed several applications of a complexity similar to this assignment. The job is easily achievable within the time limit if the forms don't have to be drawn, but for me to draw them to an acceptable quality will take at least 90% of the time available for the project. Plumbing the code behind the forms holds little terror for me, and can be done easily within the time limit. Here's the question: Does anyone know of existing software (Codeproject article, other article, commercial software, shareware) that can convert MSAccess 2000 forms to the Visual Studio .Net environment? Retaining the names of the objects would be nice, but not necessary, all I really need is the wireframes of the forms with the objects in their prior spatial arrangement. The development platform is XP. Searching the web, EvolutionOne seemed to offer hope that I could do a three-cornered MSAccess>VB.Net>C#.Net kludge, but drilling down to their demo software found their website hollow. Looks like they died about 2002. My bosses are willing to spend up to about 500 (US$)for a product that can do this with a short learning curve. Particularly when faced with the costs of hiring a squad of temporary mouse-wranglers to draw the hateful forms within the time allotted. Any sensible suggestions will be regarded with gratitude.
"To do is to be." [Descartes] "To be is to do." [Voltaire] "Do be do be do..."[Frank Sinatra]
A possible approach would be to write some VBA in Access that iterates through the AllForms collection and the controls on each form and outputs their properties to a text file. You could then use C# to parse the text file and create the corresponding forms in .Net.
Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis
-
A possible approach would be to write some VBA in Access that iterates through the AllForms collection and the controls on each form and outputs their properties to a text file. You could then use C# to parse the text file and create the corresponding forms in .Net.
Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis
Most Excellent Answer, it would not have occurred to me, but YES, this did the trick nicely. I'm a developer who appreciate how Access puts the "Rapid" into "RAD", but yes, it sure is a bummer when you have 25 forms with 50 to 100 fields each (they are REALLY crowded), and then it's a "Yikes" I have to convert them by HAND! (eg. into Winforms for SQL w/ VB.NET or Web form for ASP.NET etc). But "Voila", after taking the suggestion of David R, life is good! OK, so I'm not done, but it's going well, "the nut is cracked" (as the squirrels say). So rather than more platitudes, here is the code (below). As they say, "your mileage may vary", you will probably want a few more parameters (tabindex#, Locked etc), but this is the core. I decided that "On Error Resume Next" was the easiest way to skip the errors that occur when a control is missing a property, for instance a label does not have a ControlSource. I hope this is clear enough as is, but please "drop me a line" if I can answer further questions. Time permitting, I'll turn this into a shareware offering (like the now dearly departed EvolutionSoft, what happened to them?). Here is the Access VBA code "snippit": ("CTL" is abbreviation for Control; "CTL SRCE" is "ControlSource") On Error Resume Next FOR i 0 to Me.Controls.Count -1 OutFile.WriteLine("CTL- NAME: " & Me.Controls(i).NAME) OutFile.WriteLine("_CTL SRCE: " & Me.Controls(i).ControlSource) OutFile.WriteLine("_____LEFT: " & Me.Controls(i).Left) OutFile.WriteLine("_____TOP: " & Me.Controls(i).Top) OutFile.WriteLine("___WIDTH: " & Me.Controls(i).Width) OutFile.WriteLine("___HEIGHT: " & Me.Controls(i).Height) Next i John A
-
Most Excellent Answer, it would not have occurred to me, but YES, this did the trick nicely. I'm a developer who appreciate how Access puts the "Rapid" into "RAD", but yes, it sure is a bummer when you have 25 forms with 50 to 100 fields each (they are REALLY crowded), and then it's a "Yikes" I have to convert them by HAND! (eg. into Winforms for SQL w/ VB.NET or Web form for ASP.NET etc). But "Voila", after taking the suggestion of David R, life is good! OK, so I'm not done, but it's going well, "the nut is cracked" (as the squirrels say). So rather than more platitudes, here is the code (below). As they say, "your mileage may vary", you will probably want a few more parameters (tabindex#, Locked etc), but this is the core. I decided that "On Error Resume Next" was the easiest way to skip the errors that occur when a control is missing a property, for instance a label does not have a ControlSource. I hope this is clear enough as is, but please "drop me a line" if I can answer further questions. Time permitting, I'll turn this into a shareware offering (like the now dearly departed EvolutionSoft, what happened to them?). Here is the Access VBA code "snippit": ("CTL" is abbreviation for Control; "CTL SRCE" is "ControlSource") On Error Resume Next FOR i 0 to Me.Controls.Count -1 OutFile.WriteLine("CTL- NAME: " & Me.Controls(i).NAME) OutFile.WriteLine("_CTL SRCE: " & Me.Controls(i).ControlSource) OutFile.WriteLine("_____LEFT: " & Me.Controls(i).Left) OutFile.WriteLine("_____TOP: " & Me.Controls(i).Top) OutFile.WriteLine("___WIDTH: " & Me.Controls(i).Width) OutFile.WriteLine("___HEIGHT: " & Me.Controls(i).Height) Next i John A
I'd forgotten about this. :) Glad to hear it's going well. You have to be careful trying to produce a general solution that will work with all versions of Access. I did something similar (but a bit more complicated) in Access 97, only to find it broke in Office XP. Microsoft changed the object model. :-D
Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis The only valid measurement of code quality: WTFs/minute.
-
I'd forgotten about this. :) Glad to hear it's going well. You have to be careful trying to produce a general solution that will work with all versions of Access. I did something similar (but a bit more complicated) in Access 97, only to find it broke in Office XP. Microsoft changed the object model. :-D
Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis The only valid measurement of code quality: WTFs/minute.
Good point (& thanks for the follow up). My version is "MS Access 2002 (10.6771.6847) SP3", which I believe is the "Office XP" version. Seems like that makes it two versions ago, I normally keep to VB as there is less of that sort of stuff (oops, notwithstanding that big one from VB6 to VB.NET nine or so years ago - my how time flies!). At that, I'm still using the .NET Studio 2003 & 2005 versions (and still keeping a VB6 machine alive, for that matter). But you are right, as one ponders a "product" even a shareware one, version compatibility is a consideration and finding a break in the object model is certainly enough to "ruin one's day". I will post again if/when I have useful further info that warrants it. Best Regards, John A
-
There is nothing that will convert Access Forms to C#, or any other language for that matter. Access Forms work quite a bit differently from others, so there is no real direct conversion possible. You're going to have to redesign the forms, by hand.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Please visit Microtools.us website at http://www.microtools.us. ANETVC7, Access Whiz Option H can help you to convert Access forms to C#.
-
Please visit Microtools.us website at http://www.microtools.us. ANETVC7, Access Whiz Option H can help you to convert Access forms to C#.
Just because you can use a tool to do [some|all] of the conversion for you, doesn't mean it's a good idea.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Most Excellent Answer, it would not have occurred to me, but YES, this did the trick nicely. I'm a developer who appreciate how Access puts the "Rapid" into "RAD", but yes, it sure is a bummer when you have 25 forms with 50 to 100 fields each (they are REALLY crowded), and then it's a "Yikes" I have to convert them by HAND! (eg. into Winforms for SQL w/ VB.NET or Web form for ASP.NET etc). But "Voila", after taking the suggestion of David R, life is good! OK, so I'm not done, but it's going well, "the nut is cracked" (as the squirrels say). So rather than more platitudes, here is the code (below). As they say, "your mileage may vary", you will probably want a few more parameters (tabindex#, Locked etc), but this is the core. I decided that "On Error Resume Next" was the easiest way to skip the errors that occur when a control is missing a property, for instance a label does not have a ControlSource. I hope this is clear enough as is, but please "drop me a line" if I can answer further questions. Time permitting, I'll turn this into a shareware offering (like the now dearly departed EvolutionSoft, what happened to them?). Here is the Access VBA code "snippit": ("CTL" is abbreviation for Control; "CTL SRCE" is "ControlSource") On Error Resume Next FOR i 0 to Me.Controls.Count -1 OutFile.WriteLine("CTL- NAME: " & Me.Controls(i).NAME) OutFile.WriteLine("_CTL SRCE: " & Me.Controls(i).ControlSource) OutFile.WriteLine("_____LEFT: " & Me.Controls(i).Left) OutFile.WriteLine("_____TOP: " & Me.Controls(i).Top) OutFile.WriteLine("___WIDTH: " & Me.Controls(i).Width) OutFile.WriteLine("___HEIGHT: " & Me.Controls(i).Height) Next i John A
Hi, I have created a macro through which I am able to read the above mentioned property. but to get all property I had to call the macro from each form. Is there any easier way to achieve the same result easily which will loop through all the forms and get all controls property like database documenter does. Anyone has any idea about how database documenter works like which tables it queries to get all the database related information. I got a helpfull query : SELECT MSysObjects.Name FROM MsysObjects WHERE (Left$([Name],1)<>"~") AND (MSysObjects.Type)=-32768 ORDER BY MSysObjects.Name; which retrieves all the forms in a particular database but it doesn't get called from .net application. I am getting Exception: Record(s) cannot be read; no read permission on 'MsysObjects'. I tried to resolved this using suggestion provided here : http://www.justskins.com/forums/trouble-accessing-the-ms-59921.html but I do not find 'MsysObjects' in object list. Any help provided is much appreciated. It's urgent. Thanks Ruchika, ruchika.sharma83@yahoo.com