473,385 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to read forms components?

Hi,

Can i enumarate the windows form's components? I want to list components on
the screen. Thanks...
(Note: I am using vs2005)
Mar 29 '06 #1
2 1219
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.

_________________________________

"Adam Right" wrote:
Hi,

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

Mar 29 '06 #2
Sorry, somehow I posted this as a reply to the wrong thread.

"Spectre" wrote:
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.

_________________________________

"Adam Right" wrote:
Hi,

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

Mar 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Joshua Russell | last post by:
Hi, Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of...
6
by: Ayende Rahien | last post by:
Excetremely annoying problem, I've an application with a long startup time. So I created another form with my logo in it to as a splash screen. The splash screen is run from another thread and is...
4
by: Bilo | last post by:
I have a Windows Forms Class MainGUI I have declared MainGUI maingui; public System.ComponentModel.Container components = new Container(); in the Class I call another class MediaDriver with...
0
by: Hector | last post by:
I have a ComboBox set up in a non-modal form. When a selection is made from the ComboBox, the handler code closes the form, but then the system crashes because of an unhandled NullReferenceException....
15
by: Joshua Kendall | last post by:
I have a script in which it keeps opening the same form instead of only one instance. I also need help with a form that has a password. Where do I put the actual password? can I use a database for...
5
by: John Bradley | last post by:
Toooo tired to look this one up. I have data that I need to acces in a small program. The data is accessable from an ASP webpage that I created myself. If I need to see data from record #25, I...
7
by: Sergey Poberezovskiy | last post by:
Hi, I created two base forms: frmList and frmDetail, compiled them into a dll, and then want to use in my new project. The problem: When I created new inherited form, say frmClients, I cannot...
11
by: Nick | last post by:
Hello, Please pardon my ignorance as this is something I should know, but I'm a little unclear. I have an MDI based app. It is setup so the user opens a file and the main child form is created....
2
by: Vish | last post by:
Hi, I amplanning on having a rea-only and edit states for my form. But it do not want my form and its controls to look different or disabled. I am planning on having a edit button that brings...
0
by: Jake Montgomery | last post by:
I am using .NET 2.0 forms and running on Windows XP SP2. When I have a tooltip on a combo box, and the combo box is expanded (“dropped down”) using the arrow, it will no longer display it’s...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.