Solution:
Either derive your custom exception from ApplicationExce ption and set the HResult Property or throw an exception using Marshal.ThrowEx ceptionForHR.
Attention: The HResults have to be negative values.
User Profile
Collapse
-
-
Set VBScript Err.Number by throwing .NET exception in c# COM object
Hello,
I have a c# com object that exposes several methods.
This com object is to be used in vbscripts as well as vba scripts.
In my application error handling is done by throwing different types of custom exceptions. The problem is that when theses exceptions are caught by the vbscript the type of the exception is unknown.
Therefore I would need Err.Number to determine what kind of exception was... -
How to create a simple LED Control - WPF
Hi!
Let's say I wanted to create a very simple control that is nothing but a LED. That LED can be active or inactive. Depending on that state its color changes.
What is WPFs best practice to do so? Because I dont like the control the way it is right now at all.
LEDControl.xaml :
...Code:<UserControl x:Class="WpfPanelClient.Views.LEDControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" -
How to draw an infinitely scalable image that consists of pixels and text
Hello,
currently I am working on the following scenario:
There is a device connected to my application. That device has a 256x256 pixel display showing graphics and text.
Now for each pixel of that display I receive a flag whether the pixel is to be drawn or not.
Furthermore to display text you can imagine the surface as divided in 21 columns and 16 rows. Now for each cell I get information whether... -
Garbage Collector - what am I doing wrong (Windows CE)
Hello guys,
we are working on an application system for Windows CE which consists of several processes.
One of our devices only has 60 MB of RAM. It is divided in 8MB program storage and 52MB memory storage.
We have the following scenario:
Once our main application (and several small helper applications) is started 45 MB memory storage is in use.
That means only 7 MB are left. So... -
Kevinst started a topic Windows Forms: What is the best way to create an animated topmost transparent controlin C SharpWindows Forms: What is the best way to create an animated topmost transparent control
Hello there,
I have got a problem and several approaches but none is really staisfying:
Lets assume we have a form. On its surface we have got several animations (like a blinking light).
This form is not owner drawn. Everything is drawn by child controls.
Now we want to go ahead and create an animation that is on top of everything of that form. Lets assume this animation was an arrow that is moving...
No activity results to display
Show More
Leave a comment: