|
Hi Nilesh
I had already used that before I get this problem. I am able to navigate to url addresses using
WebBrowser1.Url = New System.Uri(txtURL.Text)
and after navigating to the site in the txtURL i found there are several links and several buttons. I want to know how I can click on a link or a button on the page so that I can actually simulate the process of someone sitting and clicking on the links.
Thanks for your response.
If anybody can help me out in finding a solution to this problem then it will help me a lot.
Thanks in advance.
Sekhar
|
|
|
|
|
Hi All
I am using a WebBrowser control to navigate to sites in my VB.Net application. After navigating I want to Navigate to some of the links in it depending on some conditions. Can anybody advise how can I collect the links contained in the WebBrowser Document and how can I Raise a click event for a collected link so that it automatically navigates to the link.
I have written the code as bellow :
Dim link1 As mshtml.HTMLLinkElement
link1 = WebBrowser1.Document.Links(10)
Now How can I click the link link1 to navigate to the link.
Please Help. Thanks in advance.
|
|
|
|
|
Hi,
On the Webrowser's click event try
link1.Navigate(URLstring).
Hope this helps.
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
Thanks Adams for your response.
My problem is when I assign the link in the line
link1 = WebBrowser1.Document.link(10)
it doesn't produce any output and the immediate line after this line also doen't gets executed. I think some errors occur in this line and the compiler is not able to track it. for which the focus goes to the exe after this line gets executed. If you can help me out in solving the problem, it will be a great help.
Thanks in advance.
Sekhar
|
|
|
|
|
Hi All,
I have Process ID(PID).
Consider, Iam opening Word Document(a1.doc), It has a PID called 2010.
Then, when i open another file (b1.doc) using the same window again, it shows same pid for both.
How can i get differentiate both the files using the PID?.
Thanks & Regards
Kumaran
|
|
|
|
|
You can't. They're using the same process. A single instance of Word can open multiple documents at the same time, so there's only going to be one process ID.
|
|
|
|
|
I am new to the code project. Can anybody help me in the code for making our application to run before explorer.exe (in Windows XP)? I didn't mean a startup edit..
Please reply..
Help mee
|
|
|
|
|
The only thing that runs before windows starts is the gina.dll, AFAIK.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Help!
Does anyone have a simple (and I mean simple) example of VB calling a C++ DLL with a floating point array parameter where C++ will modify the contents of the parameter? (I'd say "pass by reference" but this is ambiguous when discussing a call from VB.)
I've done this with strings and although it's a little finicky, it definitely works. The online examples either don't compile for truly insidious reasons (thank you MS), or are down level and don't understand SAFEARRAYS etc.
To be clear (hopefully), The idea is: VB program w/array of floating point calls C++ (or C) program that modifies the array. On return to VB, the array is modified.
Thanks.
|
|
|
|
|
I am accessing an oracle table and displaying the table in a datagrid. I am able to add rows to the table and update the database, send queries to the table and retrieve the data and display it in the datagrid. I can not figure out how to delete rows from the datagrid
I want to be able to select a row on the datagrid and click Delete and "poof" the row is gone. In a seperate procedure I will be updating the database table.
I have tried many different ways with no success.
Any one have an idea that would help?
Erica
|
|
|
|
|
Set the rowstate of the offending row to deleted
use a dataview to populated the datagrid
set the dataview filter on the rowstate
|
|
|
|
|
I get an error >
Line 1: Incorrect syntax near 'Username'
When i run the code below
hdstr = "SELECT Password FROM LogIn WHERE Username='" & UsernameTextBox.Text & "'"
hdcmd = New SqlCommand(hdstr, hdcon)
hdcmd.Parameters.Add(New SqlParameter("Username", UsernameTextBox.Text))
Dim usr As String = hdcmd.ExecuteScalar()
Please help.
JESA
|
|
|
|
|
hdstr = "SELECT Password FROM LogIn WHERE Username= @UserName"
hdcmd = New SqlCommand(hdstr, hdcon)
hdcmd.Parameters.Add(New SqlParameter("@Username", UsernameTextBox.Text))
Dim usr As String = hdcmd.ExecuteScalar()
|
|
|
|
|
Thank You.
It worked.
JESA
|
|
|
|
|
I'm having problems understanding why a loop is needed to read from a deflated stream. i've replaced the read all bytes in stream method with the following line, however the data in the output buffer is 1 byte smaller than it was before the data was compressed:
Return stream.Read(buffer, 0, buffer.Length)
used to be:
Dim offset As Integer = 0<br />
Dim totalCount As Integer = 0<br />
While True<br />
Dim bytesRead As Integer = stream.Read(buffer, offset, 100)<br />
If bytesRead = 0 Then<br />
Exit While<br />
End If<br />
offset += bytesRead<br />
totalCount += bytesRead<br />
End While<br />
Return totalCount
the full code for this is taken from http://msdn2.microsoft.com/en-us/library/system.io.compression.deflatestream(VS.80).aspx[^]
|
|
|
|
|
The Read method doesn't have to read all data that you request. It returns the number of bytes actually read, so you have to loop until you have filled the buffer or until the method returns zero.
Dim offset As Integer = 0
Dim bytesRead As Integer
Do
bytesRead = stream.Read(buffer, offset, buffer.Length - offset)
offset += bytesRead
Loop Until bytesRead = 0 Or offset = buffer.Length
Return offset
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hi
This is Rajesh. I developed a vb 6.0 application. In that i want to access my database server table via web service in vb.net 2005.
I tried some methods for last two weeks.Please someone assist me
Thank you
c.Rajesh B.E
|
|
|
|
|
Google results for "vb6 calling a web service[^]". Since VB6 doesn't natively support this, you have to use other libraries and coerce a solution into working.
Some these involve using the native web service support built into the .NET Framework and writing a component in VB.NET that is exposed to COM, and writing the VB6 code to use that component. Other's depend on using various SOAP libraries to do this.
No, I don't have any examples. I stopped using VB6 the day I got my hands on the .NET Framework 1.0 Beta 1, some 6-7 years ago.
|
|
|
|
|
I've used the MSXML3.DLL libraries with no problem at all.
Just download the file. You can also get the SDK version. Once you have the file, set a reference to it. View its methods in the object browser and you can read the docs online.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
I have a VB 6.0 exe. It reads data from an excel spreadsheet and writes to it as well. So, the excel spreasheet is like a database for it. Presently, the spreadsheet resides in a LAN.
Now I want to "INJECT" the excel spreadsheet into the executable, so that the excel spreadsheet is not a separate entity anymore, and is a part if the executable itself. Basically, how can I turn it into an intrinsic application resource?
Can someone please shed some light on how I can do this?
Thanks.
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
The short answer is, you can't. An .EXE, when running, cannot be modified.
The entire idea, though noble, isn't practical. You should be seperating code from data, not integrating it.
|
|
|
|
|
Thanks Dave. I understood that.
Actually, I intend to hide the excel spreadsheet from the user. And when I say hide, I don't mean just physically (as in changing the file attribute to hidden), but logically as well. I.e., the user should not be aware at all that there is an excel spreadsheet involved.
With that said, is there a way to covert the spreadsheet into a resoucre of some sort? Like a dll or something which will contain the spreadsheet.
Everytime the exe runs, the EXE will "upack" the spreadsheet from the resource and when done editing, it will "repack" it into the resource. Any clues regarding this mechanism?
Sorry for such vague statements, but I think I've captured the essence this time.
Thanks.
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
Bulky Fellow wrote: Everytime the exe runs, the EXE will "upack" the spreadsheet from the resource
Yeah, putting the sheet into a resource is no problem - at compile time.
Bulky Fellow wrote: it will "repack" it into the resource.
Putting it back into the .EXE or .DLL at runtime is the problem. Using normal methods, once the .DLL is loaded, the file is locked until the termination of your app. Again, it can't be modified.
You MAY be able to gleen something useful from the app in this[^] article though. It copies resources between .EXE's and .DLL's, but there's a lot of hoops to jump through.
|
|
|
|
|
Hi, i have developed net browser in vb.net, using webbrowser control. My problem is, when i click on go button for navigating the url, if there is no internet connection is available, or server is not reponding, the webbrowser will show the default page of Internet Explorer that is page not found. i want to use my own page instead of this default Internet Explorer page,how can i do this???
thx in advance....
King
|
|
|
|
|
You've developed a new browser using the supplied web browser control? Why?
|
|
|
|