[Solved]Settings

Posts 1–15 of 19 · Page 1 of 2
[Solved]Settings
Ow screw this :/ idk what's wrong...


Code:
     Private Sub ComboBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.TextChanged
        If ComboBox1.Text = "Blue" Then
            RibbonControl1.Office2007ColorTable = DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Blue
            My.Settings.style = "Blue"
            My.Settings.Save()
            My.Settings.Reload()

        ElseIf ComboBox1.Text = "Black" Then
            RibbonControl1.Office2007ColorTable = DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Black
            My.Settings.style = "Black"
            My.Settings.Save()
            My.Settings.Reload()


        ElseIf ComboBox1.Text = "Silver" Then
            RibbonControl1.Office2007ColorTable = DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Silver
            My.Settings.style = "Silver"
            My.Settings.Save()
            My.Settings.Reload()
        End If
So it actually does change .style to "Silver", however just until I close the program. So...it does change my.settings but it does not save =/
Did you actually enter a string setting in your application properties?
yes i did as i said...it does change...but it doesn't save..
Lol you have a lot of problems don't you..
All those weird problems whose seem illlogical -_-
Lol exactly
ok =/ hopefully you find something...
Code:
  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        RibbonControl1.Office2007ColorTable = My.Settings.style
    End Sub
Code:
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        If ComboBox1.Text = "Blue" Then
            RibbonControl1.Office2007ColorTable = DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Blue
            My.Settings.style = DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Blue
        End If

        If ComboBox1.Text = "Black" Then
            RibbonControl1.Office2007ColorTable = DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Black
            My.Settings.style = DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Black
        End If

        If ComboBox1.Text = "Silver" Then
            RibbonControl1.Office2007ColorTable = DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Silver
            My.Settings.style = DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Silver
        End If

        My.Settings.Save()
        My.Settings.Reload()

    End Sub
Neither works. It simply does not save.
gah.. VB is really annoying sometimes. even when codes are perfect.
Use form load to check the state of the combo-box instead of the settings


If Combo-Box1.SelectedItem = "Black" then
yada yada
Else if ComboBox1.selecteditem = "Silver"
Yadayada
Else if
You get the idea
end if



Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If my.settings.style = blue then
RibbonControl1.Office2007ColorTable = RibbonControl1.Office2007ColorTable.Blue
ElseIf my.settings.style = black then
RibbonControl1.Office2007ColorTable = RibbonControl1.Office2007ColorTable.Black
ElseIf my.settings.style = Silver then
RibbonControl1.Office2007ColorTable = RibbonControl1.Office2007ColorTable.Silver
End If
End Sub
it does not save...even nextgen couldn't fix it >_<
my way is how i make it work, if you want a foolproof way, then PM me
thing is...form1 does NOT matter at all. it simply does NOT save...

100% if sentences of comoboBox...does work without if's...
Yea, Internet Crashed, But I team viewed, nothing is working, It's so strange.....
Posts 1–15 of 19 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us