How could i use an iMac as secondary monitor for a Windows 7 laptop Recently (less than one year ago) i bought an iMac 21,5".
Now i would like to use it as secondary monitor for my laptop. (My laptop runs Windows 7).

Is it possible? (I found conflicting opinions on the web, even on the Apple forum).

What type of cable do I need?
(I will appreciate also a link to the product on some online store: amazon, ebay etc.)

Thank you in advance.

UPDATE:

I tried air display... i'm not satisfied at all...

typical scenario: browser window on the main Windows laptop, dev tools/firebug on the secondary iMac screen.
The mouse goes fast between the 2 screens (GOOD), but when i changed the selected tab nothing happens. I had to drag the dev tools window to the main screen to get an update of the selected tab. 
My test is ended here.

I'm still waiting for other answers. 

I will prefer an answer that suggest me what kind of cable i've to buy, and where i can find it on the web.
Thunderbolt-equipped iMacs prior to iMac (Retina 5K, 27-inch, Late 2014) (see this document), like your iMac (Mid 2011), support Target Display mode:


  Target Display Mode lets you use your iMac as the external display for
  another, “primary” computer.


Thunderbolt-only solution

NOTE: This won't work for iMac (Retina 5K, 27-inch, Late 2014) and later iMac models as they don't support Target Display Mode.

If you happen to own a laptop with a Thunderbolt port follow these simple steps to extend your display (Thunderbolt to Thunderbolt cable required) (from KB PH4469):


Connect the Thunderbolt cable to the Thunderbolt ports on each computer.
Make sure the iMac and the primary computer are turned on and awake.
Press ⌘F2 on the keyboard of the iMac.


(As a side note: Older iMacs with Mini DisplayPort also support Target Display Mode. The steps to configure and enable Target Display mode are very similar.).

A comment on DVI to Thunderbolt adaptors

You can't use Mini DisplayPort to DVI or VGA adaptors:



to connect a computer with a DVI/VGA port to a Thunderbolt display (from this thread):


  I can confirm that Mini DisplayPort to DVI converter works ONLY from a
  Mini DisplayPort computer port to a DVI display. The reverse direction
  is not supported by those converters, 


There is some hope, though, as the post goes on to say:


  but there are other much more
  expensive ones that will convert DVI computer ports to Mini
  DisplayPort display.


The poster is probably refering to a product mentioned earlier in the thread: the Kanex C247D Single-Link DVI to Mini DisplayPort Converter, advertised like this:


  Connect a (...) LED Cinema Display to your DVI-equipped
  MacBook Pro, Mac Mini, or PC with this (...) Kanex solution.


However, opinions diverge on whether it will work with a Thunderbolt display at all:



  I am sure that Kanex don't do anything that will help you no matter
  how expensive it may be.


  As far as I am aware, and I have done a lot of reading about this, you
  can connect an older display to the new Thunderbolt port of a new MAC
  but you CANNOT connect the Thunderbolt display to anything other than
  a MAC with a Thunderbolt port.  The Kanex thing works from a
  Thunderbolt port into an older display, DVI or whatever but you cannot
  convert MAC DVI into Thunderbolt......I think



I've noticed that the LED Cinema Display is listed as a Mini DisplayPort display (from http://support.apple.com/kb/SP502):



so the adaptor may indeed only work with Mini DisplayPort displays, not with Thunderbolt displays, and as far as I can tell, your iMac will act like a Thunderbolt display.

It's up to you to try it, although $129.90 (as of this writing) is a steep price to pay for the Kanex adaptor just to test it.

Software-based solution

If the solutions described above aren't feasible or cost-effective, you can use several software solutions. One is Air Display:


  Use your iPad, iPhone, Android, Mac or Windows PC as a second (or
  third) monitor with no messy cables or wires




There is a free trial version here.

Note: Windows 7 Starter edition is not supported.