How to read forms components?

A

Adam Right

Hi,

Can i enumarate the windows form's components? I want to list components on
the screen. Thanks...
(Note: I am using vs2005)
 
G

Guest

I replaced "Exit Sub" with "End Sub" at the end of DoOCR, I believe that is
how it should be.

VB.NET version:
_________________________________
Sub DoOCR(ByRef FileName As String)
Dim cbFunc As SimpleOCX.outputHandlerDelegate
Dim ret As Interger
cbFunc = AddressOf myoutputhandler
ret = objOCR.OCRSetOutputHandlerX(cbFunc)
End Sub

Sub myoutputhandler(ByVal infotype As Short, ByVal param As Short)
End Sub
_________________________________

C# .NET version
_________________________________
void DoOCR(ref string FileName)
{
SimpleOCX.outputHandlerDelegate cbFunc;
int ret;

cbFunc = new SimpleOCX.outputHandlerDelegate(myoutputhandler);
ret = objOCR.OCRSetOutputHandlerX(cbFunc);
}

void myoutputhandler(short infotype, short param)
{
}
_________________________________


Let me add that this code doesn't make any sense as FileName is never
assigned to and myoutputhandler has no code in it.

_________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top