|
I'm using a WebBrowser Control to log into a website and download financial statements. I have IE6 installed and am using VB 2005 Express Edition. My problem is that I cannot suppress the dialog box which states "Security Alert - You are about to be redirected to a connection that is not secure".
I have tried hacking the registry without success (I understand WebBrowser Control uses standard IE6 SP1 settings) and cannot use SendKeys as I need this to run in the background. I can't see that CoInternetSetFeatureEnabled has the correct feature either. My last resort was to try IDocHostShowUI::ShowMessage but I can't find any sample code for VB to try out.
Having wasted around 12 hours of my life trying to find a solution i'm happy to make a financial donation to the first person to help me solve this issue!
Many thanks in advance,
Jonny
|
|
|
|
|
Hi Jonny,
If this is a task that should occur in the background, you might have a lot more luck with the System.Net.WebClient class.
Hope this helps,
|
|
|
|
|
Thanks for that Mark. Unfortunately i've already got quite a sizeable amount of code based around the WebBrowser control. If I can't find an alternative solution i'll certainly give the Net.WebClient class a go though.
Jonny
|
|
|
|
|
My VB .NET app is causing an unhandled exception. When I look at the exception details, it shows me the hex address where the exception is occurring. How I determine where in my code this is happening given an address?
Thanks
|
|
|
|
|
Look for code that calls a COM object, and set breakpoints to work out which one it is.
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 )
|
|
|
|
|
The exception is an "invalid typecast". I'm sure it is in my code. I don't believe it has anything to do with COM. Is there some sort of map file that that I can look at to find the method that contains the offending address.
I don't have the debugger on the target machine. An I'd rather not put it on the target. What if the exception happens out in the field? I'd like to be able to find the problem given the offending address.
|
|
|
|
|
If you have cought an exception, you should look at all the information it contains, by
dumping its ToString() result, not jsut its Message. That will give you, amongst others,
a full stack traceback (including file names and line numbers if it is a debug build
with PDB file available next to the EXE/DLL files).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
No, no, no... My app did not catch the exception. So I don't have any idea where to look in my app. The OS, or whatever catches unhandled exceptions, caught the exception and that dialog tells me the address of the where the exception occurred. Now I'm trying to determine where in my app that address is.
|
|
|
|
|
OK, then I suggest you improve the exception catching in your app:
- add a try-catch in your Main() method;
- handle AppDomain.CurrentDomain.UnhandledException event;
- and handle Application.ThreadException event.
Doing all this, you should catch everything except maybe a few drag exceptions.
For each of them, you could do a MessageBox.Show(...Excecption.ToString()...);
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Should be obvious, but what's the best way to find in a datatable the row index where Column C has Value "X"?
Thanks
|
|
|
|
|
Hi,
Dim sql as String = "SELECT ID FROM TABLENAME WHERE C = 'X'"
Dim cmd as New SQLCommand(sql, connectionstring)
... open connection...
Dim idx as integer = CInt(cmd.ExecuteScalar)
Msgbox idx.ToString
hope this helps
|
|
|
|
|
Im working on a screen capture program that records a movie of your desktop, using the article here:
Screen Capture
It works all fine and dandy, but is it possible to make a red circle follow the cursor? So, whenever the cursor moves, there is a red circle behind the cursor so whoever watches it, always knows where the mouse is. Would I use GDI+ or something? I have no idea. Or would I have to make another cursor, in say photoshop?
Any help is appreciated.
|
|
|
|
|
I imagine you'd change the cursor using a new Cursor file.
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 )
|
|
|
|
|
Hello,
I am doing development for a windows mobile device using Visual Basic 2005.
The customer want to be able to download the data from the main database and be able to work off-line.
So I have decided that all the data that is download will be written to a xml file that can be read by a dataset. Also use the dataset to write changes.
When the user goes online the changes they have made to the off-line xml file will need to update the SQL database, I will use the getChanges of the dataset to sync with the central database (SQL Server 2005)
However, the user will be using a wireless and I will need a condition in my code that will detect if the wireless gets disconnected so that they can use the off-line data in the xml file that can be read in by the dataset.
I am not sure how I would detect the wireless being disconnected, as this will disconnect from the sql server database?
Any advice would be most helpfull,
Many thanks,
Steve
|
|
|
|
|
Can any one send me the VB 6.0 / VB.Net code for closing a running exe application without promting confirmation? Thanks & Regards
Nasim Ahamed Munna
Programmer
|
|
|
|
|
|
i want to make such a programme that can detect hard drives of my computer.
but i gott some link by using folder properties.
---------------------------------------------------------------------------
My PC is having 4 hard drives >> C,D,E,F.
Now can i give command like >>
if there r 4 drives then store their name as DRIVE 1,DRIVE 2,DRIVE 3,DRIVE 4.
iF THERE r 3 drives then store them in DRIVE 1,DRIVE 2,DRIVE 3.
it means 1st it should detect drives.... n them store them in variables.
PLUS
how can i change the font colour of FOLDER??
Plz help needed as early as possible
--------------------------------------------------------------------------
( ( ( (
|
|
|
|
|
There's a property available that lists all available drives, find info here[^].
To change the details of how a folder is rendered, you create a config file that lives inside the folder. I'm not sure what is possible, I know you can set a bitmap for the folder.
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 )
|
|
|
|
|
Christian
So you got sick of asking people to Google the ? first - what a cool answer...
|
|
|
|
|
Hi all,
I'd like to make a bluetooth manager application (VB2005) but I can't find documentation in the .NEt 2.0 framework about how to connect to bluetooth devices and what kind of information and operations can be retrieved and done. Do you know any article that talks about it?
Thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
hi
can anybody help to me how to write report in vb.net 2005 ?
Thanks
bye
|
|
|
|
|
What type of report do you have in mind? Do you want to generate:
- Microsoft Access Report
- Crystal Report (.rpt)
- Generate Yourself and write it to print document
- Other type?
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
hi
i want to generate crystal report in vb.net . is there any inbulit facility of report writing except crystal report ?
Thanks
bye
|
|
|
|
|
Hi all,
I've created a form which is in English, and would also like it to be displayed French and Spanish via a combobox?
I have created a combobox(cboLanguage) and added English, Franch & Spanish too it and added the following code:
Dim Language As String
Language = cboLanguage.Text
If Language = "French" Then
Me.lblTitle.Text = ("Titre")
Me.lblFirstName.Text = ("Prenom")
Me.lblLastName.Text = ("Dernier nom")
Else : Me.lblTitle.Text = ("Title")
Me.lblFirstName.Text = ("First Name")
Me.lblLastName.Text = ("Last Name")
End If
This all works Ok, but can be very time comsuming esp if your doing muliple Languages on many forms.
Can anyone tell me if there is a simlpe way for doing this???
Many Thanks
Ian Wells
-- modified at 8:34 Sunday 9th September, 2007
Ian Wells
|
|
|
|
|
You factor out all of your display strings into a config file, and then create a different file for each language. Then, once your code selects what file to get it's values from, it's just going to work everywhere.
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 )
|
|
|
|