Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 17th, 2006, 03:03 PM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default C# GUI Seperation

Hi!

I have been using C# for a while and am having trouble coming up with a good model for GUI interaction. In most programs I write I need to spawn new threads because I find that networking code is unrealiable otherwise. Those threads need to check InvokeRequired and Invoke controls to do their updating in their own time. This is extremely cumbersome for each control that needs updating! I don't want to use a BackgroundWorker because I don't have one or two long-running processes - I want my whole backend running in it's own thread.

What I end up doing now mostly is having a global (static) object where I mirror data presented on the GUI. The GUI runs a timer and copies that data to the controls. The backend objects update the static object. This seems like an easy way to do things but it's not nice to have global data, and the duplication of data between the GUI and the static object also does not feel right.

Can anyone comment on the best way to run a rich GUI, with everything else on another thread, and the communication between the two?

Leslie Viljoen






Similar Threads
Thread Thread Starter Forum Replies Last Post
Gui program P.Wheat Windows Server 0 February 23rd, 2008 11:06 PM
simple GUI hammie Java GUI 1 April 30th, 2006 06:41 AM
GUI questions hlchuah77 Java GUI 2 August 24th, 2004 09:23 AM
help in GUI khfarooq Java GUI 5 August 22nd, 2004 05:00 AM
GUI Programming in C# Neeki4444 C# 0 May 21st, 2004 02:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.