10.6

I got it fixed by putting in a 0.1 DelayMDS before the call to
TransformToForegroundApplication.

Dean Davis

On Sun, Jun 19, 2011 at 5:32 PM, Michael Diehr <[email protected]> wrote:
> Dean,  what OS are you using?  (From memory) the behavior is different 
> between 10.4, 10.5, and 10.6, with 10.5 and 10.6 working normally, and in one 
> case LSUIElement and LSBackgroundOnly work differently...
>
> On Jun 16, 2011, at 6:42 AM, Dean Davis wrote:
>
>> I have an app that uses normal windows as well as a status item.
>> My users have requested a feature that would make the dock icon
>> disappear leaving only the windows and status item.
>> To do this I have set my apps info.plist key of "LSUIElement" to the value 
>> of 1.
>> This makes it so that my app doesn't show the application icon or
>> application menu. But the status item and windows still show and
>> respond to user input.
>> At the beginning of the program I check a user preference to see if
>> the user wants this behavior. If they don't (i.e. WANT the dock icon")
>> then I run this code...
>>
>> ' Do I need to unhide the app
>>  If GlobalStuff.HideApplicationIcon = False then
>>
>>    // get front process
>>    dim c as new ProcessMBS
>>    c.GetFrontProcess
>>
>>    // get our process
>>    dim p as new ProcessMBS
>>    p.GetCurrentProcess
>>
>>    // change process
>>    call p.TransformToForegroundApplication
>>
>>    // switch to old app
>>    c.FrontProcess=True
>>
>>    // let the system switch
>>    DelayMBS 0.1
>>
>>    // switch to our app
>>    p.FrontProcess=True
>>    app.MenuBar = menu
>>  end if
>>
>> This makes the dock icon appear but I do not get a menu bar.
>>
>> Running in debug I do get the menu. It's only on the compiled app that
>> I cannot get the menu.
>>
>> Anyone else see this?
>> Can anyone duplicate this?
>> Any workaround suggestions?
>>
>> Dean Davis
>> _______________________________________________
>> Mbsplugins_monkeybreadsoftware.info mailing list
>> [email protected]
>> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> [email protected]
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to