I have taken a project to write an adware (not spyware! this is ethical and legal) program for a company.
Basically what this company wants is to give away free stuff in exchange for people downloading the adware which displays ads when a user browses the internet.
What I have to do is create the program that will open a new instance of IE every time a certain URL is displayed in the address bar.
So if the user goes to http://google.com then a certain ad will pop up (this software is connected to the internet so it knows what to pop up)
My question is where to start? Should I be using VB.NET for this program?
I haven’t quite done anything like this, I just want some to point me to a couple of resources on how to get started.
Yes, you can do this via VB.Net. You need to use the InternetExplorer object. It exposes many properties that allow you to automate IE.
To use these objects you will need to add a COM reference to your project for Microsoft Internet Controls. Different versions of IE use different dll’s; IE7 is ieframe.dll, IE6 is SHDocVw.dll. To make your code work on both versions you should avoid using any IE7 only features and use late binding / COM interface instead of early binding.
One issue you’ll run into is that the InternetExplorer object only creates new instances, it doesn’t connect to existing ones. Here’s some code that will allow you to connect to the existing objects: