For programmers (Dos/ Windows, Pascal, Delphi, etc)

This material is not 'polished'!!

As I surf the net, I come across various things that I wish someone had told me about. In theory, one day it will all be available in the polished sections of my website. In the meantime, if you're willing to 'dig' through some disorganised material, you may be rewarded with 'gems'!

In some cases, the text is snipped from other sources. Therefore, among other things, the personal pronoun may not refer to the editor of this page. If, on the other hand something is identified as coming from 'TKB', he IS the pages's editor!


Ad from page's editor: Yes.. I do enjoy compiling these things for you... hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows pc) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!

Click here to visit editor's freeware, shareware page.


You should find information on....

....installers, shareware author's tools and resources, web-page editors
ELSEWHERE.. but some may have slipped in here!
Should be here.. Various things, including Windows 'Help' authoring tools.
I also have a page for programmers (including polishing information on Windows help file authoring at my 'Programmer's' page. (IBM type pcs) )

===

Almost anything you ever wanted to know about Pascal can be found at the following. (if you don't already know about Prof. Salmi's superb service, find out now!)

 tsfaqp.zip Common Turbo Pascal Questions and Timo's answers

This file TSFAQP.IDX lists the contents of

            ftp://garbo.uwasa.fi/pc/ts/tsfaqp36.zip
                       also available as
            ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip



===
There is much more about the parallel port issue on this page, but just in case there's something new in this....

If you want to send a pulse through the parallel port. In TurboPascal the source code is something like:
port[$378] := 1;
delay(100);
port[$378] := 0;


How can I 'translate' this to Delphi 3????

Under Windows 95, that code should work, though it's not recommended. Under NT, you need a device driver, since application programs can't access ports directly. See the resources available at http://www.lvr.com (Lakeview Research).

===
Someone asked...
How do I print bitmaps for barcode work?

Answers...
Create a TImage
Use CopyRect to copy the barcode to the TImage field
Use TheImage.Picture.SaveToFile to save the bitmap to a file

TheImage.Canvas.CopyRect(rect(0,0,200,200),canvas,rect(0,0,200,200));

where 0,0,200,200 is the position and dimension of your barcode on the canvas.

----
Another answer...

It's really very easy to print the bitmaps. Try this...

  Printer.BeginDoc;
  Printer.Canvas.CopyRect(
    Rect(0,0,Bitmap.Width,Bitmap.Height),
    Bitmap.Canvas,
    Rect(0,0,Bitmap.Width,Bitmap.Height));
  Printer.EndDoc;
Normally the printout is too small. If so, just scale the Dest (see CopyRect help) rectangle by a value (ie: Bitmap.Width*4,BitmapHeight*4)

===
How to set cursor posn to the end of a TMemo:

with Memo1 do SelStart:=GetTextLen-1;

===

How can I create a bordered window without a title bar?

Well, you could set the BorderStyle of the Form to bsNone, although this makes the form ugly (no border). This can be rectified somwhat by placing a TPanel on the form, making its Align = alClient and the BevelWidth = 2 which gives an effective border.

===
The Turbo Pascal links page, which was advertised frequently with the shorthand URL
http://www.geocities.com/~franzglaser/tp.html
sometimes makes troubles with Geocities traffic.

The original URL is
http://www.geocities.com/SiliconValley/2926/tp.html
This works usually better. Please modify your bookmarks and links. The site has a big Delphi chapter.

===
Directory of computer developers and consultants... and search engine for associated websites
http://www.iversonsoftware.com/

===
Site of Delphi mag publisher... mostly ads, but some software in library, reviews, etc. 300 articles on CD for $45 in US.
www.informant.com

===
There is some basic TurboPascal graphics stuff at this URL:
http://www.xs4all.nl/~remcodek/program.html
(Suggested, thank you, by: Remco de Korte, Soft Machine, Nederland
http://yi.com/home/DekorteRemco

===
Delphi: How to send keystrokes to a form.... The following ideas came from newsgroup posts...

See the Win32 API help file topic Keyb_Event(); for some excellent examples of using this function, go to http://developers.href.com, click the search link, and use 'Keyb_Event and Peter and Below' as the search text. (Provided by Ken White, Clipper Functions for Delphi http://members.aol.com/clipfunc)

Another answer:

SendMessage(Memo1.Handle,WM_Char,65,0);

Sends 'A' into the memo.

===
Paradox, Windows prgmming in general,etc!

http://www.prestwood.com/

===
Frank (see below) answered a question about Standard Pascal from someone who wanted more than a book by Nell Dell gave him.

Frank said descriptions of the two Pascal standards (ISO 7185 Standard Pascal and ISO 10206 Extended Pascal) in Postscript format are available from

ftp://ftp.digital.com/pub/DEC/Pascal/

Not that they're easy to read (IMHO), but they contain the definitive answers to such questions.

For more see: computer.lang.pascal.ansi-iso. newsgroup
--
Frank Heckenbach, Erlangen, Germany
fjf@gmx.de
Internet links: http://home.pages.de/~fjf/links.htm
Pascal programs: http://home.pages.de/~fjf/programs.htm


===
Help ! I'm a newcomer with Turbo Pascal and would like to learn game programming Would any kind soul please teach me ?
No kind soul, but take a look at the following website:
http://people.zeelandnet.nl/rpb/index.html

For nice info look at the TECH section...
Heavily graphic, and needed Java browser, it said.

===
Sick of Bill Gates running everything? Want DR-DOS, with personal netware? (Like MS-DOS) Want other NON-MS stuff, reasonable prices, as shareware? Go to:
http://www.caldera.com/dos/index.html

=== >> >patrick bergner wrote: >> >> If you know how i can make a program to control single pins of a >> >> com-port, for example to switch >> >> a LED on, please tell me. >> >> Maybe you can explain me too, what voltage is used at which pin. >> >> > >> >I don't know how much luck you'll have with Win 95. Win NT is pretty >> >much out for doing these things; too much protection. DOS is really your >> >best bet. >> >> I have done direct parallel access from win95, it works just fine. >> >> DK > >-- >Dave Robinson >Amber Computer Systems Inc. The following answer to the above is mostly a 'shop window' for commercial products, but there were some useful links, e.g. to update page at Borland >WEB page: http://www.acsi.bc.ca/ - or - http://home.istar.ca/~ambersys/ >Delphi Components Page: http://www.acsi.bc.ca/comp01.html

===
Check it out.... ask questions.... let me know what you think!

20 MB of BASIC, PASCAL and C (DJGPP)

Check out the PASCAL section for TMT, TP and TPW source! BTW...New version of TMT (freeware pascal compiler) released!

...check out the NEWS section for info about ID SOFTWARE and INTERPLAY source code releases.... (Doom and Descent source)

later,
Peter Pappas

The Programmer's Page
http://professionals.com/~peterp/


===
The "Delphi Developers CD Volume 1" will begin shipping Monday May 4th 98

This CD is packed with:

550 Megabytes of Delphi Components - Most contain source code and are freeware. 30 Megabytes of How-to's and tutorials. - Including frequently used code snippets and 20 Megabytes of Tools and Utilities.

Priced at $19.95 the Delphi Developers CD places hundreds of components at your fingertips in one convenient location. No need to wait for you download to complete and then misplace the component later on.

To order your copy (or maybe one for your colleagues) visit
http://www.delphi32.com/orders/ordercd.html today!

While you're there check out http://www.delphi32.com for other great features coming soon.

===
A unit or source or even information for TCP/IP in Turbo Pascal:

Jonathan Ramsey's Pascal TCP/IP for DOS
http://www.csolve.net/~add/zips/tcp.htm

===
Articles posted to comp.lang.pascal.delphi.announce are archived at:
WWW Archive: http://www.infonex.com/~dacroyle/clpda/

===
I saw a post about this site saying it offered Turbo Pascal
Shareware Programs, for Windows 3.x

Said to download new programs DAILY
(10 a.m. EST) from more than 300 sites all over the world.

Check out the new programs every day in the "TODAY'S FREE COMPUTER
PROGRAMS" section on the all new JUMBO! ---  over 200,000 files and
programs --- over 1.8 million links --- including a HUGE multimedia
section with sounds, graphics, videos, streaming music, VRML,
animations, clip art, icons,
schockwave, screen savers ----

http://www.jumbo.com.

At:

http://www.jumbo.com/pages/programming/windows/turbopas1/
http://www.jumbo.com/pages/programming/windows/bcpp/

===
A newsgroup posting extolled the virtues of an editor called FTE.
Said to run on Linux console, Linux X, OS/2, DOS etc, and have
Borland Pascal-like keybindings by default (syntax highlights
about 15 languages, has smart indent function and it's own macro language)
Said to be available from...

http://www.xnet.com/~blatura/linapp6.html#text

This lists a lot of nice editors.

Some of above was from Balazs Scheidler,

Author of Turbo Vision Resource WorkShop, resource toolkit
for Turbo Vision for Pascal and C++. You can get the latest version at
http://www.bitsoft.com/tvrw



===
DERIVED FROM a post by....
Mike Copeland mrcope@primenet.com>
Newsgroups: comp.lang.pascal.borland
Subject: Re: Tab and F keys in Tur
Date: 16 Mar 1997 18:16:04 -0700

Here's a little program that should answer most questions about reading
characters the keyboard can generate.  While ReadKey cannot distinguish
between the right and left shift keys it will detect alt, function and arrow
keys.

It shows how the special/extended keys work, since certain
special keys will return the same value if you don't show the #00/xx
relationship:

Uses CRT;
Var C1,C2 : char;
begin
  repeat
    C1 := ReadKey; C2 := #00;
    if C1 = #00 then C2 := ReadKey;
    writeln (Ord(C1),'/',Ord(C2))
  until C1 = #27  { Escape }
end.

   BTW, the KeyPressed processing has virtually no pertinence in a
program which does this sort of processing - it's strictly for
application logic which must test for keyboard input.  Your code flushes
the keyboard buffer before processing a single keystroke - is that what
you want to happen in a complete program like this?



===

Claim to be 'Leading the shareware revolution' There is also
good stuff for for programmers here...

http://www.cyber-distributors.com

===
Lots of good, bite sized pieces for beginners, etc... worth a look! tkb)

Turbo Pascal and C learning club web site.
Pascal and C guide,
Get the TP / C magazine (free)

http://www.hkstar.com/~autokim

===
Index of lots of good 'How to program' stuff...
Calls itself 'The PC Games Programmer's Encyclopaedia'...
but useful to many programmers. Some is advanced.

AND.. HURRAH!!! They aren't afraid to concentrate on CONTENT
without wasting my time with fancy (bandwidth consuming!!)
graphics, etc.

http://www.qzx.com/pc-gpe/readme.txt

===
Delphi links.. look at the DELPHI-BOX of:
Link lists, separated into topics like "FTP servers", "Borland patches",
"Tips and Tricks", News, etc.
You can also subscribe to the mailing lists about Delphi
and to check out Borland's new Newsgroups!
(for both see area "Delphi Information resources").
(Originates in Austria)

http://www.user.xpoint.at/r.fellner/

===
Icons (for Windows) which you can freely...
For starters go to URL
ftp://ftp.adam.anet.cz/pub/cdrom5/WIN3/ICONS
ftp://ftp.adam.anet.cz/pub/cdrom5/WIN3/ICONS/ICONS
ftp://ftp.adam.anet.cz/pub/cdrom5/ZIPPED/ICONS

When you get tired of those, go to http://ftpsearch.ntnu.no/ftpsearch
and do a search for ICONS - you'll get more subdirectories that you'll
ever want.

(The ftpsearch engine might be valuable for lots of things!!)

===
Someone looking for Turbo Pascal games was referred to the following:

http://www.geocities.com/SiliconValley/Vista/1595

And, for games made with Pascal... following has material for those
wanting to learn prgmming
http://www.xs4all.nl/~remcodek/ and further -> all "pascal games".

===
http://swiss.net/group42
hacker info

===
Someone looking to buy a copy of Turbo Pascal 6 was referred to..

www.surplusdirect.com

Which, he was told, seems to buy distressed inventory, and their
prices often reflect that fact.

===
The source code for copying files is given and explained in...

 113827 Feb 5 1997 ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip
 tsfaqp.zip Common Turbo Pascal Questions and Timo's answers

   All the best, Timo

....................................................................
Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi archives  193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
ts@uwasa.fi  http://uwasa.fi/~ts  ; FIN-65101,  Finland




===
On Tue, 25 Mar 1997 03:25:36 GMT, yexin@worldnet.att.net (David Chen) wrote:

>I desperately need a decent pascal graphic  unit in 640x480 mode.
>It seems that 320x200 units are all I can find.
>Is it because 640x480 units are too slow?

It's because 640x480x256 requires bank-switching which is somewhat more
difficult to program. It's possible however in protected mode and with the VESA
2.0 video standard to address one 640x480x256 page, or bigger ones, without bank
switching. I haven't tried that however.

What I do have is a real-mode unit for VESA 1.2 or higher. It can do decent
640x480x256 graphics and it also supports a multicolored mouse pointer. Many
routines are written in assembler (Borland Pascal 7.0 required!) so it should be
resonable fast. You can find this unit at:

http://home.worldonline.nl/~wpdejong/vesa.html

You get the source code too, so you can play a bit with that... :-)

Peter de Jong
wpdejong@worldonline.nl

===
Graphics unit for Borland Pascal.For 320x200, 640x400 and 640x480
in 256 Colors and 320x200 and 640x480 in 65,536 Colours.
at...
        tHE  -=# vIRTUAL tECHNOLOGIES GbR #=-  Homepage :
  Pascal, Asm, Games, Sources, Toolkits, Demos, Utilities, Java ..

http://www.informatik.uni-oldenburg.de/~virtech/index_toolkits.html



=== Hi, I have made a site for developers. I have a download area and a register for developers all around the world. It's of course free!! The URL is: http://www.algonet.se/~sonic /Marcus (sonic@algonet.se) check it out today!


=== In Delphi, as opposed to Pascal, there are 2 sorts of CONST - normal ones, that just work like in Pascal, and can't be assigned to, and typed constants, which is what you're using here. The really good thing about them is that they allow you to declare constants of (as far as I can tell) arbitrary complex type. The really wierd thing about them is that they aren't constant! They seem to work exactly as static variables in C. I think it's a bit of a misfeature to overload the word CONST for this, but I suppose it doesn't break existing code whereas adding a new reserved word might. (somebody might have a variable called "static", for example).

If you rewrote your routine as:

 PROCEDURE Tform1.Button1click;
 CONST c = 1;	{type is implicitly integer}
 BEGIN
     c := c + 1; {this is now illegal}
     edit1.text := inttostr (c)
 END;

You'd find that it wouldn't compile, because you had a normal constant
instead of a typed one.

Who was it said that thing about "variables that don't and constants
that aren't"?

-----------------------------------
Matt Francomb, Setanta Software Ltd
http://www.demon.co.uk/setanta  (no use to tkb website)
-----------------------------------




===
DERIVED FROM POST BY.. m.a.vaughan@larc.nasa.gov (Mark Vaughan)
Newsgroups: comp.lang.pascal.delphi.misc
Date: 26 Mar 1997 12:39:48 GMT
Organization: NASA Langley Research Center, Hampton, VA, USA

Turning keyboard caps/ num lock leds on....

procedure TMyForm.Button1Click(Sender: TObject);
  Var
    KeyState  :  TKeyboardState;
  begin
    GetKeyboardState(KeyState);
    if (KeyState[VK_NUMLOCK] = 0) then
      KeyState[VK_NUMLOCK] := 1
    else
      KeyState[VK_NUMLOCK] := 0;
    SetKeyboardState(KeyState);
  end;

for caps lock substitute VK_CAPITAL for VK_NUMLOCK.

Mark Vaughan


===
Try out Daniel's TPascal Page & Delphi 2.0 bits at
 http://www.farstar.demon.co.uk/Pascal/index.htm

Mail me & give comments (I know it's sparse ;)
 mailto:WebMaster@farstar.demon.co.uk

(includes ref to RS232 chat simulator)


=== [Following is like what I want to do... tkb!]
I have built a nice programming web site but it is DEAD. I have tried putting it on the search engines but it hasn't worked. Anyway please visit it at http://www.pacificnet.net/~kanner/

Thanks, Anthony

=== Hello,

I am a member of Teen Programmers Unite. We are a world wide programming group conisisting of teen programmers who are intelligent and wish to learn as much as they can about computers. If you are a teen then please goto

http://www.ultranet.com/~kitchin

There are NO requirements or costs. TPU is run by members for members. PLEASE check us out if you are interested. Thanks !! :)
Jarrod Davis
johnyreb@ix.netcom.com
Http://csa.home.ml.org

===
[tkb: Lots of cookies, but will behave even if you reject them...]

> >On some newsgroups there are arrogant comments that with new debugging
> >tools it is kids play to find the critical "if then" clauses from
> >the limiting part of any program code. Replace them with adequate
> >NOP or JUMP commands, and have a good laugh. If this is true, it does
> >not make me laugh.
> >
> >Markku Nevalainen
> >

Turbo Power software just released Ongaurd, a set of native VCL's for D1
and D2 for exactly this.   Very powerfull and easy to use.  You can
limit users to days to run, serial number validation, number of users on
network copy, etc.  You can mix or match, or make up your own scheme.

check it out at http://www.turbopower.com

> >For D1 users there is a hacker protection component called Grudge
> >on Super Page, registering cost only 1 USD.  It claims being a very
> >hard piece for crackers. I have only tested that it works, but I have





Here is how you can contact this page's editor.
Link to 'My Desk Pile' main page