|
I'm constantly receiving this "Old format or invalid type library" error when trying to work with an Excel.ApplicationClass object using System.Runtime.InteropServices. I made all the settings using DCOMCNFG and REGEDIT. I checked the regional language settings for my computer and for Office (they are both en-US now). What does LCID (locale identifier) exactly mean and where should I use it to get my app errors free?
wladutti_cellular_daemon
|
|
|
|
|
Hi guys, I have a program (in Visual studio 2005) that interacts with a webBrowser component, it needs to press buttons on webpages in that webBrowser, so far I have done this by focusing on the button then programmatically pressing "enter" as follows;
webBrowser1.Document.GetElementById("button1").Focus();
SendKeys.Send("{ENTER}");
This works, but is less than satisfactory, because if the user starts using a different application it fires the "enter" key in the other application. This can mostly be avoided by checking my application has the user focus, but then if it doesn't have the user focus the "enter" is never fired.
Is there a better way of programmatically pressing a button on the webpage?
thanks a lot
Martin
|
|
|
|
|
You could figure out what the button is doing from the Javascript and just call that javascript function directly. I guess the real question is, what are you really trying to do?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
I am making a program to help with editing Wikipedia (you know, the free encylopedia, see http://en.wikipedia.org/wiki/Main_Page). I can get and change the text in the textboxes, but I need to be able to press the "Save page" button when done. For an example of a webpage I am trying to press a button on see http://en.wikipedia.org/w/index.php?title=C_Sharp&action=edit
hope that explains it a bit more. thanks
|
|
|
|
|
Hello,
Can you show me a snippet to post form data from Windows form to a URL thru a webbrowser control so that the post result will be returned to that webbrowser.
Thanks
|
|
|
|
|
I don't have access to my code at the moment but I have successfully done this by navigating to the button's HtmlElement object in the document and then invoking the InvokeMember() method:
HtmlElement elt = webbrowser1.Document.GetElementsByTagName("INPUT")[0];
elt.InvokeMember("Click");
Now, that's rough approximation. You may have to make to changes to get it to compile. But you get the idea.
-- modified at 17:15 Wednesday 26th April, 2006
|
|
|
|
|
Hello everybody!
I'm trying to create a dynamic table to store data retreived from a prosthetic robot arm about its environment (im doing robotics research). Basically using a fuzzy logic AI i want the system to remember what it encounters, group similar objects and be able to ask question about new objects, or identify objects.
This is a multi-dimensional problem to say the least, each finger has an 8*8 array of tactile (touch) sensors, and an overall force exerted sensor. I haven't decided if im including some in the palm yet, just waiting to see how hard playing with fingers is
I am trying to remember the data encountered and the labels associated with them in the systems memory. I've made this currently using a multi-dimensional array with malloc statements and it works. Unfortunately it is hard to manipulate and does not travel between programs well, because of this I would like to create the same setup using container classes, or possibly the new and delete statements. Also because of the size of the system its hard to publish here.
After looking at the new and delete statements they do not have a realloc equivalent, this is essential because every time the system encounters a new label it must expand the array (or table etc.). And so I am back to container classes, or any other idea you throw at me, but I do not know how to use them.
Do you know an example of the kind of thing I am creating, or possibly a good book to start me off on? Even better, I'm sure that the actual syntax (for creating, resizing and removing a multidimensional memory system) cannot be more than a few lines, if it is this simple could you please write it down for me?
One other thing, it can't forget anything whilst resizing, and I must be able to manipulate each part individually...
Please shed some light on my project!
---------------------------------------------------------------
"Little creatures of nature, they don't know that they're ugly"
-- modified at 11:11 Thursday 9th February, 2006
|
|
|
|
|
There are several types of collections that you can use for handling lists of dynamic size, like ArrayList, HashTable, Queue, SortedList, ListDictionary, HybridDictionary, NameValueCollection, et.c. It all depends on how you want to access the data. If none of the list types meats your requirements, you can easily extend some of the list classes and add the functionality you need.
---
b { font-weight: normal; }
-- modified at 11:53 Thursday 9th February, 2006
|
|
|
|
|
Hi @ all,
after reading the sources of the Webcam project like Motiondetection und Webservice I think I understand how to get a picture from my Webcam. But how can I get the Live Video from my Webcam? Like the one you see in the Eindows Explorer by clikcing at your Webcam? I saw a Delphi Code where the LivePicture was associated with a Panel and so the LivePic was in the Panel. But how can I do that with C#? In all Projects here they use the camserver.dll but how can I do that with own code? Can anyone help me?
Thank you so much
twickl
|
|
|
|
|
I cannot figure out how to trap the event that occurs when a Panel is scrolled by the user either vertically or horizontally. I have AutoScroll set to true.
What EventHandler do I use?
Thanks,
Mark
|
|
|
|
|
|
That's the problem! There doesn't seem to be a Scroll event available that I can override or one that I can set up a delegate to.
What am I missing here?
Mark
|
|
|
|
|
I'm looking at Visual Studio 2005 with .NET 2.0, and there is a Panel.Scroll event. Perhaps there wasn't such an event in .NET 1.1? Or perhaps it is hidden (much like some of the RichTextBox events)...
In any case, there's always custom controls you can use, such as this one[^] that should suit you.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
-- modified at 12:17 Thursday 9th February, 2006
|
|
|
|
|
Hi,
Simple question for experienced programmers, I think.
I used to work with Visual Studio 2003 in combination with .NET framework 1.1
The development webserver now runs .NET framework 2.0
Now I've installed .NET Framework 2.0 on my development computer.
But when I try to create a new C# web application project on the server, VS tells me that the server does not have .NET framework 1.1, which is true.
What do I have to do to make .NET framework 2.0 the default framework in Visual Studio for new projects?
Greetings
Henk
|
|
|
|
|
redkite wrote: What do I have to do to make .NET framework 2.0 the default framework in Visual Studio for new projects?
You upgrade to Visual Studio 2005. AFAIK, there is no way to get VS 2003 working with the 2.0 framework.
|
|
|
|
|
I am trying to create classes with Shared methods for use with .net and VB6. Does anyone know how to expose the shared members to COM???Thanks
CSMOD
|
|
|
|
|
Firstly, you keep saying "shared", yet there is no "shared" in C#. There is a "shared" in VB.NET, is that what you need? The C# equivalent is "static".
As far as getting your .NET code exposed to COM, have a look at this MSDN article on .NET/COM interop[^].
|
|
|
|
|
Don't cross post. Especially as this is clearly a VB question, and has nothing in the C# forum to do.
---
b { font-weight: normal; }
|
|
|
|
|
In a web application (ASP.NET 2.0), I want to send the correct HttpResponse.ContentType of a file I'm streaming to the client, based on the file extension of that file.
E.g. ".jpg" == "image/jpeg"
Is anyone aware of such a built-in function in the .NET Framework?
--
Affordable Windows-based CMS for only 99 €: try www.zeta-producer.com for free!
|
|
|
|
|
How can I avoid the default node selection in a TreeView in C#? I mean I don't want that the first node of the tree to be selected for the first time when the TreeView control gets the focus.
|
|
|
|
|
Well if you want the selection to stay the same and appear selected even when the TreeView does not have focus you can write your own ShowSelectAlways property using the Win32 API SetWindowLong function like this
private bool mShowSelectAlways;
public bool ShowSelectAlways
{
get
{
return (mShowSelectAlways);
}
set
{
mShowSelectAlways=value;
if(value == true)
{
int style = GetWindowLong(this.Handle, GWL_STYLE);
style |= TVS_SHOWSELALWAYS;
SetWindowLong(this.Handle, GWL_STYLE, style);
}
else
{
int style = GetWindowLong(this.Handle, GWL_STYLE);
style &= TVS_SHOWSELALWAYS;
SetWindowLong(this.Handle, GWL_STYLE, style);
}
}
}
If you want to change the selected node each time the TreeView receives focus then just handle the OnFocus event and make your node selection.
I hope this helps.
Andy
Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons
|
|
|
|
|
|
.NET COMPACT FRAMEWORK
I am trying to open database which content is more than 10 000 rows.
I using DataSet but loading is too long . Can anybode help?
PIUS X, rpiusx@hotmail.com
|
|
|
|
|
Using a data set means that the results of the query are loaded in their entirity into the dataset first before you can do anything with it. This can take a long time (as you've seen) and take a lot of memory.
There isn't an easy solution for this.
Could you consider using a DataReader instead and processing the data one row at a time? Do you need all 10,000 row in the dataset? Could it just be that the query is very complex and the database needs the time in order to find the relevant rows?
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Did you try executing the query by itself (like in Query Analyzer) to see if it is the query that takes a long time to execute?
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|