
    //-----------------------------------------------------------
   // --    list all iconified windiows of current desktop    --
   mylist = xwin_listicons(  )

    for each myline in mylist
      thespace=instr( myline , " " )
      id = left(myline, thespace)
      winname = right(myline , len(myline)-thespace)
      print "invisible: " & id & "Desktop: " & winname
    next

    mylist={}  //--free the table from memory


    //-------------------------------------------------------------
   // --  find out, which windows there are on our desktop --
   mylist = xwin_listwindows(  )

    for each myline in mylist
      thespace=instr( myline , " " )
      id = left(myline, thespace)
      winname = right(myline , len(myline)-thespace)
      print "visible: " & id & " " & winname
    next

    mylist={}  //--free the table from memory


 //---------------------------------------------------
//  select a window with the mouse


wxmessagebox("CLICK on OK and then SELECT A WINDOW")

mylist = xwin_select()
testid = "0x" & mylist[0]
mylist={}  //--free the table from memory


 //--------------------------------------------
// -- now some standard-XWIN-functions

print "--testing--"
print "using ID " & testid

     //--------------------------------
    //  get some more detailed info
    mylist = xwin_info( testid )

     print "x: " & mylist[0]
     print "y: " & mylist[1]
     print "width: " & mylist[2]
     print "height: " & mylist[3]
     print "state: " & mylist[4]  //-- 2: visible - 0: iconified

    mylist={}  //--free the table from memory


    xwin_activate( testid )
    xwin_resize( testid , 100 , 500)
    xwin_move( testid , 100 , 100)
    xwin_activate( testid )



     wxmessagebox( "WINDOW WAS MOVED AND RESIZED \n\n Continue TO ICONIFY THE WINDOW")


    xwin_iconify( testid )



     wxmessagebox( "WINDOW WAS ICONIFIED\n\nContinue TO RESTORE THE WINDOW")



    xwin_activate( testid )
    xwin_move( testid , 700 , 100)
    xwin_resize( testid , 400 , 300)
    xwin_activate( testid )

print "--done testing--"
wxmessagebox("thats all for now. bye :)")
end

 //--------------------------
//-- test memory-usage --
for i=0 to 1000000

   //--return values in a table
   mylist = xwin_listicons(  )

  'print "0: " & mylist[0]
  'print "1: " & mylist[1]

    mylist={}  //--free the table from memory

next


