🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: be.comp.programming
1 messages
1 total messages Started by Kelly Smith Sun, 02 Feb 2003 12:45
Last state ComboBox?
#6158
Author: Kelly Smith
Date: Sun, 02 Feb 2003 12:45
52 lines
2483 bytes
Hello,

I have a combo box with text from 0 to 6 and the default is 0 , whenever I
restart the program it comes back to 0 which is the default. I would like it
to remember the last state or the current text before I closed the
application. Does anyone know how to handle this?
I prefered a registration method, but it gives errors. Does anyone know what
the problem could be?

In runtime it gives this problem:
   Runtime-error "380"
   Invalid property value

It writes to the registry, but it isn't loading it (Error). I tried to use
this method:
In the Form_QueryUnload:
   SaveSetting App.Title, "Settings", "ComboBox", Str(Combo1.ListIndex)
In the Form_Load:
   Combo1.ListIndex = Val(GetSetting(App.Title, "Settings", "ComboBox", 0))

My Combo Settings:
Style: DropDown List

...

Private Sub Combo1_Click()
    Select Case Combo1.ListIndex 'ComboBox
        Case 1 'Menu
        Case 2 'Show
        Case 3 'Anywhere
        Case 4 'Moveable
        Case 5 'Close
    End Select
End Sub

...

With Combo1
    .AddItem "None"
    .AddItem "Menu"
    .AddItem "Show"
    .AddItem "Anywhere"
    .AddItem "Moveable"
    .AddItem "Close"
    .ListIndex = 0
End With



Thank you in advance!

Kelly.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads