Re: cursor blinking at accept
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 16 Jan 2007 23:59:43 +1300
"Rick Smith" <ricksmith@xxxxxxx> wrote in message
news:12qp6e5teefm9a2@xxxxxxxxxxxxxxxxxxxxx
Ah, the name of a Saint.... :-)
<wolfgang.adamec@xxxxxxxxx> wrote in message
news:1168925147.480499.247760@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello!
I work with Microfocus cobol net-express 4. When I want to get user
input in my program, I define a Variable for my screen section, for
instance:
03 ssmyfield line 20 col 5 pic x using bsmyfield.
and write "accept bsmyfield". When I run the programm and I get to the
input field, the program waits for my input and the cursor blinks.
My question is now: Sometimes I need to go to an input field with no
cursor blinking, but the next field should blink again (on the same
page).
I tried to write: "03 ssmyfield line 20 col5 pic x using bsmyfield no
blink" but this does not work.
I also know the X"A7" function 17 - Set Cursor Type (of which I do not
know how it works), but Microfocus writes as a comment to this function
"Before using this routine, use the CBL_CLEAR_SCR routine, to prevent
possible errors." => so I cannot use this (because I cannot clear the
screen between two user inputs on the same page).
Thanks in advance
Wolfgang
Ray Duncan, "IBM ROM BIOS", Microsoft Press,
1988, page 9, "In text display modes, the video
hardware causes the cursor to blink, and the blink
cannot be disabled."
I learned 8086 Assembler with the help of a couple of books by Ray Duncan...
clear, concise, and elegant both in his writing and his code.
If Ray says the BIOS prohibits it, it's a fair bet the BIOS prohibits it.
(Cursors under Windows are a very different story, of course.)
Wolfgang,
du muss wieder in die haende gespucken und experimentieren... :-)
Unfortunately the attributes you can specify in the Screen Section DISPLAY
(things like BLINK, HIGHLIGHT, REVERSE VIDEO etc., all apply to FIELDS and
NOT to the CURSOR.
If you REALLY don't want the cursor to be seen to be blinking here are a few
ideas... (I can't try them because the notebook I have that runs MF COBOL is
very old (Win 3.1 and DOS) and is stored in the attic (I don't go there in
during the hours of darkness... :-)) and I wouldn't mind betting it has a UK
power cable and no transformer even if I DID go and get it out.) Just try
any of the following:
1. Specify BLINK OFF, rather than NO BLINK. (I don't think it will affect
the cursor but you could specify a background color the same as the cursor,
maybe...}
2. Specify ...WITH LEFTLINE for the field, and set the cursor to an
undisplayable position (say line 26, col 1). You can use the CURSOR
directive under SPECIAL NAMES to get or set the position of the cursor; I
can't remember what happens if you give it an invalid position, but there's
a fighting chance it will disappear altogether until you give it something
valid... Once you have it off the screen you need some other way to get
attention to your input field. Actually, I just re-read that and it contains
a fatal flaw...:-) (You need the cursor on the field so you can get input...
sorry.) I left it in because it might strike the germ of an idea in your
mind.
3. If you can't actually stop the cursor blinking, you could experiement
with various backgrounds and foregrounds to see which ones have the least
contrast. Try the same with REVERSE VIDEO.
All-in-all Screen Section Displays are pretty useless and best avoided... I
remember using them with MS-DOS and was very relieved when PANELS and DIALOG
became available. Then it was PowerCOBOL which allowed a graphic interface
to be cobbled together in minutes, and now we have DotNET Forms which let
you do it in seconds with none of that messy row and column counting... just
drag your field where you want it and drop it. Visual Studio even provides
blue lines to help you align blocks of fields and controls on your form.
I were doing this I would suggest moving to a graphic interface. It could be
written in Forms using the free download of C++, VB, or C# Express with
Visual Studio, wrapped as managed COM code under Dot NET, then driven with
the existing COBOL. Your COBOL can Call ActiveX and COM and you don't even
need to change it. Replace the Screen accepts and displays with a couple of
COM invokes... In fact, I think Net Express 4 can access Forms directly (not
sure about that but it can certainly interface to COM/ActiveX) and you could
build a graphic interface very quickly with it. Each screen would become a
component that encapsulated those fields. Each field could be a property of
the screen object. Need to add a new field? No code required; just drop it
on the form and mark it as a property. It can be accessed automatically from
outside the screen class (in COBOL, f'rinstance...) using its generated GET
and SET methods...
Just a thought...
Let's know how you get on.
Pete.
.
- References:
- cursor blinking at accept
- From: wolfgang . adamec
- Re: cursor blinking at accept
- From: Rick Smith
- cursor blinking at accept
- Prev by Date: Re: cursor blinking at accept
- Next by Date: Re: OT: Newsgroup Name Change?
- Previous by thread: Re: cursor blinking at accept
- Next by thread: Can't sort variable length records using mfsort
- Index(es):
Relevant Pages
|
|