Hello All,

OK I am about to rip my hair out here. I have an application that has an
onscreen keyboard. You can hide or show it. Whatever you prefer. So, I want
the state of the keypad to be saved when the application is closed. When I
exit the application by hitting the applications silk screen button and then
go right back into my application the keyboard state is properly saved. But,
when I leave my app and open another app and then go back into my
application, the keyboard is always visible no matter if it was visible or
not when you exited.

I have the following global variable and struct:

static Boolean gVisible = true;

typedef struct 
    {
    Boolean visible;
    } DripRateCalcPreferenceType;


//code in start application
    DripRateCalcPreferenceType prefs;
    SystemPreferencesType sysPrefs;
    UInt16 prefsSize;

PrefGetPreferences(&sysPrefs);
prefsSize = sizeof(DripRateCalcPreferenceType);
if (PrefGetAppPreferences(kDBCreator, appPrefID, &prefs, &prefsSize, true)
== appVersionNum)
        {
            gVisible = prefs.visible;
        }


//code in app stop function
DripRateCalcPreferenceType prefs;

prefs.visible = gVisible;
PrefSetAppPreferences (kDBCreator, appPrefID, appPrefVersionNum,
  &prefs, sizeof (DripRateCalcPreferenceType), true);


What I am missing here??

One last question. In the Option menu for my app, I have a selection "Hide
or Show Keypad" when I select it, it gets highlighted. OK, fine. But it
never un-highlights. It will only become un-highlighted when I select
another item in the Options Menu. Any thoughts?

Thanks!

Andy
-- 
Andy Black
[EMAIL PROTECTED]
Unix is user friendly. It is just picky about who its friends are.



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to