- I am trying convert SmartRectangle to System.Drawing.Rectangle
but I get the height = 1 always.
I think the implicit operator Rect is use wrong verties index of SmartRectangle.
- I am testing the ShapeFinder2 , but the sample code is vb with old activex, anyone have the C# sample base on CVB.Winforms.Display & CVB.ShapeFinder2?
Hello @sbphsho
-
Can you show me your code? If I convert the SmartRectangle to a Rect I get the expected result. Please note that the implicit converter returns a Stemmer.Cvb.Rect and not a System.Drawing.Rectangle.
-
Unfortunately there is no ShapeFinder2 tutorial that uses the Stemmer.Cvb library. For a more modern example you can have a look at the Cvb++ tutorials.
Cheers,
Tim
Just add a SmartRectangle to display and cast the overlay to CVB.Rect then to System.Drawing.Rectangle.
Hello @sbphsho
You are correct, there seems to be a bug in the conversion logic, using the wrong vertices. I fixed this for the new CVB version. I attached the fixed version of the dll.
Stemmer.Cvb.Forms.zip (58.1 KB)
Cheers, Tim
I tried using the new DLL, but I’m still encountering incorrect height.
I’ve uploaded my project here.
WindowsFormsApp1.zip (472.4 KB)
Hello @sbphsho
can you check which Stemmer.Cvb.Forms.dll gets loaded in your project?
While debugging go to Debug->Windows->Modules and check the path of the dll. My guess would be that the old dll is still taken from the GAC. You can try replacing it with the new one there.
I replaced the old version DLL from the GAC foldder and it worked, thank you.