NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 12 13 14 15 16 … 93 Next »
Embed Custom UserControl?

 
  • 0 Vote(s) - 0 Average
Embed Custom UserControl?
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#1
2011-09-28, 12:24 PM
Is it possible to embed a custom UserControl in a screen? It would just be for dynamic display and not direct user interaction.
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#2
2011-09-28, 12:35 PM
Do you mean a WindowsForm UserControl in the NextPVR screen (not the settings dialog)? If so I don't see how this would be possible.
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#3
2011-09-28, 12:58 PM
McBainUK Wrote:Do you mean a WindowsForm UserControl in the NextPVR screen (not the settings dialog)?

Yes.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#4
2011-09-28, 03:59 PM
You'd only be able to use a custom control on the settings screen.
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#5
2011-09-28, 07:26 PM
Ok, but I hope you will consider adding this. I have a Pandora music plugin that I wrote for other programs that could be converted to work in NPVR if I could embed my custom UserControl (essentially displays and interacts with the .NET web browser control). Alternatively, the capability of adding a web browser element to a skin/screen with direct access in code to the underlying browser control would work too.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#6
2011-09-28, 07:46 PM
To be honest, it's unlikely I'd add support for this type of custom control in the core app. The UI is designed to work in a way that makes it compatible with extenders etc, whereas this custom control wouldnt be visible over a network from an extender, so it's not really a path I'd want to go down for the main application.

There are probably still options for you though. If you're not concerned about compatibility with extender clients, you could probably create a form with this control embedded, and overlay it on top of the main application window when the user activates your plugin, and hide the form when the user leaves the plugin. Even if you want leave music playback happening in the background (in hidden form with browser control), there is APIs you can call with current song names etc, so that the 'now playing' field etc show correct info in other NextPVR screens.
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#7
2011-09-28, 07:59 PM
sub Wrote:If you're not concerned about compatibility with extender clients, you could probably create a form with this control embedded, and overlay it on top of the main application window when the user activates your plugin, and hide the form when the user leaves the plugin.

This will probably work for me. Thanks for the suggestion.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#8
2011-09-28, 08:08 PM
If you know the song names, you can use the PluginHelperFactory.GetPluginHelper().SetAudioDescription(xxxxx) API to tell the application what song is playing. Pass in null when audio stops.
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#9
2011-10-02, 08:28 PM (This post was last modified: 2011-10-02, 08:35 PM by cncb.)
I have an element in my skin to represent a rectangle where my Form should be positioned but I'm having a little trouble. I can get an appropriate rectangle that represents the element when NPVR is fullscreen but the rectangle doesn't take into account the app's location and size if windowed and also doesn't take into account the "UI Zoom Percent". I thought
Code:
SkinHelper.GetDisplayRect( skinHelper.GetRelativeElementRectangle("BrowserArea"))
might take care of this but it doesn't seem to. Is there a way? Thanks.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#10
2011-10-02, 08:47 PM
Those APIs are really about rectangles within the current screen, and not about window placement.

There is no API to determine where the window is on the desktop, but you can probably work it out via "Process.GetCurrentProcess().MainWindowHandle", or I can add some API in the next release.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom recording tomx 2 709 2025-02-07, 09:14 AM
Last Post: tomx
  custom creation of a recurring error p37307 2 2,387 2017-12-19, 03:45 AM
Last Post: mvallevand
  Custom recording rules mvallevand 58 22,586 2014-12-08, 03:28 AM
Last Post: mvallevand
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,988 2014-11-14, 02:05 AM
Last Post: Benoire
  How to display custom plugin names and descriptions. whurlston 29 7,730 2010-01-03, 08:48 PM
Last Post: whurlston
  Custom popups? bgowland 2 1,817 2008-05-11, 12:26 AM
Last Post: bgowland
  custom screen saver, returning to last plugin reven 2 1,743 2006-05-17, 09:21 PM
Last Post: sub
  skins and custom tasks stp 8 3,557 2004-05-09, 05:42 PM
Last Post: stp

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode