|
If the search box has an ID associated with it then you can use:
WebBrowser.Document.All["id"].InnerText = searchString
Basically this retrieves the HTML element with ID "id" and replaces the text with searchString .
To select the textbox you can use the Focus method of the HtmlElement class to move the focus to the TextBox. To select all the text, perhaps the easiest solution would be to use SendKeys to press Home, Shift + End which will select all the text.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Has anyone actually accomplished this before? If so, can you lead me the way to get it done. I don't need a full blown OCR server or API that cost hundreds or thousands of dollars I just basically need to know if I can parse out a section of printed text on an enrollment form. An id is assigned to a mailing and when the form comes in the person keys in the id on the screen and the image is pulled up. I want to eliminate the need for them to even key it in to prevent from keying a wrong number. Thanks in advance and all I'm looking for is an answer of yes this can be done.
|
|
|
|
|
It's certainly do-able, but you'll spend a lot of time in development, and I'm willing to bet the results will never be 100% perfect.
My advice is to rethink. I've actually worked on projects like this before (speeding up data entry), and the quick, cheap, easy solution is to use barcodes. When the letter is generated, a barcode is printed along with the number, then all the data entry monkey has to do is point it at a barcode scanner upon reciept and hey-presto you're done.
HTH,
Martin.
-- modified at 14:52 Wednesday 24th May, 2006
Typo.
|
|
|
|
|
Thanks Martin, I will definitely look into doing it the barcode way.
|
|
|
|
|
Hi guys, Im looking to create a chat app, based around using webcams - Anyone know where I can find out about this, any guides or tutorials about webcams and streaming to other pcs etc?
Cheers, Ben.
|
|
|
|
|
Maybe the following may help:
WebCam C#
WebCams through WIA
BTW, I just searched for "WebCam +C#".
Regarding streaming maybe VideoLan may be worth a look.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Cool thanks
|
|
|
|
|
Hallo guru's,
can somebody give me a short hint what the difference is between the TreeView-Control and the TreeView-Class?
Thanks for your help
|
|
|
|
|
A TreeView is a Control . There's no separate TreeViewControl class.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
|
They are the same thing, just different termnology. In MSDN I think there is a seperate TreeView Control and TreeView Class entry, but they are talking about the same thing. The Control entry gives you general info of the control itself while the class entry gives you all the "behind the scenes" stuff.
If you add a TreeView control to your form then you are actually adding an instance of the TreeView class to your form class.
|
|
|
|
|
|
I have a ComboBox who’s DropDownStyle is DropDown.
This allows the user to type the first few characters and hit the tab and the visible text on the screen (combo box text area) changes to the item selected. However, the comboBox.Text does not change, nor does the selected index.
Setting AutoComplete makes matters worse. This causes the visible text to be blank.
The only way things seem to work is if I set the dropdownstyle to DropDownList; however this allows only 1st character selection, then the user has to scroll to the appropriate item. Not user friendly.
I must be doing something wrong but am at a loss.
Cheers...Del
|
|
|
|
|
|
Apurva,
Thanks for the response. My problem is with windows forms not web forms. On the surface things look great. Just seems that selectedindex and text fields are not altered....
Cheers...Del
|
|
|
|
|
Hello,
I wonder if it's possible to point to a set of parameters or values when calling a function with a delegate. I have 2 forms and I pass delegate to call functions from form1.
lets say on form2 i have:
public delegate bool CallFuncDelegate();
private int generalX, general Y;
public bool Call(delegate, int a, int b)
{ generalX = a;
generalY = b;
invoke();
}
public bool Func1()
{ int localX = generalX;
int localY = generalY;
....
}
public bool Func2()
{ int localX = generalX;
int localY = generalY;
....
}
On form1 i will assign Func() to the delegate and call it thru Call():
form2.CallFuncDelegate CFDelegate = new form2.CallFuncDelegate (form2.Func1);
AF.Logon(CFDelegate, 1, 2);
form2.CallFuncDelegate CFDelegate = new form2.CallFuncDelegate (form2.Func2);
AF.Logon(CFDelegate, 8, 9);
So is there a way to call Func() in form one and at the same time tell which parameters to use in form2?
so it's gonna be like this on form2:
public delegate bool CallFuncDelegate();
setofParam1{int generalX =1; int generalY =2};
setofParam2{int generalX=8; int generalY=9};
public bool Call(delegate)
{
invoke();
}
public bool Func1()
{ int localX = setofParam1.generalX;
int localY = setofParam1.generalY;
....
}
public bool Func2()
{ int localX = setofParam2.generalX;
int localY = setofParam2.generalY;
....
}
On form1:
form2.CallFuncDelegate CFDelegate = new form2.CallFuncDelegate (form2.Func1);
AF.Logon(CFDelegate); // and then activate set1
form2.CallFuncDelegate CFDelegate = new form2.CallFuncDelegate (form2.Func2);
AF.Logon(CFDelegate);// and then activate set2
Sorry for being a little bit confusing. I want to do that because sometimes Func() can have less or more parameters and that required me to change the Call() and it's signature.
Donkaiser
|
|
|
|
|
|
Good day eveyone,
Is there anyone know how to implement Heap data structure by using ArrayList?
Or you know any sample project?
Pls help if you're interested in, thanks so much
eric
|
|
|
|
|
Hi All,
I have a couple of questions regarding Datasets, which I hope y'all might be able to help with.
1) In my (ASP.Net 2.0 / C#) web application I'm accessing a database - all well and good so far. Because I'm just starting out with C# and DB programming, I created a (one) DataSet to represent the whole database, and added methods to each TableAdapter to facilitate Selecting, Updating, Inserting etc, which I can access from my code - which is a seriously cool feature!
Am I going to lead myself into a lot of trouble doing this? Should I split the DataSet down to some logical smaller DataSets - or will this not affect performance?
2) Given that this is a web application and could potentially have lots of users (in reality I expect about 10 max) should I consider making the DataSet (which I think is my Data Access Layer?) a Singleton to prevent the WebServer having to run hundreds, even thousands of instances - if so, how do I do this, as I can't seem to find any C# code in the DataSet code, just loads of XML?
3)In one of my DataAdapter methods I'm Inserting a Row into a table. One of the fields is a foreign key of another table. In order to make the experience nicer for a user, a Listbox provides the friendly name of the Primary Key (ie "Green Pool Table" rather "102"). I thought it would be possible to include a SELECT statement into the VALUES clause of an INSERT statement to perform the lookup for me, but the following doesn't seem to work:
INSERT INTO [tblAssets]
([AssetSerial], [AssetTypeID], [AssetStatusID], [OwnerID])
VALUES (?, ?, ?,
(SELECT AssetTypeID
FROM tblAssetTypes
WHERE AssetType = @ Namen))
...the QueryBuilder chucks this out as invlaid. I'm using Access for my dev system, but is this wobbly SQL or would it work in a different RDBMS? (And if there's a better way of doing it, please shout!)
Thanks,
Martin.
|
|
|
|
|
Firstly let me say that I havn't done that much with ADO.NET but here are my suggestions. Secondly thank you for asking specific questions and itemising them to make it easier for people to help, there have been lots of people recently who don't do that and you've made me realise why I help people out
Utini wrote: Should I split the DataSet down to some logical smaller DataSets
I would suggest this as it reduces redundancy in the data, it all depends on what you are trying to achieve and how the DataSet is actually structured.
Utini wrote: will this not affect performance?
All changes affect performance but I shouldn't think that it'll be too noticable.
Utini wrote: should I consider making the DataSet (which I think is my Data Access Layer?) a Singleton
If you're only going to get 10 then I wouldn't bother unless the machine isn't that powerful and/or is running other services. Try both out and use your judgement.
Utini wrote: can't seem to find any C# code in the DataSet code, just loads of XML?
The DataSet is XML but if you use the "Show All" button in Solution Explorer then there should be a file named the same as the dataset but with a .cs extension. This will have been autogenerated by the IDE.
Utini wrote: 3)
Can't you use DataBinding to set up a bound listbox, rather then filling it yourself. I'm not a wizz on SQL and infact have never used INSERT statements so I'm sorry that I can't help you.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Thanks for the reply Ed.
I think my understanding of DataSets is a bit suspect - basically all I've done is drop each table in to the same Dataset file. I'm not sure if this good or bad, but the database itself is pretty well normalised, so I guess it shouldn't matter too much.
I'll also investigate the performance implications - I may even write an article on it
The DataBinding idea is definietly a good one - I hadn't realised that you could have a Data and View column in them - thanks!
|
|
|
|
|
Not a problem, I don't have much use for DataSets (or DataBinding for that matter) since I tend to write more utility like programs than database (just finished my A-Level project which had to involve a database (never again))
Famous last words...
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Well, if you ever get into paid development you'll be using databases and nothing but (unless you're lucky enough to do something cool like games programming!)
|
|
|
|
|
Almost all of the paid programming I've done doesn't involve databases. I've written several utilities for programming systems, e.g. one for programming a lighting controller, one for programming a medical electronics system. And a hell of a lot of embedded C stuff.
But then again I'm going to begin my Electronics Masters this October so this type of programming is more my scene and I have more connections in this field than in the "Computer" (i.e. pure software) field.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
I've created a program that make a c# class.
Can i inlcude with my application a free program that produce a .dll file?
|
|
|
|