The World’s Largest Online Community for Developers

'; OCR in C#::powershell windows form designer - LavOzs.Com

Unable to bind code in c# with powershell's form designer.

I've been following tuttorial ( on how to build an OCR. Since my choice of ide is VSC and as it turned out there wasn't any integrated form designer like in standard Visual studio that's being used in the tutorial - the powershel extension was downloaded and installed.

This is how PS's form designer will look like when you try to add some code in it

In case, when i try to add some logic to the form and, for instance, double click on Button it seems that code in C# that supposed to go here $bttnOCR_Click = { } doesn't seem to be working. Assuming, as long as file with .ps extension it won't accept code in C#.

code itself looks like this: if(openfileDialog.ShowDialog.() == DialogResult.OK) {}.

Is there a way i can use code in c# binded together with form designed in powershell inside visual studio code?

How do I calculate someone's age in C#?
What is the difference between String and string in C#?
Cast int to enum in C#
How do you give a C# Auto-Property a default value?
How do I enumerate an enum in C#?
What are the correct version numbers for C#?
Determine installed PowerShell version
PowerShell says “execution of scripts is disabled on this system.”