jonathan wrote: > > occasionally you need to change a cursor yourself > rather than letting fb [or pg] handle it. > but what if the user has 'shaded' the window? > you can use the following self-contained code > to test beforehand > > '------------ sample code ---------------- > clear local mode > local fn isWndNotShaded > dim @ myOldPort as long > dim @ myPort as long > dim @ myRect as rect > ' > myPort = FN FRONTWINDOW > GETPORT( myOldPort) > SETPORT( myPort) > // get window cont rect > myRect;8 = [[myPort +_contRgn]] + _rgnBBox > SETPORT( myOldPort) > // if window shaded - rect is inexistant > end fn = ( myRect.top% != myRect.bottom%) > '--------------- end -------------------- > > then just use of before your cursor changing code as follows: > > long if( fn isWndNotShaded) > [...] > end if > > adapted from some code that mars sent me years ago! > If you do mean collapsed by shaded, there is a Toolbox call in the Appearance Manager: long if fn IsWindowCollapsed(windowRef) = _false [...] end if -- Cheers Alain ----------------------------------------------------- FB^3 in Europe: http://euro.futurebasic.com/ FB II Pouch: http://www.pixmix.com/FB/outils.html -----------------------------------------------------