Tim, Did you really mean:
brush = win32ui.CreateBrush(1, 0, 0) # create a brush (hollow, no color) since the win32gui brush will not select into the device context? Which brings me to the real question: What's the difference between win32ui and win32gui anyway and what's the best online reference for them? Regards, Richard BTW, here's the code as it now stands. --- code --- def flash( left, top, width, height ): """ put a flashing box at cordinates """ gui_dc = win32gui.GetDC(0) # int handle of DC for screen pycdc = win32ui.CreateDCFromHandle(gui_dc) # PyCDC object pycdc.SetROP2(7) # R2_XOR brush = win32ui.CreateBrush(1, 0, 0) # create a brush (hollow, no color) pycdc.SelectObject(brush) # put it in the dc pen = win32ui.CreatePen(0, 3, 0x00ff00) # create a pen (solid, 3 pels wide, color) # colorref is 0x00bbggrr pycdc.SelectObject(pen) # put it in the dc adj = 0 # or 4 cord = (left, top, left+width+adj, top + height+adj) # +1 for the way windows draws rect # +3 for pen width for i in range(0,5): # 5 flashes pycdc.Rectangle(cord) # make a solid rectangle time.sleep(.250) # hang out pycdc.Rectangle(cord) # put the screen back time.sleep(.250) # hang out win32gui.ReleaseDC(gui_dc,0) # is this all I have to release? --- end code --- | |Thanks again Tim, I'll make the change. | ||Tim Roberts wrote: ||> ... ||> If you use the hollow brush, as I suggested, then the driver won't even ||> be ASKED to fill the interior. ||> ||> brush = win32ui.GetStockObject( 5 ) # HOLLOW_BRUSH ||> || ||D'oh, did I really say win32ui? That's wrong. || || brush = win32gui.GetStockObject( 5 ) # HOLLOW_BRUSH || ||-- ||Tim Roberts, [EMAIL PROTECTED] ||Providenza & Boekelheide, Inc. _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32