Ad Rotator Windows Form

  • Thread starter Thread starter SouthSpawn
  • Start date Start date
S

SouthSpawn

I have a windows form app that has a web browser control on it. The browser
control will rotate ads in and out. These ads are to be loaded on the local
machine? I know asp.net has a rotator control, but windows forms do not.
Any suggestions on this?

Mark
 
Hi Mark,

If the banner images are on the local machine (which I'd say is the best
approach for a WinForms app), I'd recommend not to use the Browser control
at all.
Instead, use the regular Picture control to load and display the ads. Or,
even better, create a derived or composite control encapsulating the ad
rotation logic (loading a randomly selected ad once in a few minutes, for
example).
 
Dmytro,

I ponder that idea, but there might be times where the ad might be a flash
file, mpeg movie, or other type of content. Therefore a picture box control
wouldn't be the best approach. Any suggestions?

Mark
 
Well, IE anyway uses ActiveX controls to display these types of content, so
your control can do the same. More than that, you will most likely have to
author beforehand (or create dynamically) HTML placeholders for Flash files
or multimedia content if you want to show them in the Browser control.

Why I am so strongly recommend against hosting the browser control is just
because many people complain about a lot of hassle this involves. Just think
that if the user right-clicks over your AD rotator panel, the IE's pop-up
menu will be displayed and the user will be able to do whatever s/he is able
to do in that menu in real IE. The hot keys like F5 will also be intercepted
by the Browser control.
There *are* ways to prevent this, but you should be brave enough to delve
deeply into murky waters of advanced COM interop.
 
Back
Top