Jump to content

minimize/restore from systray with COM ?


Recommended Posts

Normally when I hit the "power button" on my remote I close DVBViewer.

Then 20 mins. later I change my mind and decides to restart DVBViewer by hitting the "TV button".

It takes some seconds before the app has fully initalized. This is ok.

 

Then I got the idea about not closing down DVBViewer at all when I hit "POWER", but instead just minimize it to the systray area along with an optional "shutdown card" command forcing DVBViewer to untune the current channel. This untuning has several advantages, although I have to use it with great care.

 

My problem is that I don't have any methods within the COM object to minimize and restore the DVBViewer app to the systray area.

 

Is this even currently possbile ?

 

If I use the builtin window script functions within uIce like the "Minimize" property, I get DVBViewer minimized so that it is placed just above the windows start button on the taskbar. The app is not minimized to systray as I would have liked it to be.

So the "Uice" way of doing the minimize job is not really adequate.

 

I want to do the following stuff when I use my remote:

(everything is working as it should except for the minimize thing)

 

When I activate "the POWER button" for the first time - I do this:

Check if we are currently recording stuff. If we are not recording then we untune the channel.

Then minimze.

if (!oTimerMan.Recording) //are we recording stuff?

{

oDVBViewerServer.SendCommand(12327); // shut down card - untune.

}

 

DVBViewer.Minimized = true; //uice minimize command

 

 

When I activate "the POWER button" for the second time - I do this:

DVBViewer is currently minimized to the systray, now we close it completely.

if (DVBViewer.Minimized) //check to see if it is minimzed b4 we close it

{

oDVBViewerServer.SendCommand(6); //close

}

 

 

When I activate "TV button" and DVBViewer is minimized to systray - I do this:

Restore the APP window.

Fullscreen it.

Tune last Channel.

DVBViewer.Minimized = false; //uice restore command

if (!oDVBViewerServer.IsFullscreen)

{

oDVBViewerServer.SendCommand(5); //fullscreen

}

 

oDVBViewerServer.SendCommand(63); //tune last channel

 

It works quite nice - if only I could have it sys-trayed.

 

/Elo

Edited by gibman
Link to comment

Nice!

 

Now it minimizes to systray. It wasnt in actions.ini ?

 

Next question ... how do I restore it ?

Calling 16382 a 2nd time doesnt restore it.

 

Also how do I query the COM object wether or not the DVBViewer is minimized ?

 

/Elo

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...