Click here to Skip to main content
15,892,737 members
Home / Discussions / C#
   

C#

 
QuestionConverting Access Forms to WinForms or WPF Pin
Fenshaw19-Jun-09 9:29
Fenshaw19-Jun-09 9:29 
AnswerRe: Converting Access Forms to WinForms or WPF Pin
Dan Neely19-Jun-09 9:47
Dan Neely19-Jun-09 9:47 
AnswerRe: Converting Access Forms to WinForms or WPF Pin
Dave Kreskowiak19-Jun-09 10:36
mveDave Kreskowiak19-Jun-09 10:36 
GeneralRe: Converting Access Forms to WinForms or WPF Pin
Dan Neely19-Jun-09 10:41
Dan Neely19-Jun-09 10:41 
GeneralRe: Converting Access Forms to WinForms or WPF Pin
andyc0118-Mar-11 19:42
andyc0118-Mar-11 19:42 
GeneralRe: Converting Access Forms to WinForms or WPF Pin
Dave Kreskowiak19-Mar-11 5:00
mveDave Kreskowiak19-Mar-11 5:00 
AnswerRe: Converting Access Forms to WinForms or WPF Pin
riced20-Jun-09 3:54
riced20-Jun-09 3:54 
GeneralRe: Converting Access Forms to WinForms or WPF Pin
JohnAndrews18-May-10 15:58
JohnAndrews18-May-10 15:58 
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
GeneralRe: Converting Access Forms to WinForms or WPF Pin
riced18-May-10 21:39
riced18-May-10 21:39 
AnswerRe: Converting Access Forms to WinForms or WPF Pin
JohnAndrews19-May-10 5:38
JohnAndrews19-May-10 5:38 
GeneralRe: Converting Access Forms to WinForms or WPF Pin
Ruchika.techie22-Aug-11 2:49
Ruchika.techie22-Aug-11 2:49 
QuestionWay to retain focus of transparent form application. Pin
parth_patel19-Jun-09 8:38
parth_patel19-Jun-09 8:38 
AnswerRe: Way to retain focus of transparent form application. Pin
EliottA19-Jun-09 8:52
EliottA19-Jun-09 8:52 
GeneralRe: Way to retain focus of transparent form application. Pin
parth_patel19-Jun-09 8:55
parth_patel19-Jun-09 8:55 
GeneralRe: Way to retain focus of transparent form application. Pin
EliottA19-Jun-09 9:26
EliottA19-Jun-09 9:26 
GeneralRe: Way to retain focus of transparent form application. Pin
parth_patel19-Jun-09 12:30
parth_patel19-Jun-09 12:30 
GeneralRe: Way to retain focus of transparent form application. Pin
S. Senthil Kumar20-Jun-09 18:11
S. Senthil Kumar20-Jun-09 18:11 
GeneralRe: Way to retain focus of transparent form application. Pin
Dave Kreskowiak19-Jun-09 10:37
mveDave Kreskowiak19-Jun-09 10:37 
GeneralRe: Way to retain focus of transparent form application. Pin
parth_patel19-Jun-09 12:29
parth_patel19-Jun-09 12:29 
AnswerRe: Way to retain focus of transparent form application. [modified] Pin
crayzeecoder19-Jun-09 9:30
crayzeecoder19-Jun-09 9:30 
GeneralRe: Way to retain focus of transparent form application. Pin
parth_patel19-Jun-09 12:24
parth_patel19-Jun-09 12:24 
QuestionConfigurationManager - how to read/write into a custom section? Pin
Zeokat19-Jun-09 7:27
Zeokat19-Jun-09 7:27 
AnswerRe: ConfigurationManager - how to read/write into a custom section? Pin
Manas Bhardwaj19-Jun-09 9:37
professionalManas Bhardwaj19-Jun-09 9:37 
GeneralRe: ConfigurationManager - how to read/write into a custom section? Pin
Zeokat19-Jun-09 9:48
Zeokat19-Jun-09 9:48 
AnswerRe: ConfigurationManager - how to read/write into a custom section? Pin
Henry Minute19-Jun-09 10:18
Henry Minute19-Jun-09 10:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.