Changing and saving the back colour
Post your questions regarding programming in C# in here.
4 posts
Page 1 of 1
I want change the back colour of my program in vb C# and sucha change must be saved and when i open it must show me the changed colour. How can i do so?
thanks
thanks
In this case, you could create a new setting by double-clicking your project name in the solution explorer, and then going the the 'Settings' tab.
When creating the new setting, make sure to give it a name, as well as change it's type to 'color'.
The rest can be done with code.
When creating the new setting, make sure to give it a name, as well as change it's type to 'color'.
The rest can be done with code.
Code: Select all
Make sure to replace 'SettingName' by the name you gave to your setting.'Save the current backcolor
My.Settings.SettingName = Me.BackColor
My.Settings.Save()
'Load the saves BackColor
Me.BackColor=My.Settings.SettingName
Last edited by comathi on Sun Apr 29, 2012 10:54 am, edited 1 time in total.
comathi wrote:In this case, you could create a new setting by double-clicking your project name in the solution explorer, and then going the the 'Settings' tab.
When creating the new setting, make sure to give it a name, as well as change it's type to 'color'.
The rest can be done with code.Code: Select allMake sure to replace 'SettingName' by the name you gave to your setting.'Save the current backcolor My.Sertings.SettingName = Me.BackColor My.Sertings.Save() 'Load the saves BackColor Me.BackColor=My.Settings.SettingName
Code: Select all
'Save the current backcolor
My.SETTINGS.SettingName = Me.BackColor
My.SETTINGS.Save()
'Load the saves BackColor
Me.BackColor=My.Settings.SettingName
CodenStuff wrote:Nope, it's just your sick and dirty mind. You sick twisted warped little pervo![]()
Ohh, sorry about that. I'm on my iPod, so typos are very easy to make :lol:
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023