|
Hi All,
I am working on a project that host WebBrowser control using C#. Objecive of this project to automate
webBrowser. I have the element that, I want to be click automatically. Please Help!!
//Browser name = LPBrowser
mshtml.IHTMLDocument3 doc = (mshtml.IHTMLDocument3)this.LPBrowser.Document.DomDocument;
doc.getElementById("newlink").click(); //This click() method doesn't work me
A.Asif
|
|
|
|
|
I recall some issues with this as well, at least with the managed wrapper of the WebBrowser control (e.g. System.Windows.Forms.WebBrowser). I ended up using reflection and invoking it, and it seemed to work then. Something like this:
IHTMLElement2 element = doc.getElementById("newlink");
System.Reflection.MethodInfo clickMethod = element.GetType().GetMethod("click");
clickmethod.Invoke(element, new object[0]);
Try the above and see if it changes anything.
|
|
|
|
|
i had a video encoder which had a http server on it.
when opening the browser you can see the video stream in it.
i need to extract the video stream (mpeg4) so i can make some processing on it.
thnx
|
|
|
|
|
Hi,
I am developing a windows control library in C# and I have to display the serial number of some cards that are connected to the system. I have written the code in the windows control library class that retieves all the data. Now inorder to make it show properly in the properties box in Visual Studio when I am using the control I had to write another class that is a TypeConverter namely StringConverter.
so how does one take the serialnumber array which is just a string array in the windos control library class and give it to the StringConverter class?
Any help would be greatly appreciated
Thanks in advance
|
|
|
|
|
godspeed123 wrote: so how does one take the serialnumber array which is just a string array in the windos control library class and give it to the StringConverter class?
You need to specify some attributes for the property to get the collection editor on VS IDE. Take a loot at this article[^] which explains how to set the collection property, It's an ASP.NET example, but same can be used for windows library.
|
|
|
|
|
I need to consume a web servcie but when i try to access it through my code or through command prompt for generating proxy classes it gives me error
underlying connection was closed : unable to connect to remote server
If i send the same soaprequst to online webservice thorugh then i get the successful response back.
Please help me out.
neoms21
|
|
|
|
|
I'm working with upgrading a legacy system that has an archaic way of consuming web services.
I've played around with generating stub classes with the wsdl.exe utility that Microsoft provides for us, and I was wondering if anyone else uses this utility to do their job, and, if so, do you always leave that code unedited?
|
|
|
|
|
Yes and yes. If you edit your code and then do a re-gen, then you will lose your edits.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Yes
Yes. Why would you edit the code?
|
|
|
|
|
I would prefer not to edit it, but I was just making sure that everyone was comfortable with that automatically generated code or if they felt something else was better for whatever reason.
|
|
|
|
|
First off, i got a question about adding a tab that will open up like this.
Opened[^]
But it looks like this before you open the tab.
Before it's opened[^]
Would that be possible or do i need that tab layout that it provides on defualt, i'd rather have it look like the one on the X-fire program.
Then inside of it i would like to put in buttons, 112 in total, to change the media player's video to another site.
But what i tried didn't work, i figured it was just like a webBrowser but it said Navigate command not valide with axWindowsMediaPlayer.
Anyone help me out with this?
-- modified at 15:50 Wednesday 17th October, 2007
Also, how do you make it so the user cannot resize the program, i already have minimize and maximize keys turned off but they can still resize it.
|
|
|
|
|
C# Beginner Nick wrote: First off, i got a question about adding a tab that will open up like this.
That's not a tab, it's a child window.
C# Beginner Nick wrote: Then inside of it i would like to put in buttons, 112 in total, to change the media player's video to another site.
112 buttons doesn't seem like good UI to me. You can put whatever you like in your child form. To keep it docked, you'd handle the parent's move event and keep the position in sync.
C# Beginner Nick wrote: i figured it was just like a webBrowser
Don't guess, read the docs.
C# Beginner Nick wrote: Also, how do you make it so the user cannot resize the program, i already have minimize and maximize keys turned off but they can still resize it.
Change the border of the form from sizable to something else.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Child window? How would I be able to put that in, is that a special tool you need to find in the Add Tool Items box?
I need 112 buttons for every episode of a show.
And it be in a box where only 10 show and there is an arrow up and arrow down to see the rest of the buttons. Can you do that?
I searched but never found anything, gave me a bunch of links to media players and differnt C# codes.
Alright thanks, i'll try that.
Thanks for you're help i'll try and see if it works
|
|
|
|
|
C# Beginner Nick wrote: How would I be able to put that in, is that a special tool you need to find in the Add Tool Items box?
A child window is just a form.
C# Beginner Nick wrote: I need 112 buttons for every episode of a show.
And it be in a box where only 10 show and there is an arrow up and arrow down to see the rest of the buttons. Can you do that?
I'd use a listview
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Alright you said it was just a form, i created a new form, put the listview in it. How would i make it a tab, when pressed it opens?
|
|
|
|
|
the button just creates, sizes and positions the form.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Alright you lost me, what button? Just a regular button?
If so, then when it's clicked how do you make it pop open right beside you're program no matter it's location and stay on it even when user try's to move it?
|
|
|
|
|
It sounds to me like you're perhaps a bit over your head with this task.
Any control that fires an event can create a new child form, because an event is fired, you have the opportunity to inject your code.
Like I said, the way to maintain it's position if it's to be modeless, is to handle the position changed event on the parent form and keep moving the child to stay in it's desired position.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
C# Beginner Nick wrote: If so, then when it's clicked how do you make it pop open right beside you're program no matter it's location and stay on it even when user try's to move it?
You can also use child form's load event to do whatever coding you want. And as told to you the other events are also there like position change.
For button from which you want to instantiate this action, you can do programming at button's hover event also.
Chaitanya Joshi
|
|
|
|
|
Ihave a string,I parsed it with the comma in the string.
Now i want to assign the part before the "," to X
and after the comma to Y
How do u get the part before the "," and part after the ","
thanks?
string tmpItem = chckListBox.Items[i].ToString();
//parse the string Names and Phone Numbers
string[] names = tmpItem.Split(',');
foreach (string s in names)
{
MessageBox.Show(s);
|
|
|
|
|
What's inside "names"? It should already contain the part before and after the comma
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
private void btnSend_Click(object sender, System.EventArgs e)
{
for (int i = 0; i < chckListBox.Items.Count; i++)
{
if (chckListBox.CheckedIndices.Contains(i))
{
string tmpItem = chckListBox.Items[i].ToString();
//parse the string Names and Phone Numbers
string[] names = tmpItem.Split (',');
foreach (string s in names)
{
MessageBox.Show(s);
}
I want to get the part before the comma and after the comma seperately.
Thanks
|
|
|
|
|
What does the message box show? Put a breakpoint at the line foreach (string s in names) and take a look what's inside.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
names get null.
The message box shows
name
phonenumber
name
phonenumber
|
|
|
|
|
If names is null then the message box shouldn't get called at all.
modified 12-Sep-18 21:01pm.
|
|
|
|