473,789 Members | 2,550 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Persisting GUI's

Howdy

I need to port a VB6 app. Its GUI is persisted to an .ini file - ie all the
control captions, positions, whether visible, tooltips, that kind of thing.

In C# is there an easier way to accomplish this? I tried to Serialize a
button without much luck, and further googling leads me to believe that you
need to write a wrapper object and serialize the wrapper.

I'm looking for ideas on how to do this. Be grateful for any bright ideas
....

Mike
Nov 16 '05 #1
2 1105
Serialization is one method, but in case you don't have much customizable
elements you could store the values in an XML file, from which you read @
runtime and set the values. Reflection would easily help you do that.

And in case you have only a few elements, then you could store their values
in app.config, instead of a full fledged XML file.
"mike netspace.net.au >" wrote:
Howdy

I need to port a VB6 app. Its GUI is persisted to an .ini file - ie all the
control captions, positions, whether visible, tooltips, that kind of thing.

In C# is there an easier way to accomplish this? I tried to Serialize a
button without much luck, and further googling leads me to believe that you
need to write a wrapper object and serialize the wrapper.

I'm looking for ideas on how to do this. Be grateful for any bright ideas
....

Mike

Nov 16 '05 #2
aaa
mike
Howdy

I need to port a VB6 app. Its GUI is persisted to an .ini file - ie all the
control captions, positions, whether visible, tooltips, that kind of thing.

In C# is there an easier way to accomplish this? I tried to Serialize a
button without much luck, and further googling leads me to believe that you
need to write a wrapper object and serialize the wrapper.

I'm looking for ideas on how to do this. Be grateful for any bright ideas
...


You can check out this article posted on codeproject:

http://www.codeproject.com/useritems...indowState.asp

hope it helps...

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3089
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own words, their own definitions plus an example of how the word is used in practice. It'll be all client side with - cookies? to get persistence so that the words won't disappear on me each time the page is closed (which is what happened when I
1
1670
by: lim | last post by:
What is the possible error that occurs when the Page_load event is not triggered during execution. In my page there's some basic server control. Is there any loops holes?
2
1829
by: headware | last post by:
I am new to 3-tiered design and am in the process of designing an application that will work with ASP.NET as well as Windows Forms (and possibly with a PDA of some sort down the road). My question is about the statefulness of business objects. In some of the examples that I've seen of 3-tiered systems using ASP.NET, the business objects are recreated every time they are accessed. They are not kept in the Session variable for use next time...
5
4839
by: Dick | last post by:
I have a GridView bound to an ObjectDataSource. I have a Button that calls GridView.DataBind. I want the row that is selected before the DataBind to still be selected afterwards. This happens automatically if the data doesn't change. But if records have been added or deleted then it looks as if some code is necessary: I've done this by using GridView.SelectedValue to get the key value of the currently selected Row and then by itterating...
0
10404
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4090
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.