Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flashing Screen Display 2

Status
Not open for further replies.

Spannerman

Programmer
Dec 31, 2000
26
GB
In my program I set up a flashing colour in order to give error message

i.e. #define lightredflash textcolor(140);

This works fine on my computer,however, on the computers at work it is displayed
on screen as a red character with a fixed white bow around it.

Any clues as to why this is????
 
There's nothing wrong with your code... Blinking text in a dos window will not show as blinking, it will show as red text with a grayish white background.

Try This:


#include <conio.h>
#define lightflashred textcolor(RED + BLINK)

int main(void)
{

lightflashred;
cprintf(&quot;Test Error: Warning, blah blah&quot;);

return 0;

}


Try that and make sure that the dos window is completely full screen, not just maximized but fullscreen. Bring up the dos prompt and press alt+enter to make it true fullscreen. After you have made the prompt fullscreen try your program. Hope this helps.

Best Regards,
Nathan Martini
EBgames.com
 
Thankyou for your reply PSkYiClHlOeDrIC but I am afraid it did not work.

I run at home on Windows 95 which has an MS-DOS option on the menu bar but the one at work is Windows NT which has only a Pseudo type prompt.

I am sure I am FULL screen but it still will not work.

Is there anything else I may try??
 
Make sure you are in fullscreen, not just maximized! I've tested your code and the code I posted on both my Windows 98 machine and my Windows NT machine at work. Both worked in fullscreen, but did not in maximized or windowed mode. To get to fullscreen you need to run the MS-DOS prompt or Psuedo Dos Prompt, when the dos prompt appears press ALT+ENTER together and it will become true fullscreen mode.
 
Thankyou once again or your reply PSkYiClHlOeDrIC but I am afraid I still cannot get it to work no matter what I try.

I have run from the floppy and C drive and pressed ALT Enter over and over but still get the white block.

Thanks very much for your time anyway.
 
I define lightredflash as global:
========================

#define lightredflash textcolor(140);


rmenu()
{
int choice=0;

do /*** FUNCTION TO DISPLAY MAINMENU ***/
{
rnewscr(1);lightgreen;gotoxy(35,4);cprintf(&quot;MAIN MENU&quot;);lightred;
gotoxy(34,5);cprintf(&quot;===========&quot;);reset;x=6;y=7;
for(flag=0;flag<=7;flag++)
{gotoxy(x,y);green;cprintf(&quot;%i. &quot;,flag+1);y++;y++;}

y=7;
for(flag=8;flag<=15;flag++)
{
if(flag == 8)x=44;
else
x=43;
gotoxy(x,y);green;cprintf(&quot;%i. &quot;,flag+1);reset;y++;y++;
}

gotoxy(9,7);reset;cprintf(&quot;Create Records In Stock Database.&quot;);
gotoxy(9,9);cprintf(&quot;View Stock By Item Number.&quot;);
gotoxy(9,11);cprintf(&quot;Delete Items From Stock Database.&quot;);
gotoxy(9,13);cprintf(&quot;Update Stock Database.&quot;);
gotoxy(9,15);lightgreen;cprintf(&quot;Add New Employees To Database.&quot;);
gotoxy(9,17);cprintf(&quot;View Employee Database.&quot;);
gotoxy(9,19);cprintf(&quot;Delete Employees From Database.&quot;);
gotoxy(9,21);cprintf(&quot; &quot;);
gotoxy(47,7);cyan;cprintf(&quot;Issue Stock.&quot;);
gotoxy(47,9);cprintf(&quot;View Issues Database.&quot;);
gotoxy(47,11);cprintf(&quot; &quot;);
gotoxy(47,13);magenta;cprintf(&quot;Return Stock.&quot;);
gotoxy(47,15);cprintf(&quot;View Returns Database.&quot;);
gotoxy(47,17);cprintf(&quot; &quot;);
gotoxy(47,19);lightred;cprintf(&quot;Print Menu. &quot;);
gotoxy(47,21);blue;cprintf(&quot;Secure/Restore Files.&quot;);
lightredflash;gotoxy(52,24);cprintf(&quot;17. Close Down System.&quot;);

x=4;y=24;lightgreen;gotoxy(x,y);cprintf(&quot;Please Select An Option: &quot;);
x=29;y=24;choice=rgetint(x,y);
}
while(choice != 1 && choice != 2 && choice != 3 && choice != 4 &&
choice != 5 && choice != 6 && choice != 7 && choice != 8 &&
choice != 9 && choice != 10 && choice != 11 && choice != 12 &&
choice != 13 && choice != 14 && choice != 15 && choice != 16 &&
choice != 17);

if(choice == 1)rstokdat();if(choice == 2)rviewstk(1);if(choice == 3)rdelstoc();
if(choice == 4)ramensto();if(choice == 5)rstaff();if(choice == 6)rvempmen();
if(choice == 7)rdelwork();/*if(choice == 8);*/if(choice == 9)rissfile();
if(choice == 10)rvissmen();/*if(choice == 11);*/if(choice == 12)returns();
if(choice == 13)rvretmen();/*if(choice == 14);*/if(choice == 15)rprinmen();
if(choice == 16)rfilemen();

if(choice == 17)
{
do
{
pr_bigblank();gotoxy(4,24);cprintf(&quot;Are You Sure? &quot;);ch=getche();getch();
}
while(ch != 'y' && ch != 'Y' && ch != 'n' && ch != 'N');
}
if(ch != 'y' && ch != 'Y')
{
return 1;
}
else
{
ropenfil(7);
fread(sptr,sizesecurity,1,sp);sptr->inuse = 0;
fseek(sp,-sizesecurity,1);fwrite (&number,sizesecurity,1,sp);
memset(sptr,0,sizesecurity);rclosfil(7);
white;clrscr();return 0;
}
}

 
When you run your program does it show this

Excuse my sloppy ASCII drawing

[tt]

|----------------------|
| _____ _____ |
| | |--- \ / | |
| | |--- | | |
| | |--- / \ | |
| |
|----------------------|

[/tt]


Red text with a white background?


If so, then there is probably nothing wrong with your code! Because this is what I get in a windowed DOS box, but it starts flashing when I switch to fullscreen mode. I don't have an answer for this right now, but I will continue to look for one and post it as soon as I find it.
 
Many thanks for your continued interest in my problem.I can expand a little.

The program works perfectly at home no problem running from the MS DOS prompt in Windows 95.

Also ,at work now after your advice the program works after pressing ALT ENTER when run from windows explorer.

HOWEVER!!!!!!!I wrote this system for the Stock Control people and the system within the company is NETWORKED. For ease of use the COMMS Department created a batch file and placed an ICON on the screen which the user double clicks on and off he goes.
The program at this stage is FULL SCREEN already but showing the WHITE BOX.Presing ALT ENTER simply Minimises it and ALT ENTER makes it full screen again but with the white box.Sorry if this is long winded but that is the story as it stands.
Thanks again for your help.
 
OK!!! This is where your problem is... I don't know how to correct the problem, but I can give you a quick &quot;fix&quot;.

The icon (shortcut) that you or whoever made, is set to automatically go into fullcreen mode. This is the mistake because Windows NT doesn't like this. This is what you need to do.


Right click on shortcut
go to properties

go to the screen tab
make sure Window is selected and not Fullscreen


Now all you need to do is double click on the shortcut, WAIT for it to load completely, then press ALT+ENTER to make it fullscreen and you should see blinking red characters.

Give it a try and let me know what happenes... I reproduced the problem you're having on my Windows NT Box (Networked as well) and I also quick &quot;fixed&quot; it this way, so let me know what happens. Thanks
 
Dear PSkYiClHlOeDrIC,

Many thanks for your help.I followed your instructions and it worked perfectly.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top