From: Nicolas Blais Newsgroups: comp.os.msdos.djgpp Subject: Area of square problem, different. Date: Thu, 11 Jun 1998 19:12:17 -0400 Organization: Elemental Technologies Lines: 29 Message-ID: <35806450.B3F694CD@netrover.com> NNTP-Posting-Host: 198.168.87.16 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk The bit of code below seams to work partially or actually more than I expect, because when I click on the rectangle, it gives me millions (seriously) of the "Yep" string, but I only want one. Also, sometimes, it just doesn't print the "Yep". Can this be fixed? #define RGB makecol15 int min_x, min_y, max_x, max_y; min_x = min_y = 20; max_x = max_y = 40; rectfill(screen,20,20,60,60,RGB(255,0,0)); show_mouse(screen); do { if(((mouse_x >= min_x) && (mouse_x <= max_x)) && ((mouse_y >= min_y ) && (mouse_y <= max_y))) { if (mouse_b == 1) { show_mouse(NULL); textout(screen,font,"Yep",random() % 800,random() % 600,RGB(0,255,0)); show_mouse(screen); } } } while (!keypressed()); Thank you for any help, Nicolas Blais