在窗体 -> 属性 -> ApplicationSettings -> PropertyBinding
绑定了窗体的 Text 属性 和 Opacity
但是Opacity 属性却不能保存,其它属性都可以,小弟实在是百般无赖才求帮大哥些哈。
请知道真相的高手指点一点 小弟万分感谢哈
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Properties.Settings.Default.Save();//保存当属性
} private void Form1_Click(object sender, EventArgs e)
{
this.Text = "更改了窗体名称";
this.Opacity = 0.8;
}
绑定了窗体的 Text 属性 和 Opacity
但是Opacity 属性却不能保存,其它属性都可以,小弟实在是百般无赖才求帮大哥些哈。
请知道真相的高手指点一点 小弟万分感谢哈
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Properties.Settings.Default.Save();//保存当属性
} private void Form1_Click(object sender, EventArgs e)
{
this.Text = "更改了窗体名称";
this.Opacity = 0.8;
}
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
private void Form1_Click(object sender, EventArgs e)
{
this.Text = "更改了窗体名称";
this.Opacity = 0.8;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool t {
get {
return ((bool)(this["t"]));
}
set {
this["t"] = value;
}
}
由于代码太复杂我建议你去查MSDN!如果还搞不定我可以把代码给你贴上来!但是我现在的电脑上没有要等明天了!我告诉你要使用那些类!你自己去查应该可以解决
IsolatedStorage类
IsolatedStorageFile类
IsolatedStorageFileStream类!还要用到串列化的相关类!
BinaryFormatter类!等等