DispatcherUnhandledException catches children window Exception before try catch (ShowDialog)

Problem Application.DispatcherUnhandledException is a solution provided by the .NET Framework to manage any Unmanaged Exception bubbling up to the root of your application (App.AppStartup). Whilst using this solution I faced a problem when opening new windows from the Dispatcher of the UI Thread. When performing a try/catch around a Window.ShowDialog(), the DispatcherUnhandledException will be invoked…

0

Nested/Recursive Regex and .NET Balancing Groups – Detect a function with a Regex

Problem Overview Regex is a powerful tool allowing us to extract content from a string based on a Regular Expression. When you need to identify a string that contains nested elements, it might be more difficult to understand how to create a Regex solving this specific problem. Let’s say you want to extract a specific…

0

Insert a WebBrowser in a Word Document! Or how to insert a WPF/ Winform Custom UserControl in a Word Document

 This post provides an example on how to insert custom control inside a Word Document using VSTO. You might for example insert controls as button or a whole user interface inside your document. These controls might either be Winform or WPF control. VSTO allows developers to insert Winform controls inside their document. Create the project…

0

MSCOMCTL.OCX won’t register

I have been facing an issue with the Visual Basic component MSCOMCTL.OCX which I was not able to register (Windows 7 – 64bits). I found multiple answers on the internet as: Move the object in a different folder C:\Windows\system C:\Windows\system32 C:\Windows\SysWOW64 Update the registry Reinstall VB6… While trying to use the classic regsvr32 and modifying…

0

Netsh wlan start hostednetwork, The hosted network couldn’t be started.

While trying to share my wifi connection, the error “The hosted network couldn’t be started. The group or resource is not in the correct state to perform the requested operation.” happened and I wanted to share how to solve this issue. The problem comes from the adapter that can be in “sleep mode”. As explained…

78