Jump to content
IGNORED

Anyone here know Winforms programming in c#?


Tickled_Pink

Recommended Posts

I'm working on a project to handle ATR and XFD files. However, I'm struggling to cope with the awkwardness (IMO) of Winforms development. Is there anyone here that can help out with designing and developing the Winforms front end? VB.NET is fine as I should be able to convert the code to C#.

Link to comment
Share on other sites

I'm working on a project to handle ATR and XFD files. However, I'm struggling to cope with the awkwardness (IMO) of Winforms development. Is there anyone here that can help out with designing and developing the Winforms front end? VB.NET is fine as I should be able to convert the code to C#.

 

I don't have the time to help write code directly; but I was wondering why you think that winforms development is difficult? Are you using Visual Studio or are you trying to do it by hand? If you are not using visual studio, I heartily recommend that you download the visual studio express for c# version. That should have all you need. If you are using it, then perhaps you don't understand something fundamental? Are you familiar with event-driven GUI's in general? If you have questions in specific, I'd be glad to help if you posted them.

Link to comment
Share on other sites

I'm using VS 2008. I'm just finding things a little awkward. For instance it took me ages to get a simple progress display working in a modal dialog. Even now it's not working properly as the box has a habit of locking up when searching for files. At the moment I'm not sure if it's just the box itself that's locking up and the underlying code is still running ... or if both are locking up. I'll get back to it later and check up.

 

Event driven coding isn't a problem for me. I've used it in XNA game projects.

 

Something that stumped me early on was the fact that labels and other controls aren't automatically updated when a dialog box is opened. I have had to put in something like myControl.Update() for all the controls in the modal dialog I've been working on. I've also read that this isn't the best way of doing things (although those criticising this method haven't actually come up with a better alternative).

 

Do you mind if I PM you with questions and code from time to time?

Link to comment
Share on other sites

Something that stumped me early on was the fact that labels and other controls aren't automatically updated when a dialog box is opened. I have had to put in something like myControl.Update() for all the controls in the modal dialog I've been working on.

 

Could you destroy the form when closing (maybe something like 'progressForm.unload()') and recreate it when you need it? (progressForm.show? old vb automagically constructs a new form when the old one was destroyed) That way the default values you've set design time are put in all the fields.

 

At the moment I'm not sure if it's just the box itself that's locking up and the underlying code is still running ... or if both are locking up. I'll get back to it later and check up.

 

While your progress code is running, can you call 'doEvents' every once in a while? That will allow other events to be processed. This is old vb stuff, maybe the new vb works in the same way, or maybe you can find equivalent ones.

Link to comment
Share on other sites

  • 2 weeks later...

I haven't done much with it since my last post on the subject - been roped in to do a .NET website.icon_rolleyes.gif Oh well, it's money.

 

The problem occurs on the first opening of a dialog box. Maybe I should give VB.NET a try to see if it behaves any differently. C# seems clunky when developing winforms apps. Or maybe it's a .NET Framework thing.

 

Or maybe I'm just expecting too much from it. icon_wink.gif

Link to comment
Share on other sites

Problem solved. Possibly.

 

I've set it up as a Sourceforge project so if I need any help with it, I should be able to get a reasonably experienced winforms coder to help out through that. Although I'm currently playing around with WPF to see if I can get more joy out of that than basic winforms.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...