Posted to tcl by mjanssen at Thu Dec 14 10:49:02 GMT 2006view raw

  1. package require winapi
  2. wm title . hWnd
  3. wm attributes . -topmost 1
  4. wm resizable . 0 0
  5.  
  6. bind all <ButtonPress> { . configure -cursor crosshair ; .td configure -cursor crosshair}
  7. bind all <ButtonRelease> {set ::coords [window %X %Y] ; . configure -cursor {} ; .td configure -cursor {}}
  8. entry .td -textvariable coords
  9. pack .td -expand 1 -fill x
  10.  
  11. proc window {x y} {
  12. set handle [::winapi::WindowFromPoint $x $y]
  13. return $handle
  14. }
  15.  
  16. bind . <F5> {console show}