Posted to tcl by mjanssen at Thu Dec 14 10:49:02 GMT 2006view raw
- package require winapi
- wm title . hWnd
- wm attributes . -topmost 1
- wm resizable . 0 0
- bind all <ButtonPress> { . configure -cursor crosshair ; .td configure -cursor crosshair}
- bind all <ButtonRelease> {set ::coords [window %X %Y] ; . configure -cursor {} ; .td configure -cursor {}}
- entry .td -textvariable coords
- pack .td -expand 1 -fill x
- proc window {x y} {
- set handle [::winapi::WindowFromPoint $x $y]
- return $handle
- }
- bind . <F5> {console show}