question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get native Window handle from control

See original GitHub issue

Description

I would like to port a Winforms desktop app which uses a native lib to render video - so the app should have different code for different platforms, but I was unable to find a way to get an IntPtr Windows handle from e.g. a BoxView.

Public API Changes

I do not know where this functionality should be added…

Intended Use-Case

In Winforms we can do something like this:

_libvlc_media_player_set_hwnd(mediaPlayer, panelVideo.Handle); // Render video on Windows in a panel control

It would be very useful to have a similar feature in Maui - if it’s not already available.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:18
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
niksedkcommented, May 5, 2022

I think we only have this on a window level now, but you’re asking on a control level, right?

Yes, that’s correct.

0reactions
msftbot[bot]commented, Nov 29, 2022

Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

NativeWindow.Handle Property (System.Windows.Forms)
The MyNativeWindow class creates a new window with the ClassName set to BUTTON. This creates a Win32 button window. The location and size...
Read more >
How to get a handle of a label in a window
If it uses native controls, a program can retrieve a native window handle ( HWND ) for a control. If it doesn't, then...
Read more >
A consistent way to get native window handles (HWND)
A consistent way to get native window handles (HWND) ... represents the native window handle of the control – this can be passed...
Read more >
How can I get the HWND (Native Window Handle) of ...
I need to have access from the outside to a given region of MATLAB Figure. I want to ask this region, using UIPANEL....
Read more >
Window handle (hWnd) of string control/indicator?
I know how to get the window handle of the VI (using FindWindowA in user32.dll) but I cannot figure out how to obtain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found