Archív konference Delphi

Zpět na výběr roku archívu nebo přejít na fulltextové vyhledávání v konferenci.

Filtre ... aneb konec velkemu nedorozumeni.

[*] Pavel Bare� <atoll(zv)telecom(tec)cz> - 23.4.1998 14:28:48


>K OnFiltered - ano, ma podstatne sirsie moznosti - ale vadi mi na to
>jedno - tu podmienku musim dopredu vediet. Co ale ak chcem ju urobit
>tak, aby ju mohol definovat uzivatel ? Dat napr. nejaky Edit alebo
>memo box, kde si ju jednoducho napise. A tu mi chyba cosi take ako ma
>napr. PC Fand (mimochodom jedna z najlespich databaz pod DOS, ceskej
>vyroby ...), a to funkcia EValB(s:String) - analyzuje s v prislusnej
>syntaxi a vyhodnoti ako vzorec. Toto v Delphi zatial neviem, resp.
>uz aj mam nato nejaky komponent, ale zatial ho nemam tak
>prepracovany, aby som s nim bol spokojny. Preto som samozrejme hladal
>jednoduchsiu cestu - Filter.


Vzdyt staci pouzit promenou

napr. nejak takhle

procedure TdmKontakty.tblKontaktyFilterRecord(DataSet: TDataSet;
var Accept: Boolean);
begin
Accept :=(dmKontakty.tblKontaktyCISLO_FIRM.Value = nejaka promena) ;
end;

Filtre

[*] "Ing.Jozef Strn�dik" <strnadik(zv)mrp.sk> - 23.4.1998 14:37:25


> Skusal som
> Table.Filter := 'INT(HODNOTA) = 10' ;
> ale neuspel som takze teraz pouzivam
> Table.Filter := 'HODNOTA >= 10 AND HODNOTA<11';

Tenhle pripad bych radeji resil pomoci

Table.IndexFieldNames := 'bleble;blelbe';
Table.SetRange([LowValue1, LowValue2], [HighValue1, HighValue2])
try
.....
finally
Table.CancelRange;
end

[J.S.]

Tuto variantu som zamietol uz skor, pretoze s urcitych dovodov nemozem indexovat podla 'bleble;bleble'.
Svoju otazku teda preformulujem radsej takto:
Je mozne v property Filter prip. pri zostavovani Expression Indexov pouzivat funkcie zname s dBase resp. FoxPro ? Ak ano kde mozem najst ich zoznam.

Napr. pouzitie fcie STR() pri zostavovani indexov mi funguje.


Jozef Strnadik
E-mail: strnadik(zv)mrp.sk


Vy nekdo jak pouzivat Transakce ??

[*] Radim Kittner, st. ??-98, UAI <XKITTN00(zv)kinf.fme.vutbr(tec)cz> - 23.4.1998 14:40:45 cet


Muze my nekdo poradit jak pouzivat transakce ?
Konkretne :
mam tabulku (paradox) a potrebuju ji upravit s tim ze za
urcitych okolnosti je treba vsechny upravy vratit
spet(RollBack). Problem je v tom ze nevym jak to cele
propojit.

Pr.:
Database.Transaction;
....
SQL.Add(update Tabulka set ..
SQL.Prepare;
SQL.ExecSql;
....
if .. then Database.RollBack;
...

Jak tyto radky propojit s jednou tabulkou kterou sem sy v
database desktopu vytvoril ??

A jeste neco na konec :
jaky vyznam ma pouziti Prepare ?? Dotazi a upravy fachci i bez
toho.

Tisk na port

[*] Martin Fron�k <fronek(zv)fic(tec)cz> - 23.4.1998 14:49:42


No to nevim, tohle je uz pascalska vec, ja pouzivam C++Builder. fronek(zv)fic(tec)cz

-----Original Message-----
From: Ing. Jahoda Jaroslav [SMTP:Jaroslav.Jahoda(zv)lesprojekt(tec)cz]
Sent: Thursday, April 23, 1998 11:56 AM
To: DELPHI Distribution List
Subject: RE: Tisk na port

Tim padem musi fungovat i programova konstrukce:

assign(f, '\\server\tiskarna');
rewrite(f);
writeln(f, 'bleble');
close(f);

J.Jahoda

> Jestlize pouzivate 32bit, pak lze jednoduse vygenerovat textovy soubor
> na disk (napriklad) a pak ho okopirovat na \\server\tiskarna


dotaz

[*] Ales Krautvor <krautvor(zv)mona(tec)cz> - 23.4.1998 14:58:20

Hi all,
Potrebuji prenest (move) soubor z disku C na sitovy disk (Novell, 32B
klient) .
Zkousel jsem Renamefile, ale pocitac mi vzdy ohlasil chybu v modulu.

Muzete mi poradit, kde je problem?


--
********************************************************************
* Mona v.o.s. *
* krautvor(zv)mona(tec)cz Ales Krautvor *
* tel.: 96 162 404 Mala Stepanska 17 *
* 120 79 Praha 2 *
* -O|O- "Nemusi prset, pokud aspon kape." *
********************************************************************

IBObject - prima konektivita k Interbsi

[*] TUNGLI Jan <tungli(zv)pvt.sk> - 23.4.1998 15:03:27

Ako sledujem vasu debatu, usudil som ze pouzivate zaznamovo orientovany pristup
k udajom. Tento pristup na SQL server je pomaly. Keby ste pouzily SQL pristup tak vysledok mate takmer okamzite a to aj na 100MB databazy. Mam velmi dobre skusenosti s IB, ovsem dosledne sa vyhibam urcitim veciam: Locate, SetKey atd. prikazom ktore sposobuju ze logalne sa spracovava
dotaz. Nechajte spracovanie na IB SERVER vsetko cez SQL a uvidite ze vsetko prebehne takmer za nenameratelny cas. Samozrejme to ma urcite obmedzenie ako napriklad nemozete sa nastavit na urcity zaznam iba filtrovat vo WHERE casti dotazu atd. Tungli Jan
tungli(zv)pvt.sk

----------
> Od: Pavel Cisar <pcisar(zv)aktis(tec)cz>
> Pre: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
> Predmet: Re: IBObject - prima konektivita k Interbsi
> D�tum: 23. apr�l 1998 9:48
>
> IB objekty jsou pekne, ale na muj vkus trochu drahe (na to, ze jsou mirne
> receno "neucesane"). Jako alternativu doporucuji vasi ctene pozornosti
> FreeIBComponents k mani (byt zatim jen v dosti "horke" betaverzi) na
> http://www.interbase.com (hned vedle FreeUDFLib). Jsou u toho kompletni
> zdroje a je to podstatne "odlehcenejsi", ale take chudsi nez IBO (ale nam
> slouzi s trochou domaci prace vice nez dobre :-)
>
> Co se tyce platby do ciziny, osvedcila se nam VISA karta a platba po webu
> (jinak se na toto tema jiz mluvilo pred casem, snad mozno vyhledat v
> archivu).
>
> >Pred nedavnem jsem s jednim pritelem objevil uzasnou vec.
> >Z www.ibbject.com jsme stahli mnozstvi komponent pro primy pristup
> >k Interbasi. Zjistili jsme, ze v mnoha pripadech je to az nekolikansobne
> >rychlesi nez pri pouziti SQL links nebo ODBC.
> >Napr. pri vyberu 10.0000,- zaznamu nam trva normalne presun na posledni
> >zaznam az 40 sec. Pri pouziti konektivity IB to same trvalo asi 1 sec.
> >Vim, ze tyto objekty jsou na tomto serveru jiz dele. Mozna jsme
> >jen znovu objevili Ameriku.
> >Proto se chci zeptat, zda s tim nema jiz nekdo zkusenosti a zda nevi
> >nekdo kde to u nas koupit. Na tom webu uvadeji cenu asi 400 US.
>
>
>

Tisk na port

[*] Dalibor Toman <dtoman(zv)fortech(tec)cz> - 23.4.1998 15:22:38


>
> assign(f, '\\server\tiskarna');
> rewrite(f);
> writeln(f, 'bleble');
> close(f);

taky ze funguje. Akorat mam pocit ze F musi byt binary (ne text) a tim
padem rewrite(f,1);

Zdravi
D. Toman

WinSock bez okna

[*] Nykl, Pavel <nykl(zv)satoya(tec)cz> - 23.4.1998 15:41:36

Mam unitu na komunikaci v NON_BLOCKING modu na IPX/SPX. Na pozadani zaslu.
Ma mouchy, napr. nejsem schopen chytit BROADCAST packet. Ale funguje to i
pod NT jako bezokenni service.

-----------------------------------------------------------------
Pavel Nykl Saturn Toya s.r.o. - Teletext systems
mailto:nykl(zv)satoya(tec)cz P.O.Box 44,169 00 Praha 69,Czech republic
http://www.satoya(tec)cz/~nykl/ Phone,fax **420-2-57216290,352939
-----------------------------------------------------------------

-----P�vodn� zpr�va-----
Od: VOLTRR1(zv)epr1.ccmail.x400.cez(tec)cz <VOLTRR1(zv)epr1.ccmail.x400.cez(tec)cz>
Komu: delphi-request(zv)io.pinknet(tec)cz <delphi-request(zv)io.pinknet(tec)cz>;
delphi(zv)pinknet(tec)cz <delphi(zv)pinknet(tec)cz>
Datum: 22. dubna 1998 19:03
P�edm�t: WinSock bez okna


>Nazdar,
>
>nevite nekdo jak komunikovat pres WinSock tak abych nepotreboval hWND okna
a
>message posilat do nej ,ale treba
>nahazovat TEvent nebo semafor nebo uplne jikak - ale bez okna.
>
> Radek Voltr
> voltrr1(zv)epr1.ccmail.x400.cez(tec)cz
>

winsock

[*] Dalibor Toman <dtoman(zv)fortech(tec)cz> - 23.4.1998 16:07:54


-----Original Message-----
From: sula milos <crkstrobe(zv)geocities.com>
To: delphi konference <delphi(zv)pinknet(tec)cz>
Date: 23. dubna 1998 15:41
Subject: winsock


Hi
Prosim vas nevi nekdo jak vyresit tento problem?
-chci vytvorit univerzalni knihovnu(dll), kterou by bylo mozno volat z lib.programu a ktera by vyuzivala funkci winsock pro komunikaci pres tcp/ip ovsem na vyssi urovni, podobne jako komponenta TSockets v delphi2.
Problem je v tom jak dll muze zavolat mou funkci (napr.ze prisly data, nebo ze se vyskytla chyba atd.) v programu, ktery je napsany napr. v PowerBuilderu nebo v necem jinem.
Dalo by se to vyresit napr. zavolanim funkce v dll, kde bych predal adresu na ktere zacina ma procedura v programu a ktera se ma volat?

jasne - cely Windows jsou tim prorostly (Callback functions). Akorat si budes muset v dll pohlidat jestli process, kterymu callback rutina patri jeste existuje.

Zdravi
D. Toman

Instalacia komponent v DELPHI3

[*] Michal ��ek����֫Ŭ?��e���n� - 23.4.1998 17:31:22

> P. Michal ,
>
>dakujem za informacie, ale aj tak mam este jedenu otazku.
>Ja som si tie iste komponenty stiahol s oznacenim pre Delphi 3, bola to
>Torry's page, ale tie komponenty odsahuju len subory DCU, znamena to teda
>ze nie su tie komponenty pouzitelne ? Ale na druhej strane nechapem preco
>by tam boli ako free download !
>Prosim Vas teda este o radu .
>
>Dakujem
> Ondrej Koziak , student.

Pokud jsi si je stahnul jako komponenty pro Delphi 3, tak by mely chodit.
Jsou-li totiz zkompilovany v Delphi 3, staci ti k instalaci komponent pouze
soubory .DCU. Pokud ti vsak pri jejich instalaci kompilator zahlasi chybu,
ze nemuze najit soubor .PAS jedna se zrejme o .DCU z Delphi 2, a zrejme
doslo k omylu na Torry's page.

Tim ze autor poskytne pouze soubory .DCU, chrani sve zdrojaky a pritom
poskytne komponenty vsem. Zpravidla se pak za zdrojove kody ( soubory .PAS)
pozaduje nejaka symbolicka cena ( 5$ ).

S pozdravem Michal ( taky student )

Jak zjistit uzivatele pripojene ze site ?

[*] Michal ��ek����֫Ŭ?��e���n� - 23.4.1998 17:45:16

Nazdar

nevedel by nekdo prosim, jak zjistit kdo je zrovna pripojen k memu pocitaci z lokalni site.
Jedna se o interni sit Windows. Jedna se mi o sluzbu kterou poskytuje program NetWatch z Windows. Marne jsem neco takoveho hledal. Asi jsem neco prehledl. Predpokladam ze to bude neco z API na zpusob WNetEnum...

predem diky

Michal


Vy nekdo jak pouzivat Transakce ??

[*] �ke��k Jaroslav�������6�����̿ - 23.4.1998 18:04:58

Zdravim.
No ja to pouzivam na Interbasi. Nevim jestli na lokal tabulkach tu funguje
dostatecne spolehlive. Ovsem technicky (programove) bude postup stejny.

Je to dost jednoduche. V podstate to mas dobre.
K propojeni dojde automaticky, protoze vsechny TQuery jsou pripojeny na
Tdatabase.
Alespon by to tak melo byt. Jakekoliv zmeny na kazde pripojene pripojene
TQuery
pak podlehaji Database1.StartTransaction, Data1.Database1.Commit a
Database1.Rollback
Jestlize tedy provedes napr. Rollback zrusi se zmeny na vsech TQuery (pokud
k nejakem doslo),
ktere jsou pripojeny k Database1 od posledniho StartTransaction, .

Je dobre (bezpcnejsi) pouzivat konstrukci Try except end
napr.

Data1.Database1.StartTransaction;
try
Query1.SQL.Add(update Tabulka set ..
Query1.Prepare;
Query1.ExecSql;
......
Data1.Database1.Commit; // Kdyz ExecSql
probehl dobre, tak potvrdit
except
Data1.Database1.Rollback; // Kdyz ne, tak
zahodit
Application.MessageBox('Smula, je to rozbit� ..... ', 'Informace
...', MB_OK + MB_ICONINFORMATION);
Close;
Exit;
end;

Staci?
ahoj Jaro.
-----------------------------------------------------------------------

>
>Muze my nekdo poradit jak pouzivat transakce ?
> Konkretne :
> mam tabulku (paradox) a potrebuju ji upravit s tim ze za
> urcitych okolnosti je treba vsechny upravy vratit
> spet(RollBack). Problem je v tom ze nevym jak to cele
> propojit.
>
> Pr.:
> Database.Transaction;
> ....
> SQL.Add(update Tabulka set ..
> SQL.Prepare;
> SQL.ExecSql;
> ....
> if .. then Database.RollBack;
> ...
>
> Jak tyto radky propojit s jednou tabulkou kterou sem sy v
> database desktopu vytvoril ??
>
> A jeste neco na konec :
> jaky vyznam ma pouziti Prepare ?? Dotazi a upravy fachci i bez
> toho.

Filtre

[*] TUNGLI Jan <tungli(zv)pvt.sk> - 23.4.1998 19:25:14

Asi budes sklamani ale Filter vlastnost neumoznuje pouzivat
bezne funkcie. Filter valstnost je pomerne hlupa vie iba <,>,= and or
a zatvorky.
Mozne alternativy :
1. pouzit Query a SQL dotaz miesto Table
2. OnFilterRecord vlastnosti osetrit veci
3. alebo ine sarlatanstvo
Tungli J.
tungli(zv).pvt.sk


----------
Od: Ing.Jozef Strn�dik <strnadik(zv)mrp.sk>
Pre: 'DELPHI Distribution List' <delphi(zv)pinknet(tec)cz>
Predmet: RE: Filtre
D�tum: 23. apr�l 1998 14:37

> Skusal som
> Table.Filter := 'INT(HODNOTA) = 10' ;
> ale neuspel som takze teraz pouzivam
> Table.Filter := 'HODNOTA >= 10 AND HODNOTA<11';

Tenhle pripad bych radeji resil pomoci

Table.IndexFieldNames := 'bleble;blelbe';
Table.SetRange([LowValue1, LowValue2], [HighValue1, HighValue2])
try
.....
finally
Table.CancelRange;
end

[J.S.]

Tuto variantu som zamietol uz skor, pretoze s urcitych dovodov nemozem indexovat podla 'bleble;bleble'.
Svoju otazku teda preformulujem radsej takto:
Je mozne v property Filter prip. pri zostavovani Expression Indexov pouzivat funkcie zname s dBase resp. FoxPro ? Ak ano kde mozem najst ich zoznam.

Napr. pouzitie fcie STR() pri zostavovani indexov mi funguje.


Jozef Strnadik
E-mail: strnadik(zv)mrp.sk

----------


IBObject - prima konektivita k Interbsi

[*] �ke��k Jaroslav�������6�����̿ - 23.4.1998 19:25:45

Ja vim. O to neslo. Jasne ze pouzivam SQL pristup, ulozene procedury a pod.
Je tez samozrejme ze vtip prace SQL spociva v natahovani co nejmensiho
mnozstvi dat na klienta.
Ale kdyz zkousim ktery pristup je rychlejsi, tak to nezjistim vyberem 10
vet.
Testuju databazi 400.000,- zaznamu a pozadam treba o mnozinu 10.000,-
Zatezovym parametrem je pro mne napr. presun na konec datasetu, treba
TQuery.Last, TQuery.Firsrt
nebo to udelam pomoci navigatoru, potahnutim za listu v gridu a pod.
Jestli to v jednom pripade trva 40 sec a v druhem 4 sec (na tech 10.000).
Jestli je i pro stejne operace rozdilna doba trvani Query1.Open,
pak se musim zamyslet nad tim, ze ty knihovny jsou mozna udelany lepe nez
SQL links
a zajimam se proto o ne.
Nevim, co presne mate na mysli tim "zaznamovo orientovany pristup". Jetli
tim myslite pripojeni
pomoci TTable, tak v tom to neni. Temer vyhradne pouzivam TQuery a SQL
jazyk.
------

>Ako sledujem vasu debatu, usudil som ze pouzivate zaznamovo orientovany
pristup
>k udajom. Tento pristup na SQL server je pomaly. Keby ste pouzily SQL
pristup tak vysledok mate takmer okamzite a to aj na 100MB databazy. Mam
velmi dobre skusenosti s IB, ovsem dosledne sa vyhibam urcitim veciam:
Locate, SetKey atd. prikazom ktore sposobuju ze logalne sa spracovava
>dotaz.
Nechajte spracovanie na IB SERVER vsetko cez SQL a uvidite ze vsetko
prebehne takmer za nenameratelny cas. Samozrejme to ma urcite obmedzenie ako
napriklad nemozete sa nastavit na urcity zaznam iba filtrovat vo WHERE casti
dotazu atd. Tungli Jan
----
Spracovani nechavam na serveru, ale nekdy potrebuju data zobrazit k
prohlizeni i ve vetsim mnozstvi.
Uvedu priklad z praxe.
Kdyz mam napr. v jedne nejmenovane vetsi nemocnici zobrazit v saldu
neuhrazene faktury, tak jich tam je (x) tisic
az za nekolik let zpatky. Obsluha si je prolistuje a najde ty, ktere urcil
los. No tak to neni, ale vybere nektere
k uhrade podle klice, ktery ani nechtejte vedet. Proste nejde to
algoritmizovat.
Asi blbej priklad, ale nekdy je to proste potreba.

Vychazim tez z toho, ze kdyz je neco rychlejsi na vetsi mnozine dat, tak to
bude rychlejsi i na mensi mnozene,
i kdyz tam ty rozdily nabudou tak patrne.
Ta rychlost nebyla jedina zajimavost na tech IB objektech - ono toho tam je
vic.

Nyni delame na projektu pristupu k datum na Interbasi po Internetu. Tam je
dobra kazda sec.

Zatim tedy velice dekuji vsem za namety. Vyzkousim to a kdyz neco zajimaveho
objevime, tak dam vedet.
Jaro

>
>--------------------------------------------------------
>> Od: Pavel Cisar <pcisar(zv)aktis(tec)cz>
>> Pre: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
>> Predmet: Re: IBObject - prima konektivita k Interbsi
>> D�tum: 23. apr�l 1998 9:48
>>
>> IB objekty jsou pekne, ale na muj vkus trochu drahe (na to, ze jsou mirne
>> receno "neucesane"). Jako alternativu doporucuji vasi ctene pozornosti
>> FreeIBComponents k mani (byt zatim jen v dosti "horke" betaverzi) na
>> http://www.interbase.com (hned vedle FreeUDFLib). Jsou u toho kompletni
>> zdroje a je to podstatne "odlehcenejsi", ale take chudsi nez IBO (ale nam
>> slouzi s trochou domaci prace vice nez dobre :-)
>>
>> Co se tyce platby do ciziny, osvedcila se nam VISA karta a platba po webu
>> (jinak se na toto tema jiz mluvilo pred casem, snad mozno vyhledat v
>> archivu).
>>
>> >Pred nedavnem jsem s jednim pritelem objevil uzasnou vec.
>> >Z www.ibbject.com jsme stahli mnozstvi komponent pro primy pristup
>> >k Interbasi. Zjistili jsme, ze v mnoha pripadech je to az nekolikansobne
>> >rychlesi nez pri pouziti SQL links nebo ODBC.
>> >Napr. pri vyberu 10.0000,- zaznamu nam trva normalne presun na posledni
>> >zaznam az 40 sec. Pri pouziti konektivity IB to same trvalo asi 1 sec.
>> >Vim, ze tyto objekty jsou na tomto serveru jiz dele. Mozna jsme
>> >jen znovu objevili Ameriku.
>> >Proto se chci zeptat, zda s tim nema jiz nekdo zkusenosti a zda nevi
>> >nekdo kde to u nas koupit. Na tom webu uvadeji cenu asi 400 US.
>>
>>
>>

Filtre

[*] psoft <psoft(zv)kosice.telecom.sk> - 23.4.1998 21:29:26

> > >> maturujem nad pouzivanim filtrov v Delphi (TTable i TQuery). <<
> >
> > Nezlob se na me, ale v cestine to vyzni tak, jako ze jsi skutecne
> > maturant.
> Zbysku, nevim jak Ty, ale ja to pochopil ve smyslu "jsem z toho
> zmateny". alespon u nas se pojem "maturuju z neceho" pouziva v tomhle
> smyslu.

Som rad, ze aj v Cesku existuje zmysel pre nadsadzku a humor. Aj ked
po tychto prispevkoch sa mi zda, ze je to velmi ojedinele.

Dakujem za pochopenie autorovi predchadzajucej poznamky.
> ''''
> (O O)
> +-------------oOO------(_)--------------------+
> | PSOFT, ing.Peter Cirip |
> | Sibirska 18, 080 01 Presov, Slovensko |
> | Mobil : 0903 601 068 091/723 104 |
> | E-mail: psoft(zv)ke.telecom.sk |
> | WEB : http://www.ke.telecom.sk/psoft/ |
> +-------------------------------oOO-----------+
> |__|__|
> || ||
> ooO Ooo
>

IBObject - prima konektivita k Interbsi

[*] TUNGLI Jan <tungli(zv)pvt.sk> - 23.4.1998 22:13:49

Pisete ze :
"Zatezovym parametrem je pro mne napr. presun na konec datasetu, treba
TQuery.Last, TQuery.Firsrt
nebo to udelam pomoci navigatoru, potahnutim za listu v gridu a pod.
Jestli to v jednom pripade trva 40 sec a v druhem 4 sec (na tech 10.000)."
A prave to co tu robite je zaznamovo orientovany pristup.
Ked takto sa chcete dostat na posledny zaznam tak sa stava to ze server vam postupne posiela celu databazu napr s 10 000 zaznamem, lebo operacie,
NEXT,LAST,PREV,MOVEBY pracuju iba na klientskej strane a nie na servri a
to ma za nasledok ze server musi posielat vsetky zaznamy.
SQL pristup neumoznuje nastavit sa na nejaky zaznam, iba vratit skupinu
zaznamov. Je to velka zmena oproti DBF a ine databazy.
Prave planujem vytvorit databazu, ktora umoznuje obydve pristupy a mnoho ine,
napr. specifikovat izolacny uroven transakcii,
specifikovat paralelne nepristupne transakcie
rozne sposoby prace transakcii na stejnom urovni izolace
exkluzivne transakcie
atd.
Prave hladam sponzora na tuto pracu, ktora by mal trvat pol roka.
Tungli J.
tungli(zv)pvt.sk





----------
> Od: �ke��k Jaroslav <jaro(zv)zbk(tec)czn(tec)cz>
> Pre: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
> Predmet: Re: IBObject - prima konektivita k Interbsi
> D�tum: 23. apr�l 1998 19:25
>
> Ja vim. O to neslo. Jasne ze pouzivam SQL pristup, ulozene procedury a pod.
> Je tez samozrejme ze vtip prace SQL spociva v natahovani co nejmensiho
> mnozstvi dat na klienta.
> Ale kdyz zkousim ktery pristup je rychlejsi, tak to nezjistim vyberem 10
> vet.
> Testuju databazi 400.000,- zaznamu a pozadam treba o mnozinu 10.000,-
> Zatezovym parametrem je pro mne napr. presun na konec datasetu, treba
> TQuery.Last, TQuery.Firsrt
> nebo to udelam pomoci navigatoru, potahnutim za listu v gridu a pod.
> Jestli to v jednom pripade trva 40 sec a v druhem 4 sec (na tech 10.000).
> Jestli je i pro stejne operace rozdilna doba trvani Query1.Open,
> pak se musim zamyslet nad tim, ze ty knihovny jsou mozna udelany lepe nez
> SQL links
> a zajimam se proto o ne.
> Nevim, co presne mate na mysli tim "zaznamovo orientovany pristup". Jetli
> tim myslite pripojeni
> pomoci TTable, tak v tom to neni. Temer vyhradne pouzivam TQuery a SQL
> jazyk.
> ------
>
> >Ako sledujem vasu debatu, usudil som ze pouzivate zaznamovo orientovany
> pristup
> >k udajom. Tento pristup na SQL server je pomaly. Keby ste pouzily SQL
> pristup tak vysledok mate takmer okamzite a to aj na 100MB databazy. Mam
> velmi dobre skusenosti s IB, ovsem dosledne sa vyhibam urcitim veciam:
> Locate, SetKey atd. prikazom ktore sposobuju ze logalne sa spracovava
> >dotaz.
> Nechajte spracovanie na IB SERVER vsetko cez SQL a uvidite ze vsetko
> prebehne takmer za nenameratelny cas. Samozrejme to ma urcite obmedzenie ako
> napriklad nemozete sa nastavit na urcity zaznam iba filtrovat vo WHERE casti
> dotazu atd. Tungli Jan
> ----
> Spracovani nechavam na serveru, ale nekdy potrebuju data zobrazit k
> prohlizeni i ve vetsim mnozstvi.
> Uvedu priklad z praxe.
> Kdyz mam napr. v jedne nejmenovane vetsi nemocnici zobrazit v saldu
> neuhrazene faktury, tak jich tam je (x) tisic
> az za nekolik let zpatky. Obsluha si je prolistuje a najde ty, ktere urcil
> los. No tak to neni, ale vybere nektere
> k uhrade podle klice, ktery ani nechtejte vedet. Proste nejde to
> algoritmizovat.
> Asi blbej priklad, ale nekdy je to proste potreba.
>
> Vychazim tez z toho, ze kdyz je neco rychlejsi na vetsi mnozine dat, tak to
> bude rychlejsi i na mensi mnozene,
> i kdyz tam ty rozdily nabudou tak patrne.
> Ta rychlost nebyla jedina zajimavost na tech IB objektech - ono toho tam je
> vic.
>
> Nyni delame na projektu pristupu k datum na Interbasi po Internetu. Tam je
> dobra kazda sec.
>
> Zatim tedy velice dekuji vsem za namety. Vyzkousim to a kdyz neco zajimaveho
> objevime, tak dam vedet.
> Jaro
>
> >
> >--------------------------------------------------------
> >> Od: Pavel Cisar <pcisar(zv)aktis(tec)cz>
> >> Pre: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
> >> Predmet: Re: IBObject - prima konektivita k Interbsi
> >> D�tum: 23. apr�l 1998 9:48
> >>
> >> IB objekty jsou pekne, ale na muj vkus trochu drahe (na to, ze jsou mirne
> >> receno "neucesane"). Jako alternativu doporucuji vasi ctene pozornosti
> >> FreeIBComponents k mani (byt zatim jen v dosti "horke" betaverzi) na
> >> http://www.interbase.com (hned vedle FreeUDFLib). Jsou u toho kompletni
> >> zdroje a je to podstatne "odlehcenejsi", ale take chudsi nez IBO (ale nam
> >> slouzi s trochou domaci prace vice nez dobre :-)
> >>
> >> Co se tyce platby do ciziny, osvedcila se nam VISA karta a platba po webu
> >> (jinak se na toto tema jiz mluvilo pred casem, snad mozno vyhledat v
> >> archivu).
> >>
> >> >Pred nedavnem jsem s jednim pritelem objevil uzasnou vec.
> >> >Z www.ibbject.com jsme stahli mnozstvi komponent pro primy pristup
> >> >k Interbasi. Zjistili jsme, ze v mnoha pripadech je to az nekolikansobne
> >> >rychlesi nez pri pouziti SQL links nebo ODBC.
> >> >Napr. pri vyberu 10.0000,- zaznamu nam trva normalne presun na posledni
> >> >zaznam az 40 sec. Pri pouziti konektivity IB to same trvalo asi 1 sec.
> >> >Vim, ze tyto objekty jsou na tomto serveru jiz dele. Mozna jsme
> >> >jen znovu objevili Ameriku.
> >> >Proto se chci zeptat, zda s tim nema jiz nekdo zkusenosti a zda nevi
> >> >nekdo kde to u nas koupit. Na tom webu uvadeji cenu asi 400 US.
> >>
> >>
> >>
>

Malilinky off-topic

[*] TUNGLI Jan <tungli(zv)pvt.sk> - 23.4.1998 22:25:18

Keby sa Vami podarilo tento problem optimalizovat
tak by som bol velmi prekvapeny. Ked sa jedna o
obecny siet tak neexistuje ziadny algoritmus ktory by
dokazal aspon byt trosku rychlejsi ako algorimus hrubej sily.
Heuristicky algoritmus moze byt vytvoreny iba ked poznate urcite
pravidla ktorym sa da charkterizovat siet. Ale aj tak by to bolo len
sarlatanstvo.
Male zlepsenie sa da dosiahnut,
ked cesty do uzlov su utriedene podla vekosti a podla uzlov.


Tungli J.
tungli(zv)pvt.sk

----------
> Od: No Comment Group, s.r.o. - Sales dept. <sales(zv)nocomment.sk>
> Pre: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
> Predmet: Malilinky off-topic
> D�tum: 6. apr�l 1998 18:41
>
> Ehm, mam taky mensi problem ktory je s delphi viazany cisto
> v implementacnom kontexte. Potreboval by som velmi sikovne
> algoritmizovat vyhladavanie optimalnych cestovnych planov. V
> praxi sa jedna o vyhladanie najlepsej cesty z A do B nad
> databazou autobusovych planov... Doteraz to je
> implementovane pomocou hrubej sily co nie je zrovna
> najefektivnejsie. Pokial by niekto mal zaujimavy napad,
> prosim reply na sukromny mail popripade pokial admin nebude
> proti aj tu.
>
> dakujem
>
> Richard Willmann
>
>

Tisk na port

[*] Ing. Zdenek Sraier <sraierzd(zv)czn(tec)cz> - 23.4.1998 22:51:23

> Tim padem musi fungovat i programova konstrukce:
>
> assign(f, '\\server\tiskarna');
> rewrite(f);
> writeln(f, 'bleble');
> close(f);
>
> J.Jahoda
>
Diky, funguje.
Zkousel jsem to pouze na tiskarne sdilene pres Windows.
Zitra to jeste musim zkusit na Novella.

Trochu me mate, ze ted mi funguje i
"copy c:\autoexec.bat \\server\tiskarna" z prikazove
radky. Tohle je pochopitelne prvni vec, kterou jsem zkousel
jiz pred davnou dobou. Nefungovalo to.
Musim to zkusit na toho Novella.


S pozdravem Zdenek
---------------------------------------------------------
: o__o Zdenek Sraier sraierzd(zv)czn(tec)cz :
: ( o o) users(tec)czn(tec)cz/~sraierzd/ :
: (. .) Stranky Potapecske www.byll(tec)cz/scuba/ :
---------------------------------------------------------


IBObject - prima konektivita k Interbsi

[*] Martin Fronek <FRONEK(zv)FIC.CZ> - 23.4.1998 23:12:18

Zdravim Jaro,
=?iso-8859-2?B?qWtl+O1rIEphcm9zbGF2?= wrote:

> Uvedu priklad z praxe.
> Kdyz mam napr. v jedne nejmenovane vetsi nemocnici zobrazit v saldu
> neuhrazene faktury, tak jich tam je (x) tisic
> az za nekolik let zpatky. Obsluha si je prolistuje a najde ty, ktere urcil
> los. No tak to neni, ale vybere nektere
> k uhrade podle klice, ktery ani nechtejte vedet. Proste nejde to
> algoritmizovat.
> Asi blbej priklad, ale nekdy je to proste potreba.

To neni blbej priklad, to je typickej priklad. Znam taky par takovych
podniku. Zalezi, kdo da vic.... atd.

Vy nekdo jak pouzivat Transakce ??

[*] Zdeno Jasek <zdeno.delphi(zv)mailcity(tec)com> - 23.4.1998 23:13:47 -0700

>Muze my nekdo poradit jak pouzivat transakce ?
> Konkretne :
> mam tabulku (paradox) a potrebuju ji upravit s tim ze za
> urcitych okolnosti je treba vsechny upravy vratit

Obavam sa, ze paradoxovske databazy transakcie nepodporuju... Transakcie su vlastnostou
SQL databaz.

> jaky vyznam ma pouziti Prepare ?? Dotazi a upravy fachci i bez
> toho.

Prepare prelozi SQL prikaz (skompiluje), ale nevykona. ExecSQL sa najprv pozrie,
ci je prikaz uz skompilovany a ak ano, tak ho uz nekompiluje, ale len spusti. Takto
sa da usetrit cas pri opetovnom spustani toho isteho SQL prikazu s inymi parametrami
s tym, ze sa skompiluje len raz. Samotny ExecSQL totiz skompilovany SQL neodlozi.
Get your FREE, private e-mail
account at http://www.mailcity.com


vypocet

[*] info(zv)saton(tec)cz (SATON Glass s.r.o.) - 24.4.1998 00:15:50


Zdrav�m,
mam ciste matematicky problem. Vim, ze na vypocet napr. 2+4*5+9-5/5 existuje specialni metoda (viz kalkulacka).
Budu velice rad, kdyby mne ji nekdo osvetlil, nebo odkazal na nejaky dostupny zdroj.
Diky moc. Kuba

Kupka Lubom�r
-------------------------------------------------------------------------------------------------------------
SATON Glass, s.r.o. - slu�by v oblasti programov�n� a v�po�etn� techniky
Klicperova 26, Brno, 628 00 �R
Tel.:+420 5 44217819 Fax.:+420 5 44217529
Mob:+420 603 429505
-------------------------------------------------------------------------------------------------------------


vypocet

[*] TUNGLI Jan <tungli(zv)pvt.sk> - 24.4.1998 01:19:29

Neporozumel som o co ti ide. Potrebujes program na vyhodnotenie algebraickych vyrazov, alebo potrebujes vediet ako to mas naprogramovat?
Tungli(zv)pvt.sk

----------
Od: SATON Glass s.r.o. <info(zv)saton(tec)cz>
Pre: 'DELPHI Distribution List' <delphi(zv)pinknet(tec)cz>
Predmet: vypocet
D�tum: 24. apr�l 1998 0:15

Zdrav�m,
mam ciste matematicky problem. Vim, ze na vypocet napr. 2+4*5+9-5/5 existuje specialni metoda (viz kalkulacka).
Budu velice rad, kdyby mne ji nekdo osvetlil, nebo odkazal na nejaky dostupny zdroj.
Diky moc. Kuba

Kupka Lubom�r
-------------------------------------------------------------------------------------------------------------
SATON Glass, s.r.o. - slu�by v oblasti programov�n� a v�po�etn� techniky
Klicperova 26, Brno, 628 00 �R
Tel.:+420 5 44217819 Fax.:+420 5 44217529
Mob:+420 603 429505
-------------------------------------------------------------------------------------------------------------

----------


Pouzivanie interfaceov

[*] Zdeno Jasek <zdeno.delphi(zv)mailcity(tec)com> - 24.4.1998 06:23:45 -0700

Pouziva niekto pri OOP interface? Programujem sucasne aj v Jave a dost som si na
to zvykol a paci sa mi to. V Delphach vsak treba s nimi nejako specialne narabat
a ked som ich zakomponoval do programu, zacal mi dost padat a nie vzdy mi fungoval
tak, ako by som ocakaval.

Ide mi o moznost deklarovat objekt sposobom
type
TMyObject = class( IMyInterface, TMyInyObject )

kde prave IMyInterface by mal byt interface. V Delphi vsak kazdy interface vyzaduje
implementaciu metody __AddRef ... apod., co sa mi vobec nepaci, lebo ma to nuti opakovane
pisat ten isty kod. Ide to aj inak?
Get your FREE, private e-mail
account at http://www.mailcity.com


Filtre ... aneb konec velkemu nedorozumeni.

[*] psoft <psoft(zv)kosice.telecom.sk> - 24.4.1998 06:40:27

> Nedostanete tam napriklad presne to same co umi LIKE. Ale na druhe strane
> OnFiltered zase dava podstatne vetsi volnost programatorovi a muzete tam
> udelat i to co je pres WHERE obtizne. Kdyz jsem psal na tema
> OnFiltered, tak prece pisu k veci. Vzdyt je to tez filtrovani, pouze se
> ta podminka pise jinam.

Je mi vsetko jasne, dakujem za odpovede. Ale stale mi nie je jasne,
preco pri local SQL (napr. DBF alebo DB subor na solo stroji - hadam
najjednoduchsi pripad) - je rozdiel mezdi WHERE a filter. Ved vtedy
musia hadam fungovat rovnako. A vyber robi ten isty - BDE - nie
nejaky server.


K OnFiltered - ano, ma podstatne sirsie moznosti - ale vadi mi na to
jedno - tu podmienku musim dopredu vediet. Co ale ak chcem ju urobit
tak, aby ju mohol definovat uzivatel ? Dat napr. nejaky Edit alebo
memo box, kde si ju jednoducho napise. A tu mi chyba cosi take ako ma
napr. PC Fand (mimochodom jedna z najlespich databaz pod DOS, ceskej
vyroby ...), a to funkcia EValB(s:String) - analyzuje s v prislusnej
syntaxi a vyhodnoti ako vzorec. Toto v Delphi zatial neviem, resp.
uz aj mam nato nejaky komponent, ale zatial ho nemam tak
prepracovany, aby som s nim bol spokojny. Preto som samozrejme hladal
jednoduchsiu cestu - Filter.

(Mimochodom - k tej volnosti prekladu - uz si zvykam na Borland i
Microsoft. Volne povedane Trabant is equal to Mazda je pravdivy
vyrok. Na oboch sa totiz odvezies. Zvysok ta nemusi zaujimat :)))),
aspon podla dvoch vyssie spomenutych firiem.
)
> ''''
> (O O)
> +-------------oOO------(_)--------------------+
> | PSOFT, ing.Peter Cirip |
> | Sibirska 18, 080 01 Presov, Slovensko |
> | Mobil : 0903 601 068 091/723 104 |
> | E-mail: psoft(zv)ke.telecom.sk |
> | WEB : http://www.ke.telecom.sk/psoft/ |
> +-------------------------------oOO-----------+
> |__|__|
> || ||
> ooO Ooo
>

Berva r�mu

[*] Ing. Jahoda Jaroslav <Jaroslav.Jahoda(zv)lesprojekt(tec)cz> - 24.4.1998 07:27:40

Pokud vim, tak v MS Office ram ma vzdy systemovou barvu. To u ceho
menite barvy je panel MS Office a ten lze udelat libovonym zpusobem v
Delphi pres Canvas,atd. Ram je ta nejmensi ploska v MS Office, ktera
obsahuje Systemove menu s polozkami Obnovit, Minimalizovat, Schovavat,
Upravit, ..., Konec. A ta ma barvy dle systemu.

J.Jahoda

> -----P�vodn� zpr�va-----
> Od: Ing. Lud�k Florian [SMTP:bluerose(zv)pce(tec)cz]
> Odesl�no: 23. dubna 1998 8:59
> Komu: DELPHI Distribution List
> P�edm�t: Berva r�mu
>
> Hi,
>
> nemate nekdo tuseni, jak se da udelat plynuly barevny prechod v ramu
> formulare ? Myslim tim to, co ma treba panel u MS Office.
>
> Bye Ludan
>
> ludan(zv)bluerose(tec)cz
>

Vy nekdo jak pouzivat Transakce ??

[*] Ing. Jahoda Jaroslav <Jaroslav.Jahoda(zv)lesprojekt(tec)cz> - 24.4.1998 07:31:11

Tady doslo k zasadnimu nepochopeni pouziti transakci. Transakce lze
pouzit POUZE !!!! u databazi, ktere jsou za timto ucelem vytvorene
dBase, FoxPro, Paradox a jim podobne to v zadnem pripade neumoznuji ani
kdyz k nim pristupujete pres ODBC a SQL prikazy. Transakce jsou urceny
pro databaze typu Interbase, MSSQL, Oracle, Sybase aj.

J.Jahoda

> -----P�vodn� zpr�va-----
> Od: Radim Kittner, st. ??-98, UAI [SMTP:XKITTN00(zv)kinf.fme.vutbr(tec)cz]
> Odesl�no: 23. dubna 1998 16:41
> Komu: delphi(zv)pinknet(tec)cz
> P�edm�t: Vy nekdo jak pouzivat Transakce ??
>
>
> Muze my nekdo poradit jak pouzivat transakce ?
> Konkretne :
> mam tabulku (paradox) a potrebuju ji upravit s tim ze za
> urcitych okolnosti je treba vsechny upravy vratit
> spet(RollBack). Problem je v tom ze nevym jak to cele
> propojit.
>
> Pr.:
> Database.Transaction;
> ....
> SQL.Add(update Tabulka set ..
> SQL.Prepare;
> SQL.ExecSql;
> ....
> if .. then Database.RollBack;
> ...
>
> Jak tyto radky propojit s jednou tabulkou kterou sem sy v
> database desktopu vytvoril ??
>
> A jeste neco na konec :
> jaky vyznam ma pouziti Prepare ?? Dotazi a upravy fachci i bez
> toho.

dotaz

[*] Ing. Jahoda Jaroslav <Jaroslav.Jahoda(zv)lesprojekt(tec)cz> - 24.4.1998 07:34:32

Mezi diskama nelze provatet rename ci move. Pokud v tomto pripade budete
argumentovat programy jako napr Norton Commander, Volkov Commander ci
FAR, tak si uvedomte, tak si zkuste napr 5 MB file move z C na sitovy
disk pomoci VC a uvidite, ze on nejprve provede zkopirovani a potom
zruseni originalu.

J.Jahoda

> -----P�vodn� zpr�va-----
> Od: Ales Krautvor [SMTP:krautvor(zv)mona(tec)cz]
> Odesl�no: 23. dubna 1998 14:58
> Komu: DELPHI Distribution List
> P�edm�t: dotaz
>
> Hi all,
> Potrebuji prenest (move) soubor z disku C na sitovy disk (Novell, 32B
> klient) .
> Zkousel jsem Renamefile, ale pocitac mi vzdy ohlasil chybu v modulu.
>
> Muzete mi poradit, kde je problem?
>
>
> --
> ********************************************************************
> * Mona v.o.s. *
> * krautvor(zv)mona(tec)cz Ales Krautvor *
> * tel.: 96 162 404 Mala Stepanska 17 *
> * 120 79 Praha 2 *
> * -O|O- "Nemusi prset, pokud aspon kape." *
> ********************************************************************
>

Tisk na port

[*] Ing. Jahoda Jaroslav <Jaroslav.Jahoda(zv)lesprojekt(tec)cz> - 24.4.1998 07:36:38

To je pouze vec interni implementace prikazu assign a rewrite.> No to nevim, tohle je uz pascalska vec, ja pouzivam C++Builder.
> fronek(zv)fic(tec)cz
>
>
> Tim padem musi fungovat i programova konstrukce:
>
> assign(f, '\\server\tiskarna');
> rewrite(f);
> writeln(f, 'bleble');
> close(f);
>
> J.Jahoda
>
> > Jestlize pouzivate 32bit, pak lze jednoduse vygenerovat
> textovy soubor
> > na disk (napriklad) a pak ho okopirovat na \\server\tiskarna
>

Filtre

[*] Ing. Jahoda Jaroslav <Jaroslav.Jahoda(zv)lesprojekt(tec)cz> - 24.4.1998 07:41:54

Budem s Vami polemizovat. Indexovat by to melo jit, nevidim duvod proc
ne, ale to je Vase vec. Me by spise zajimalo, jak dosahnout toho, aby
pri hledani zaznamu pro podminku Hodnota=10 se neprovadel FullScan
neboli se to netestovalo zaznam po zaznamu. Pokud Vam ani toto nevadi,
pak uz nezalezi jak se to udela, protoze pomoci OnFilterRecord lze
udelat vse a on stejne jako v pripade property Filter provadi fullscan,
neboli testovani zaznamu po zaznamu.

J.Jahoda

> -----P�vodn� zpr�va-----
> Od: strnadik(zv)mrp.sk [SMTP:strnadik(zv)mrp.sk]
> Odesl�no: 23. dubna 1998 14:37
> Komu: 'DELPHI Distribution List'
> P�edm�t: RE: Filtre
>
> > Skusal som
> > Table.Filter := 'INT(HODNOTA) = 10' ;
> > ale neuspel som takze teraz pouzivam
> > Table.Filter := 'HODNOTA >= 10 AND HODNOTA<11';
>
> Tenhle pripad bych radeji resil pomoci
>
> Table.IndexFieldNames := 'bleble;blelbe';
> Table.SetRange([LowValue1, LowValue2], [HighValue1,
> HighValue2])
> try
> .....
> finally
> Table.CancelRange;
> end
>
> [J.S.]
>
> Tuto variantu som zamietol uz skor, pretoze s urcitych dovodov
> nemozem indexovat podla 'bleble;bleble'.
> Svoju otazku teda preformulujem radsej takto:
> Je mozne v property Filter prip. pri zostavovani Expression
> Indexov pouzivat funkcie zname s dBase resp. FoxPro ? Ak ano kde mozem
> najst ich zoznam.
>
> Napr. pouzitie fcie STR() pri zostavovani indexov mi funguje.
>
>
> Jozef Strnadik
> E-mail: strnadik(zv)mrp.sk
>

Delphi2 - grafika a label

[*] Ing. Jahoda Jaroslav <Jaroslav.Jahoda(zv)lesprojekt(tec)cz> - 24.4.1998 07:46:03

Temer, ale ta nepouziva MemoryMappedBitmap. Takze pri prekreslovani se
vykresli cela vektorova krezba znovu, coz muze trvat pekne dlouho.

J.Jahoda

> -----P�vodn� zpr�va-----
> Od: RADIK(zv)p15.monet(tec)cz [SMTP:RADIK(zv)p15.monet(tec)cz]
> Odesl�no: 23. dubna 1998 13:17
> Komu: delphi(zv)pinknet(tec)cz
> P�edm�t: RE: Delphi2 - grafika a label
>
> Neni ta vase komponenta temer presne totez co TPaintBox?
>
> Ales
>
> ----------
> Od: Ing. Jahoda Jaroslav
> Komu: DELPHI Distribution List
> P�edm�t: RE: Delphi2 - grafika a label
> Datum: 23. duben 1998 11:00
>
> Neco podobneho mam vyreseno a je to reseno takto:
>
> Udelal jsem komponentu, ktera je potomkem TWinControl a jsou
> predeklarovany metody WMPaint a PaintWindow.
>
> Komponenta si udela tzv. MemoryMappedBitmap (lze takto nastavit
> Canvas)
> a do te se vse vykresli a v metode WMPaint se vse vykresli na
> obrazovku.
> No a do Canvasu mohu nakreslit cokoliv, ale musim si to udelat sam.
> Bitmapu, Ikony, Texty aj.
>
> J.Jahoda


IBObject - prima konektivita k Interbsi

[*] Vodnansky David <Vodnansky(zv)allianz(tec)cz> - 24.4.1998 08:23:51

Tvrdit, ze pouzitim SQL se vsechny dotazy vyridi za "nemeritelny cas"
muze snad jenom nekdo, kdo to vubec nezkusil.... Mam napriklad aplikaci
v Interbase, kde nejvetsi tabulky maji jenom radove 100.000-500.000
zaznamu a muzu uvest priklady rady SQL prikazu, ktere trvaji rozhodne
meritelny cas - napriklad minuty (SELECT z vice tabulek, se slozitejsi
podminkou a tridenim), az desitky minut (UPDATE).

Podotykam, ze to cele bezi na serveru 2xPII/233 Mhz,128 MB RAM, takze
zadne orezavatko.

> -----P�vodn� zpr�va-----
> Od: TUNGLI Jan [SMTP:tungli(zv)pvt.sk]
> Odesl�no: 23. dubna 1998 15:03
> Komu: DELPHI Distribution List
> P�edm�t: RE: IBObject - prima konektivita k Interbsi
>
> Ako sledujem vasu debatu, usudil som ze pouzivate zaznamovo
> orientovany pristup
> k udajom. Tento pristup na SQL server je pomaly. Keby ste pouzily
> SQL pristup tak vysledok mate takmer okamzite a to aj na 100MB
> databazy. Mam velmi dobre skusenosti s IB, ovsem dosledne sa
> vyhibam urcitim veciam: Locate, SetKey atd. prikazom ktore
> sposobuju ze logalne sa spracovava
> dotaz. Nechajte spracovanie na IB SERVER vsetko cez SQL a uvidite ze
> vsetko prebehne takmer za nenameratelny cas. Samozrejme to ma
> urcite obmedzenie ako napriklad nemozete sa nastavit na urcity
> zaznam iba filtrovat vo WHERE casti dotazu atd. Tungli
Jan
> tungli(zv)pvt.sk
>

Berva r�mu

[*] Petr Studeny <studeny(zv)olympo(tec)cz> - 24.4.1998 08:36:03


Podivej se na DSP na komponentu

GradientBtn, ma to docela dobre udelany u tlacitek s velice
rozmanitym nastavenim.> From: "Ing. Lud�k Florian" <bluerose(zv)pce(tec)cz>
> To: "DELPHI Distribution List" <delphi(zv)pinknet(tec)cz>
> Subject: Berva r�mu
> Date: Thu, 23 Apr 1998 08:59:05 +0200
> Reply-to: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>

> Hi,
>
> nemate nekdo tuseni, jak se da udelat plynuly barevny prechod v ramu
> formulare ? Myslim tim to, co ma treba panel u MS Office.
>
> Bye Ludan
>
> ludan(zv)bluerose(tec)cz
>
>
>
>
----------------------------------------------------------------
Petr Studeny
OLYMPO controls Ltd. e-mail: studeny(zv)olympo(tec)cz
Havrankova 33, 619 00 Brno phone: +421-05-43216101-11
----------------------------------------------------------------


Berva r�mu

[*] PeJaSoft <petr.jarkovsky(zv)spsselib.hiedu(tec)cz> - 24.4.1998 08:43:23

> Hi,
>
> nemate nekdo tuseni, jak se da udelat plynuly barevny prechod v ramu
> formulare ? Myslim tim to, co ma treba panel u MS Office.
>
> Bye Ludan
>
> ludan(zv)bluerose(tec)cz
>

Podivej se po RX Library, tam je myslim jednotka RXGrdCpt.pas.
Pouzivani je jednoduchy (1 prikaz). (\__/) PeJaSoft
/o o \ ____ Petr Jarkovsky
{o__, +/~ _) (PASCAL,DELPHI,3D Studio 4, 3D Max 1.1)
/ + \ {
|-| ) \ E-Mail: domu: pejasoft(zv)post(tec)cz
,+( `+`\ } do skoly: petr.jarkovsky(zv)spsselib.hiedu(tec)cz
---+~_ _ _)-+` Homepage: http://www.spsselib.hiedu(tec)cz/~xjarkov
Zkrat: http://www.spsselib.hiedu(tec)cz/casopis/
Sypte veverkam !!!

Vy nekdo jak pouzivat Transakce ??

[*] TUNGLI Jan <tungli(zv)pvt.sk> - 24.4.1998 09:19:50

Nemozem suhlasit . Transakcie funguju aj na Paradox aj na DBF . Je samozrejme ze nie je to take betpecne ako u SQL. Ale delphi urobil kus prace v tom ze to
prave umoznuje.
Tungli(zv)pvt.sk

----------
> Od: Ing. Jahoda Jaroslav <Jaroslav.Jahoda(zv)lesprojekt(tec)cz>
> Pre: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
> Predmet: RE: Vy nekdo jak pouzivat Transakce ??
> D�tum: 24. apr�l 1998 7:31
>
> Tady doslo k zasadnimu nepochopeni pouziti transakci. Transakce lze
> pouzit POUZE !!!! u databazi, ktere jsou za timto ucelem vytvorene
> dBase, FoxPro, Paradox a jim podobne to v zadnem pripade neumoznuji ani
> kdyz k nim pristupujete pres ODBC a SQL prikazy. Transakce jsou urceny
> pro databaze typu Interbase, MSSQL, Oracle, Sybase aj.
>
> J.Jahoda
>
> > -----P�vodn� zpr�va-----
> > Od: Radim Kittner, st. ??-98, UAI [SMTP:XKITTN00(zv)kinf.fme.vutbr(tec)cz]
> > Odesl�no: 23. dubna 1998 16:41
> > Komu: delphi(zv)pinknet(tec)cz
> > P�edm�t: Vy nekdo jak pouzivat Transakce ??
> >
> >
> > Muze my nekdo poradit jak pouzivat transakce ?
> > Konkretne :
> > mam tabulku (paradox) a potrebuju ji upravit s tim ze za
> > urcitych okolnosti je treba vsechny upravy vratit
> > spet(RollBack). Problem je v tom ze nevym jak to cele
> > propojit.
> >
> > Pr.:
> > Database.Transaction;
> > ....
> > SQL.Add(update Tabulka set ..
> > SQL.Prepare;
> > SQL.ExecSql;
> > ....
> > if .. then Database.RollBack;
> > ...
> >
> > Jak tyto radky propojit s jednou tabulkou kterou sem sy v
> > database desktopu vytvoril ??
> >
> > A jeste neco na konec :
> > jaky vyznam ma pouziti Prepare ?? Dotazi a upravy fachci i bez
> > toho.

vypocet

[*] Zdenek Prantl <prantl(zv)ptc.pvt(tec)cz> - 24.4.1998 09:33:24


> Zdrav�m,
> mam ciste matematicky problem. Vim, ze na vypocet napr. 2+4*5+9-5/5 existuje
> specialni metoda (viz kalkulacka).
> Budu velice rad, kdyby mne ji nekdo osvetlil, nebo odkazal na nejaky dostupny
> zdroj.

Jde ti o priority operaci ?
tak neznizsi je scitani a odcitani
nad tim je nasobeni a deleni
nad tim jsou mocniny a odmocniny

...a nad tim vsim jsou zavorky 8-)

Jinak by to melo byt i v helpu (pokud ti slo o toto).

Bye Zdenek
prantl(zv)ptc.pvt(tec)cz

Transakce

[*] tomas.mazurek(zv)vitkovice(tec)cz - 24.4.1998 09:38:30

Hello,

Nebyl bych tak striktn� ve vylu�ov�n� transkac� u NE-SQL datab�z�. U
32-bit verze BDE existuje omezen� mo�nost transakc� i nap�. u
Paradoxu. Jde o to, �e u�ivatel resp. program�tor m� mo�nost ur�itou
v�c prov�st nebo odvolat. Neexistuje mo�nost automatick� obnovy
datab�ze po p�du syst�mu. V praxi to vypad� tak, �e ve�ker� zm�ny se
ukl�daj� do tabulek a tedy p�i p�du nen� samoz�ejm� jasn� co se
provedlo a co ne...

tomas.mazurek(zv)vitkovice(tec)cz


vyhledani spojeni A -> B

[*] Stepan Cerny <chaosz(zv)geocities(tec)com> - 24.4.1998 09:46:48

Hi,

sorry, ale otazku jsem neprozretelne odeslal do vecnych lovist, tagze
odpovidam jen tak z oleje.
(otazka: jak vyhledat spojeni z bodu A do bodu B (napr. autobusy) pomoci
alespon nejakeho algoritmu)

Coz takhle opatrit kazdy uzel site (zastavky), nejakyma souradnicema, X,
Y (napr. geograf.).
Potom, kdyz budu vedet ODKUD a KAM, tak budu vedet i SMER (neco jako
VEKTOR).
No a potom uz akorat budu hledat uzle co nejblize tomuto vektoru - v
podstate takovy koridor/reciste, kde vektor z A do B je stredem koryta
reciste, ktere se rozsiruje tak dlouho, dokud nenajdu pozadovane
spojeni.

* jelikoz je to bez hacku a carek tak: r~ec~is~te~ :-)))

Uff to byla docela drina vyjadrit se nevizualne - psanym slovem (nejlepe
se mi stejne pracuje s modelinou :-))) ).

Packo shledacko
Stepan Cerny
chaosz(zv)geocities.com


Vy nekdo jak pouzivat Transakce ??

[*] Marek Prokop <prokopsw(zv)czn(tec)cz> - 24.4.1998 09:55:54

To ovsem neni pravda. BDE umoznuje pouzivat transakce i na lokalni databaze
Paradox, dBase, atd. Samozrejme jsou zde urcita omezeni, protoze tyto
transakce probihaji na klientovi. Takze pokud vam spadne klient, rollback
se uz nikdy neprovede. Programove vsak rollback provest jde a funguje to.

Marek Prokop

On Friday, April 24, 1998 7:31 AM, Ing. Jahoda Jaroslav
[SMTP:Jaroslav.Jahoda(zv)lesprojekt(tec)cz] wrote:
> Tady doslo k zasadnimu nepochopeni pouziti transakci. Transakce lze
> pouzit POUZE !!!! u databazi, ktere jsou za timto ucelem vytvorene
> dBase, FoxPro, Paradox a jim podobne to v zadnem pripade neumoznuji ani
> kdyz k nim pristupujete pres ODBC a SQL prikazy. Transakce jsou urceny
> pro databaze typu Interbase, MSSQL, Oracle, Sybase aj.
>

Tisk na port

[*] Ing. Jahoda Jaroslav <Jaroslav.Jahoda(zv)lesprojekt(tec)cz> - 24.4.1998 10:17:35


> >
> > assign(f, '\\server\tiskarna');
> > rewrite(f);
> > writeln(f, 'bleble');
> > close(f);
>
> taky ze funguje. Akorat mam pocit ze F musi byt binary (ne text) a tim
> padem rewrite(f,1);
>
> Zdravi
> D. Toman
>
Jsem presvedcen, ze ne. Protoze F:text je vlastne obohaceny f:
file. Je doplnen od 128 B buffer a funguji na nem prikazy write a
writeln. Nefunguji na nem funkce seek a pod. Jinak je to je z hlediska
interni implementace shodne.

J.Jahoda


Format BMP souboru

[*] V�t�zslav Gazda������u��n�?��? - 24.4.1998 10:28:38

Potrebuji ulozit bitmapu do souboru. Zkusil jsem to pomoci TBitmap.
Vytvoreny soubor sel otevrit v aplikaci Malovani, ale nesel otevrit v
PaintShopu. Potrebuji nejaky univerzalni zpusob, aby byl soubor BMP
pouzitelny ve vsech aplikacich, ktere ho podporuji. Nema nekdo nejaky
kompletni a univerzalni popis formatu BMP ?

Diky Vita


Maxim�ln� width

[*] Leopold Grepl <Grepl(zv)melzer(tec)cz> - 24.4.1998 10:39:42

Ahoj Delphini,

m�m takov� zaj�mav� probl�m. Ve scrollboxu m�m shape a u n�ho nastavuji width. Pokud s width p�es�hnu 32000 a n�jak� drobn�, tak po��t� u� se z�porn�mi hodnotami. To vypad� jako by se pro width pou��val 2-bytov� integer, ale p�itom Delphi 3 jsou 32-bitov� a tud� by integer m�l b�t 4-bytov�, tedy a� do 2mld. Ve zdroj�c�ch je to opravdu integer.

Proto tedy nev�m, jak nakreslit shape s v�t�� ���kou ne� 32000.

Dal�� probl�m mi nast�v�, pokud range u scrollbaru je v�t�� ne� 65535. Potom se tam dan� shape dokonce opakuje v�cekr�t se za��tky
x * 65536 + Shape.left.

P�edem d�kuji za ka�dou odpov�d na m� dva dotazy.

Leopold Grepl
Melzer s.r.o.

vypocet

[*] Ing. Jindrich Danihelka <jidas(zv)mbox.vol(tec)cz> - 24.4.1998 10:46:57

SATON Glass s.r.o. wrote:
>
> Zdrav�m,
> mam ciste matematicky problem. Vim, ze na vypocet napr. 2+4*5+9-5/5 existuje specialni metoda (viz kalkulacka).
> Budu velice rad, kdyby mne ji nekdo osvetlil, nebo odkazal na nejaky dostupny zdroj.
> Diky moc. Kuba
>
> Kupka Lubom�r
> --

To se obecne resi tak, ze se vyraz prevede na "polskou notaci", ktera
respektuje
i priority operatoru a zavorek a pak se to jednoduse linearne spocita.
Ing. Jindrich Danihelka
E-Mail jidas(zv)mbox.vol(tec)cz
Tel. 038/57805
038/7512861


Transakce

[*] Ing. Jahoda Jaroslav <Jaroslav.Jahoda(zv)lesprojekt(tec)cz> - 24.4.1998 10:47:18

Transakce jsou ale o necem jinem, nez tady popisujete.

1. Transakce jsou ochranou proti vypadku
2. Ve viceuzivatelskem prostredi poskytuji druhym uzivatelum pouze
Commitovana data!!!

Z toho vyplyva, ze databaze je neustale v konzistentnim stavu, nejen z
hlediska indexu a intergrit, ale i z hlediska aplikacniho.
Kdyz chci provest 10 update na 10 tabulkach a po 5 tabulce mi padne
program (ne databaze, ne CEZ, ne Windows), tak databaze je ve stavu jako
kdybych tech 5 tabulek vubec ne updateoval. Jo nesmim mit nastaveny
AutoCommit, to by se Commit provadel po kazdem prikazu.

Timhle opravdu Paradox ani BDE neoplyva. Taky by mne zajimalo jak by se
Paradox vyporadal s tim, kdybych mo poslal:

db.StartTransaction
try
for i:=0 to 100000 do begin
Table.Insert
....
Table.Post
end;
db.Commit
except
db.rollback
end

Kam by to ten chudak BDE ci Paradox engine ulozil. Pokud do table.DB,
tak to ostatni uzivatele uvidi, ale to do Commit nesmi videt.
Co se tyce odvolani prikazu. Nevim co mate na mysli, pokud to vsak je
CachedUpdates, tak tady nemate jistotu jak dlouho to drzi v Cache a tech
100000 insertu urcite v cache nedrzi.

J.Jahoda

P.S. Priklad neni napsan optimalne, je pouze demonstracni

> Hello,
>
> Nebyl bych tak striktn� ve vylueov�n� transkac� u NE-SQL datab�z�. U
> 32-bit verze BDE existuje omezen� mo�nost transakc� i napo. u
> Paradoxu. Jde o to, �e u�ivatel resp. program�tor m� mo�nost ureitou
> vic prov�st nebo odvolat. Neexistuje mo�nost automatick� obnovy
> datab�ze po p�du syst�mu. V praxi to vypad� tak, �e ve�ker� zminy se
> ukl�daj� do tabulek a tedy poi p�du nen� samozoejmi jasn� co se
> provedlo a co ne...
>
> tomas.mazurek(zv)vitkovice(tec)cz


vypocet

[*] Simicek Pavel <simicek(zv)uvss.fme.vutbr(tec)cz> - 24.4.1998 10:56:57

> Zdrav<=m,
> mam ciste matematicky problem. Vim, ze na vypocet napr. 2+4*5+9-5/5 existuje specialni metoda (viz kalkulacka).
> Budu velice rad, kdyby mne ji nekdo osvetlil, nebo odkazal na nejaky dostupny zdroj.
> Diky moc. Kuba
>
> Kupka Lubom<=r
>

Mohl by si blize specifikovat o co Ti jde? Nejak jsem to nepochopil.
Jakou specialni metodu mas na mysli?

Pavel

-----------------------------------------------------------
Ing. Pavel Simicek
UVSSaR, FS, VUT Brno, Technicka 2, 616 69
Tel. 05/41142461
e-mail simicek(zv)uvss.fme.vutbr(tec)cz
-----------------------------------------------------------


Nacteni komponent ze souboru

[*] Miroslav Mare� <sctsoftmaker(zv)unl.pvtnet(tec)cz> - 24.4.1998 11:12:07

V prubehu programu ukladam obsah formulare (vsechny komponenty) do souboru
pres TFileStream.WriteComponent. Kdyz chci tento soubor zpetne nacist
pomoci TFileStream.ReadComponent, tak mi to sice jde, ale komponenta
TDBLookupComboBox mi pri teto operaci zahlasi ".....has no parent window".
Nevite nekdo co s tim? Parent prirazuju u ostatnich komponent pozdeji, ale
tahle ho chce uz pri vytvoreni.

Miroslav Mares


Zjisteni verze OS Windows

[*] Bohuslav Svancara <softprojekt(zv)bosnet(tec)cz> - 24.4.1998 11:13:54

Windows NT nastavuji promennou prostredi OS=Windows_NT.
Nevim, jak je to v Delphi 1, ale v Delphi 3 se promenna prostredi zjisti za
pouziti knihovny RXLibrary takto:

var EnvVar: string;
begin
EnvVar := GetEnvVar('OS');
ShowMessage(Format('Promenna OS = %s', [EnvVar]));
end;

Funkce GetEnvVar vytrzena z knihovny RXLibrary vypada takto:

{$W+}
function GetEnvVar(const VarName: string): string;
var
L: Cardinal;
P: PChar;
{$IFNDEF WIN32}
S: array[0..255] of Char;
{$ENDIF}
begin
L := Length(VarName);
{$IFDEF WIN32}
P := GetEnvironmentStrings;
{$ELSE}
P := GetDosEnvironment;
StrPLCopy(S, VarName, 255);
{$ENDIF}
while P^ <> #0 do begin
if (StrLIComp(P, {$IFDEF WIN32} PChar(VarName) {$ELSE} S {$ENDIF}, L) =
0) and
(P[L] = '=') then
begin
Result := StrPas(P + L + 1);
Exit;
end;
Inc(P, StrLen(P) + 1);
end;
Result := '';
end;
{$W-}

-----Original Message-----
From: Zdenek Drvota <zds(zv)pce.fairnet(tec)cz>
To: delphi(zv)pinknet(tec)cz <delphi(zv)pinknet(tec)cz>
Date: 22. dubna 1998 1:20
Subject: Re: Zjisteni verze OS Windows


> Date: Tue, 21 Apr 1998 13:40:03 +0200
> From: ZDENEK MIHULA <mihula(zv)tab.pvt(tec)cz>
> To: <delphi(zv)pinknet(tec)cz>
> Subject: Zjisteni verze OS Windows
> Reply-to: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>

> Nevite nekdo, jak v Delphi 1 zjistit verzi OS Windows.
> Pouzil jsem fci GetVersion, ale ta mi pro W3.11 i Win NT vraci stejny
cislo. Dokazu s ni rozlisit jen W95.
Neco takoveho mi funguje pro 3.11 a 95, jen je treba spravne
desifrovat vracene bajty (nechapu, proc musi M$ delat vzdy aspon neco
pokazde jinak), hlavni cislo verze je ulozeno jednou v
MAJOR a jindy v MINOR. Prikladam kostru prikladu:
--------------------
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, Buttons, ExtCtrls, StdCtrls;


type
TVerze=record
major,minor:byte
end;
var
DosVer,WinVer:Tverze;
v:longint;w:word;
begin
v:=GetVersion;
w:=HiWord(v);
DosVer.major:=Hibyte(w);
DosVer.minor:=Lobyte(w);
w:=LoWord(v);
WinVer.major:=Lobyte(w);
WinVer.minor:=Hibyte(w);

if WinVer.minor=95 then
{jsem v 95}
...
else
{jsem v 3.11}
...
end;
----------------
*-----------------------------------------------*
ZDS, spol. s r. o.
Ing. Zdenek Drvota, director
Devotyho 775 tel/fax:+420-40-33837
530 02 Pardubice 41691
Czech Republic
e-mail: zds(zv)pce.fairnet(tec)cz (Win1250/ISO-8859-2)
http://www.angelfire.com/biz/zds
*-----------------------------------------------*

Vy nekdo jak pouzivat Transakce ??

[*] Miroslav Mare� <sctsoftmaker(zv)unl.pvtnet(tec)cz> - 24.4.1998 11:19:46

Bohuzel Vam musim oponovat, jelikoz je s uspechem pouzivam u paradox
tabulek. Netvrdim, ze jsou dokonale funkcni, ale pro jednoduche operace
(oprava zaznamu nebo vlozeni a nasledne ulozeni) funguji naprosto
spolehlive.

Miroslav Mares


-----Puvodni zprava-----
Od: Ing. Jahoda Jaroslav [SMTP:Jaroslav.Jahoda(zv)lesprojekt(tec)cz]
Odeslano: 24. dubna 1998 7:31
Komu: DELPHI Distribution List
Poedmit: RE: Vy nekdo jak pouzivat Transakce ??

Tady doslo k zasadnimu nepochopeni pouziti transakci. Transakce lze
pouzit POUZE !!!! u databazi, ktere jsou za timto ucelem vytvorene
dBase, FoxPro, Paradox a jim podobne to v zadnem pripade neumoznuji ani
kdyz k nim pristupujete pres ODBC a SQL prikazy. Transakce jsou urceny
pro databaze typu Interbase, MSSQL, Oracle, Sybase aj.

J.Jahoda

> -----Puvodni zprava-----
> Od: Radim Kittner, st. ??-98, UAI [SMTP:XKITTN00(zv)kinf.fme.vutbr(tec)cz]
> Odeslano: 23. dubna 1998 16:41
> Komu: delphi(zv)pinknet(tec)cz
> Poedmit: Vy nekdo jak pouzivat Transakce ??
>
> Muze my nekdo poradit jak pouzivat transakce ?
> Konkretne :
> mam tabulku (paradox) a potrebuju ji upravit s tim ze za
> urcitych okolnosti je treba vsechny upravy vratit
> spet(RollBack). Problem je v tom ze nevym jak to cele
> propojit.
>
> Pr.:
> Database.Transaction;
> ....
> SQL.Add(update Tabulka set ..
> SQL.Prepare;
> SQL.ExecSql;
> ....
> if .. then Database.RollBack;
> ...
>
> Jak tyto radky propojit s jednou tabulkou kterou sem sy v
> database desktopu vytvoril ??
>
> A jeste neco na konec :
> jaky vyznam ma pouziti Prepare ?? Dotazi a upravy fachci i bez
> toho.

Malilinky off-topic

[*] Zdenek Prantl <prantl(zv)ptc.pvt(tec)cz> - 24.4.1998 11:34:11

> Potreboval by som velmi sikovne
> algoritmizovat vyhladavanie optimalnych cestovnych planov. V
> praxi sa jedna o vyhladanie najlepsej cesty z A do B nad
> databazou autobusovych planov...

Na VS (VSDS Zilina 8-) jsme na takoveto optimalizace (hledani minimalni cesty)
meli skripta, jmenovalo se to "Operacni analyza I a II" a tam byly popsany
algoritmy pro tyto optimalizace. Bohuzel jsem tyto skripta pujcil a jiz se mi
nevratily, takze ani nevim autora. Zkus se po nich poptat (nebo po podobne
literature). Eventuelne se obrat primo na lidi z teto skoly (Katedra Dopravnych
sieti, Fakulta Riadenia a Informatiky, adresa http://frdsa.utc.sk/), snad ti
poradi.

bye, Zdenek
prantl(zv)ptc.pvt(tec)cz


dotaz

[*] Ales Krautvor <krautvor(zv)mona(tec)cz> - 24.4.1998 11:34:05



Ing. Jahoda Jaroslav wrote:

> Mezi diskama nelze provatet rename ci move. Pokud v tomto pripade budete
> argumentovat programy jako napr Norton Commander, Volkov Commander ci
> FAR, tak si uvedomte, tak si zkuste napr 5 MB file move z C na sitovy
> disk pomoci VC a uvidite, ze on nejprve provede zkopirovani a potom
> zruseni originalu.
>
> J.Jahoda
>
> > -----P�vodn� zpr�va-----
> > Od: Ales Krautvor [SMTP:krautvor(zv)mona(tec)cz]
> > Odesl�no: 23. dubna 1998 14:58
> > Komu: DELPHI Distribution List
> > P�edm�t: dotaz
> >
> > Hi all,
> > Potrebuji prenest (move) soubor z disku C na sitovy disk (Novell, 32B
> > klient) .
> > Zkousel jsem Renamefile, ale pocitac mi vzdy ohlasil chybu v modulu.
> >
> > Muzete mi poradit, kde je problem?
> >
> >
> > --

Diky za odpoved. Ovsem pak je problem pri kopirovani, existuje nejaka fce,
kterou by se dalo otestovat, ze prislusnysoubor ci adresar nema prava pro
modifikaci nebo write, ze ma pouze read a filescan ?
Mimochodem pouzival jsem fci copyfile (api) a tam no nejak neslo.

Ales

Lokalizace v Delphi 3 a C++ Builder 3

[*] Ondrej Kelle <Kelleon(zv)nnsk.sk> - 24.4.1998 11:59:02

Ahoj Zbysku,

ja vo svojich resource moduloch pouzivam uses, a zatial si nie som
vedomy, ze by kvoli tomu lokalizacia nefungovala... Mohol by si
presnejsie popisat ake problemy to sposobuje?

Dalej mam tu napad, ktory by mohol stat za tu namahu: vytvoreny .DRC
subor si skopirovat nabok a definiciu STRINGTABLE "rozobrat" do
textovych suborov (napr. podla units), a v samotnom .DRC pouzivat prikaz
#include. Po opatovnom vytvoreni .DRC suboru vlastne iba staci obnovit
sekciu #define (pomocou Copy a Paste :). Napr:

<moj.drc>

//Tuto cast generuje linker. Po kazdej kompilacii ju preto treba
obnovit.
#define SysUtils_SOperationAborted 65517
#define ...

//Tato cast moze zostat nezmenena.
STRINGTABLE
BEGIN
#include "SysUtils.rc"
#include "moj.rc"
END

A nakoniec este jedna diletantska otazka: Slo by vyuzit resource modules
na zmenu jazyka aplikacie za behu programu? Dajme tomu:
LoadLibraryEx(FileName1, 0, LOAD_LIBRARY_AS_DATAFILE);
LoadLibraryEx(FileName2, 0, LOAD_LIBRARY_AS_DATAFILE);
niekde v initialization sekcii, ale co dalej? Bude zrejme treba najst
sposob, ako "prepinat" medzi jednotlivymi modulmi, a potom znova nacitat
vsetky komponenty... Ma toto niekto vyriesene alebo napad ako na to?

Inak vdaka za Tvoj velmi prinosny prispevok,

Ondrej Kelle
it(zv)nnsk.sk

> -----Original Message-----
> From: Zbysek Hlinka [SMTP:zhlinka(zv)login(tec)cz]
> Sent: 23. apr�l 1998 15:48
> To: delphi(zv)pinknet(tec)cz
> Subject: Lokalizace v Delphi 3 a C++ Builder 3
>
> library Localize;
>
> {$E csy}
> {$R Localize}
> {$R TABOUTBOX.DFM}
> {$R TCOLORPROP.DFM}
>
> end.
>
> Potom staci projekt zkompilovat, cimz se vytvori (v tomto konkretnim
> pripade) soubor Localize.CSY, ktery pridate k programu Localize.EXE.
> Avsak pozor, ma to drobny hacek. Pokud to nechate takto, bude vriskat
> kompilator, nicmene projekt zkompiluje. Kdyz pridate uses, kompilator
> ani nepipne, ale zase nebude fungovat lokalizace. :-)

Nastaveni defalutni hodnoty v DBLookupComboBox v D

[*] Ondrej Kelle <Kelleon(zv)nnsk.sk> - 24.4.1998 12:18:19

Ak sa nemylim, TDBLookupComboBox sa aktualizuje pri kazdom pohybe v
datasete...
Tyka sa to vkladania novej vety? Insert samotny nechava hodnoty poli
neinicializovane...
Skus definovat default hodnotu pre dane pole este na urovni databazy...
Alebo po volani Insert prirad tomu polu nejaku hodnotu...

Ondrej Kelle
it(zv)nnsk.sk

> -----Original Message-----
> From: Jaros Jan [SMTP:xjaros03(zv)stud.fee.vutbr(tec)cz]
> Sent: 23. apr�l 1998 10:07
> To: delphi(zv)pinknet(tec)cz
> Subject: Nastaveni defalutni hodnoty v DBLookupComboBox v Delphi
> 3.0
>
>
> Pri vypisu polozek do DBLookupComboBoxu pomoci vlastnosti
> Listfield a KeyField se mi Box naplni, ale defaultni hodnota je
> prazdna
> vim ,ze existuje komponenta DBLookupComboBoxPlus,ktera tento problem
> resi , ale je pro Delphi 2.0 a mne se ji nepodarilo nainstalovat.
> Jak se da tento problem vyresit?
> Existuje tato komponenta i pro 3.0?
>
> Jan Jaros
>
>
>
>
>
>
>

Vy nekdo jak pouzivat Transakce ??

[*] Ing. Jahoda Jaroslav <Jaroslav.Jahoda(zv)lesprojekt(tec)cz> - 24.4.1998 12:23:55


> To ovsem neni pravda. BDE umoznuje pouzivat transakce i na lokalni
> databaze
> Paradox, dBase, atd. Samozrejme jsou zde urcita omezeni, protoze tyto
> transakce probihaji na klientovi. Takze pokud vam spadne klient,
> rollback
> se uz nikdy neprovede. Programove vsak rollback provest jde a funguje
> to.
>
Tak to mne zajima jak se ovladaji, abych si to mohl vyzouset. To
je pro mne uplna novinka a zajima mne jeho chovani. Rad se necham
poucit.

J.Jahoda

> Marek Prokop
>
> On Friday, April 24, 1998 7:31 AM, Ing. Jahoda Jaroslav
> [SMTP:Jaroslav.Jahoda(zv)lesprojekt(tec)cz] wrote:
> > Tady doslo k zasadnimu nepochopeni pouziti transakci. Transakce lze
> > pouzit POUZE !!!! u databazi, ktere jsou za timto ucelem vytvorene
> > dBase, FoxPro, Paradox a jim podobne to v zadnem pripade neumoznuji
> ani
> > kdyz k nim pristupujete pres ODBC a SQL prikazy. Transakce jsou
> urceny
> > pro databaze typu Interbase, MSSQL, Oracle, Sybase aj.
> >

ServerSocket, ClientSocket

[*] ing. Trn�n� Milan <bodlak1(zv)czn(tec)cz> - 24.4.1998 12:50:31

Pokud by se Ti to podarilo, dej vedet. Muj kolega ma podobny problem.

----------
Odes�latel: Frantisek Sobola <frank_sb(zv)email(tec)cz>
Komu: delphi(zv)pinknet(tec)cz
P�edm�t: ServerSocket, ClientSocket
Datum: 22. dubna 1998 15:07

Dobry den,
chtel bych se zeptat, jestli nekdo nahodou nemate podrobnou dokumentaci (nebo kde ji pripadne najit) ke komponentam pro Internet. V Delphi3 je napoveda jen na zakladni funkce. Konkretne si nevim rady s komponentou TClientSocket a TServerSocket. Jak mam napr. rozlisit v udalosti ClientSocketRead zda je prijiman text nebo data jeste pred tim, nez se provede funkce ReceiveBuf nebo ReceiveText? Za pripadne odpovedi predem dekuji.

S pozdravem
Frantisek Sobola


tray icon

[*] Jakub Dusek <jakub.dusek(zv)post(tec)cz> - 24.4.1998 12:57:42

Potreboval bych poradit jak v Delphi 2 udelat na taskbaru
ikonu. Nasel jsem sice navod ale v Delphi 2 nefunguje. Diky.

Format BMP souboru

[*] ing. Trn�n� Milan <bodlak1(zv)czn(tec)cz> - 24.4.1998 13:19:58

To je problem PaintShopu. Staci si to prekonvertovat pomoci AcdSee.

----------
> Odes�latel: V�t�zslav Gazda <softda(zv)mbox.vol(tec)cz>
> Komu: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
> P�edm�t: Re: Format BMP souboru
> Datum: 24. dubna 1998 10:28
>
> Potrebuji ulozit bitmapu do souboru. Zkusil jsem to pomoci TBitmap.
> Vytvoreny soubor sel otevrit v aplikaci Malovani, ale nesel otevrit v
> PaintShopu. Potrebuji nejaky univerzalni zpusob, aby byl soubor BMP
> pouzitelny ve vsech aplikacich, ktere ho podporuji. Nema nekdo nejaky
> kompletni a univerzalni popis formatu BMP ?
>
> Diky Vita


ActiveX - prohlizec

[*] Stepan Cerny <chaosz(zv)geocities(tec)com> - 24.4.1998 14:14:21

Vazeni pratele & nepratele,

Nevite nahodou nekdo, jak udelat v D3 obecnou prohlizecku ActiveX
dokumentu (napr. na prezentaci vytvorenou v MSPoverPoint a
vyexportovanou do ActiveX).
Ja tomu teda v podstate, skoro abych pravdu rekl vicemene, ani za mak
nerozumim ..., takze se mozna ptam na uplnou kravinu.
Ale moc by mi pomohlo, kdyby se takova nejaka prohlizecka dala udelat
(pokud mozno jednoduse).

Diky za prival odpovedi.

Stepan Cerny
chaosz(zv)geocities.com


TQuery a TUpdate

[*] Richard Valny <richard.valny(zv)oku-st(tec)cz> - 24.4.1998 14:22:52

Ahoj p��tel�,
nev�te n�kdo co d�l�m blb�?

M�m TQuery, v n�m p�ipojenou datab�zi, vypln�n� dotaz, vlastnost CachedUpdates
nastavenou na true,
UpdateObject nastaven� na p��slu�n� TUpdate, na ud�losti AfterPost pov�enou
sekvenci
TQuery.ApplyUpdates;
TQuery.CommitUpdates;
TUpdate jsem nechal vyplnit pomoc� dialogu (kdy� se kouknu na samotn� SQL
p��kazy je v�e v pohod�)

K TQuery je p�ipojen TDataSource a kone�n� se dost�v�m k j�dru probl�mu.
Jsem-li k TDatasource p�ipojen pomoc� TDBGrid, je v�e v pohod�. Zap�u nov�
�daj, oprav�m star�, v�e prob�h� dle o�ek�v�n� a data se aktualizuj�.

Ale, p�ipoj�m-li k TDataSource formul�� s TDBEdit a TDBComboBox ��dn� data se
neaktualizuj�.
I kdy� si p�ipoj�m TDBNavigator, d�m nov� z�znam, zap�u data d�m odeslat,
��dn� chyba nikde nevysko�� ale tak� se nic nezap�e.

D�k za ka�dou radu :-(=======================================
Richard Valny richard.valny(zv)oku-st(tec)cz
Okresni urad Strakonice tel. 0342-441 l. 216
Smetanova 533 fax. 0342-21208
386 22 STRAKONICE FiDoNet 2:423/35
=======================================

Maxim�ln� width

[*] Ing. Jahoda Jaroslav <Jaroslav.Jahoda(zv)lesprojekt(tec)cz> - 24.4.1998 15:23:57

Delphi pri zalozeni TShape resp. TControl vytvareji objekt windows
pomoci CreateWindowEx a ten ma pripusten parametry pro x, y, width a
height pouze z intervalu -32768 do 32767. Resp. width a height pouze
>=0. Ikdyz funkce CreateWindowEx ma parametry Integer, viz Windows.sys.

J.Jahoda

> -----P�vodn� zpr�va-----
> Od: Leopold Grepl [SMTP:Grepl(zv)melzer(tec)cz]
> Odesl�no: 24. dubna 1998 10:40
> Komu: 'Delphi(zv)pinknet(tec)cz'
> P�edm�t: Maxim�ln� width
>
> Ahoj Delphini,
>
> m�m takov� zaj�mav� probl�m. Ve scrollboxu m�m shape a u n�ho
> nastavuji width. Pokud s width p�es�hnu 32000 a n�jak� drobn�, tak
> po��t� u� se z�porn�mi hodnotami. To vypad� jako by se pro width
> pou��val 2-bytov� integer, ale p�itom Delphi 3 jsou 32-bitov� a tud�
> by integer m�l b�t 4-bytov�, tedy a� do 2mld. Ve zdroj�c�ch je to
> opravdu integer.
>
> Proto tedy nev�m, jak nakreslit shape s v�t�� ���kou ne� 32000.
>
> Dal�� probl�m mi nast�v�, pokud range u scrollbaru je v�t�� ne� 65535.
> Potom se tam dan� shape dokonce opakuje v�cekr�t se za��tky
> x * 65536 + Shape.left.
>
> P�edem d�kuji za ka�dou odpov�d na m� dva dotazy.
>
> Leopold
> Grepl
> Melzer
> s.r.o.
>

Malilinky off-topic

[*] Richard Vdovjak <richardv(zv)win.tue.sk> - 24.4.1998 15:43:19

>> Potreboval by som velmi sikovne
>> algoritmizovat vyhladavanie optimalnych cestovnych planov. V
>> praxi sa jedna o vyhladanie najlepsej cesty z A do B nad
>> databazou autobusovych planov...
>
>Na VS (VSDS Zilina 8-) jsme na takoveto optimalizace (hledani minimalni
cesty)
>meli skripta, jmenovalo se to "Operacni analyza I a II" a tam byly popsany
>algoritmy pro tyto optimalizace. Bohuzel jsem tyto skripta pujcil a jiz se
mi
>nevratily, takze ani nevim autora. Zkus se po nich poptat (nebo po podobne
autor sa vola Doc. RnDr. Jaroslav Janacek (ludia, kt. absolvovali tuto VS
si urcite spomenu :)

bye richo.

<none>

[*] Gracias Zdenek <Gracias(zv)ComaComp(tec)cz> - 24.4.1998 16:09:51

Z Paradoxove tabulky se mi sem tam strati radek
da se tomu nejak predejit
Nejcasteji se to stane pri sitovem sdileni tabulky

Maxim�ln� width

[*] Petr Vones <pvones(zv)mbox.vol(tec)cz> - 24.4.1998 16:38:39

Leopold Grepl wrote:
>
> Ahoj Delphini,
>
> m�m takov� zaj�mav� probl�m. Ve scrollboxu m�m shape a u n�ho nastavuji width. Pokud s width p�es�hnu 32000 a n�jak� drobn�, tak po��t� u� se z�porn�mi hodnotami. To vypad� jako by se pro width pou��val 2-bytov� integer, ale p�itom Delphi 3 jsou 32-bitov� a tud� by integer m�l b�t 4-bytov�, tedy a� do 2mld. Ve zdroj�c�ch je to opravdu integer.
>
> Proto tedy nev�m, jak nakreslit shape s v�t�� ���kou ne� 32000.
>
> Dal�� probl�m mi nast�v�, pokud range u scrollbaru je v�t�� ne� 65535. Potom se tam dan� shape dokonce opakuje v�cekr�t se za��tky
> x * 65536 + Shape.left.
>
> P�edem d�kuji za ka�dou odpov�d na m� dva dotazy.
>
> Leopold Grepl
> Melzer s.r.o.

Zkousel jsi to na Windows 95 a NT ? Ted to sice nevim presne, ale mam pocit ze
ve Windows 95 je
omezen souradnicovy system na 32768 (???) a jen NT pouzivaji plne 32 bitove
hodnoty. Ale mozna
kecam .... :-)

Co se tyce range ScrollBaru, tak tam je problem pokud se pouziva thumbtracking,
behem tazeni
posuvniku lze totiz precist pozici pouze 16ti bitove i kdyz rozsah scrollbaru
muze byt 32bitovy
(viz API fuknce GetScrollPos). Petr Vones, amatersky programator.

Vy nekdo jak pouzivat Transakce ??

[*] Martin UHER <tlanik(zv)zvt.csas(tec)cz> - 24.4.1998 18:39:27


.... Jen pro doplneni:

Moje zkusenost s MS SQL pro vlozeni 100.000 radku (2x char(60), 1x int): jestlize se pouziva "BEGIN TRANsaction" p�ed vkladanim a "COMMIT TRANsaction" po vlozeni v�ech radku je to asi 6x rychlejsi.

RecordLock

[*] Misecka Rastislav <misecka(zv)elf.stuba.sk> - 24.4.1998 19:02:39

Nazdar hosi,

zaujimalo by ma , ako sa daju zamykat zaznamy(records) nad lokalnymi
tabulkami (napr. dBase) a ako potom nasledne zistit , ci je dany
zaznam zamknuty.
Da sa to vobec ?

Zdravi
Santik


Vy nekdo jak pouzivat Transakce ??

[*] �ke��k Jaroslav�������6�����̿ - 24.4.1998 20:32:22

..... jeste jedno doplneni.
K tomuto bych pripomel jedno dulezite nastaveni uvnitr BDE na ktere se obcas
zapomina.
Protoze vychozi hodnota pro SQLPASSTHRU MODE je SHARED AUTOCOMMIT,
provadi se normalne Commit po ulozeni kazdeho jednotliveho zaznamu.
Jestlize zahajite vlastni transakci, tak se Autocommit potlaci a provede se
az s vasim
Commit Transaction.
Jestlize tedy vkladate 100.000,- zaznamu, je znacny rozdil v tom, zda se
musi provest
Commit jednou nebo stotisickrat. Odtud tedy plyne to sestinasobne zrychleni.
Neni to tedy uplne tak, ze by uzivatelem (rozumej programatorsky) rizene
transakce
neco vyrazne urychlovaly samy o sobe, pouze se neprovadeji zbytecne casto a
tim dochazi
v konecnem efektu ke zrychleni. Jejich hlavnim efektem je moznost navratu k
puvodnimu
stavu databaze do urciteho okamziku daneho StartTransaction.

Jestli dochazi k podobnemu efektu i na lokalnich tabulkach to nevim,
nezkousel jsem to.
Je to vsak pravdepodobne, protoze ODBC driver tez obsahuje SQLPASSTHRU MODE.

PS.
Ja jsem byl z bezpecnosti lokalnich souboru v siti dost roztrpcen a tak jsem
presel na Interbazi.
Jak jsem se uz drive dozvedel z teto konference, mozna jsem mohl vyuzit
dalsi moznosti,
napr. MsAccess. Jenze ted uz jsem se namlsal opravdovym serverem a tak se mi
vracet nechce.

Jaro
----------------------------------------

.... Jen pro doplneni:

Moje zkusenost s MS SQL pro vlozeni 100.000 radku (2x char(60), 1x int):
jestlize se pouziva "BEGIN TRANsaction" p�ed vkladanim a "COMMIT
TRANsaction" po vlozeni v�ech radku je to asi 6x rychlejsi.

RecordLock

[*] Petr Vones <pvones(zv)mbox.vol(tec)cz> - 24.4.1998 20:46:18

Misecka Rastislav wrote:
>
> Nazdar hosi,
>
> zaujimalo by ma , ako sa daju zamykat zaznamy(records) nad lokalnymi
> tabulkami (napr. dBase) a ako potom nasledne zistit , ci je dany
> zaznam zamknuty.
> Da sa to vobec ?
>
> Zdravi
> Santik

Ahoj,

Na Borlandske strance je plno prikladu volani BDE API funkci, je tam
i par funkci ohledne zamykani zaznamu. Tady je napr funkce ktera zjistuje
je li zaznam uzamceny...
http://www.borland.com/devsupport/bde/bdeapiex/dbiisrecordlocked.html

S pozdravem

Petr Vones, amatersky programator


Filtre

[*] �ke��k Jaroslav�������6�����̿ - 24.4.1998 20:46:32

.... Me by spise zajimalo, jak dosahnout toho, aby pri hledani zaznamu
pro podminku Hodnota=10 se neprovadel FullScan neboli se to netestovalo
zaznam po zaznamu.
....
-------------------
Obavam se, ze to asi nepujde. Myslim, ze v tom prave je princip filtru.
Proto asi bude SQL s pouzitim WHERE vzdy rychlejsi.

Jaro


hook funkce - problem

[*] Pavel Kral <kral(zv)afx(tec)cz> - 24.4.1998 21:03:01

Ahoj

poprve se pokousim pracovat s hook funkcemi windows.
Nedari se mi odchytavat udalosti smerovane na jine
aplikace, nez v moji.

Napsal jsem jednoduche DLL, ve ktere mam callback
funkci, ktera pri udalosti klavesnice pricte do globalni
promenne jednicku. Svou aplikaci tuto globalni promennou
ctu.


Muzete mi nekdo, prosim, poradit, kde je problem?

ve sve aplikaci pri onFormCreate volam SetWindowsHook
a v handleru timeru si vypisuji hodnotu funkce VratPocet
Pri stisku klavesnice v me aplikaci se hodnota zvysi,
pri stisku klavesnice v jine aplikaci ne.

Dekuji za kazdy napad.

Zdravim Pavel Kral


deklarace:

function VratPocet: integer; stdcall; external 'KEYHOOKLIB';
procedure NastavCurrentHook: integer; stdcall; external 'KEYHOOKLIB';


procedure TForm1.FormCreate(Sender: TObject);
var
CallProcAdr : TFNHookProc;
HandleDLL : longint;
HookHandle : HHook;
begin
HandleDLL := LoadLibrary(PChar('keyhooklib.dll'));
CallProcAdr := GetProcAddress(HandleDLL, PChar('BylStisk'));

// --- tady nastavuji Hook funkci

HookHandle:= SetWindowsHookEx(WH_Keyboard,
CallProcAdr, HandleDLL, 0);

CurrentHook:= HookHandle;
Label1.Caption:= IntToStr(CurrentHook); // pro kontrolu si
vypisuji HookHandle
NastavCurrentHook(CurrentHook);
end;


moje DLL:

library KEYHOOKLIB;

uses
SysUtils, messages,windows,
Classes;

var Pocet: integer = 0;
CurrentHook : HHook;


function BylStisk(code: integer; wParam: WParam; LParam: LParam):
integer;stdcall;
var Zprava: integer;
begin
if code<0 then
begin
Result := CallNextHookEx(CurrentHook, Code, wParam, lParam);
exit;
end;

Pocet := Pocet +1 ;
Result := CallNextHookEx(CurrentHook, Code, wParam, lParam);
end;

function VratPocet: integer; stdcall;
begin
result:= Pocet;
end;

procedure NastavCurrentHook(aHook :HHook); stdcall;
begin
CurrentHook := aHook;
HandleAplikace := AHandleAplikace;
end;

exports
BylStisk index 1,
VratPocet index 2,
NastavCurrentHook index 3;
begin
end.

IBObject - prima konektivita k Interbsi

[*] �ke��k Jaroslav�������6�����̿ - 24.4.1998 21:10:59

AHA .... rozumim.
---
NEXT,LAST,PREV,MOVEBY pracuju iba na klientskej strane a nie na servri a
to ma za nasledok ze server musi posielat vsetky zaznamy.
---
No to je jasne ... dobre, ale jak se na ten konec dostat rychleji, kyz uz je
ten
zakladni vyber tak velky.
Musel bych si zrejme vytvorit neco jako vlastni strankovani a pro kazdou
stranku (treba 30 zaznamu) volat novy dotaz. To by bylo jiste znacne
rychlejsi.
Presun na konec by pak pro mne znamenal volat poslednich 30 zaznamu.
Bylo by to asi slozitejsi programovani a jak bych to udelal v DBGridu?
Musel bych si asi udelat potomka (rozumej toho Gridu - jinak uz mam dva)
a ten upravit. Lepsi by bylo rovnou predelat dataset.
A neresi nahodou neco podobneho jiz ty zminene IB knihovny, kdyz tam ten
presun na konec je proveden prakticky okamzite?

Jak pozoruji vase prispevky, mate asi s timto znacne zkusenosti.
muzete blize vysvetlit uvedene pojmy?

>napr. specifikovat izolacny uroven transakcii,
> specifikovat paralelne nepristupne transakcie
> rozne sposoby prace transakcii na stejnom urovni izolace
> exkluzivne transakcie

Jaro
-------------------------------------------------------------------------
>Pisete ze :
> "Zatezovym parametrem je pro mne napr. presun na konec datasetu, treba
> TQuery.Last, TQuery.Firsrt
> nebo to udelam pomoci navigatoru, potahnutim za listu v gridu a pod.
> Jestli to v jednom pripade trva 40 sec a v druhem 4 sec (na tech
10.000)."
>A prave to co tu robite je zaznamovo orientovany pristup.
>Ked takto sa chcete dostat na posledny zaznam tak sa stava to ze server vam
postupne posiela celu databazu napr s 10 000 zaznamem, lebo operacie,
>NEXT,LAST,PREV,MOVEBY pracuju iba na klientskej strane a nie na servri a
>to ma za nasledok ze server musi posielat vsetky zaznamy.
>SQL pristup neumoznuje nastavit sa na nejaky zaznam, iba vratit skupinu
>zaznamov. Je to velka zmena oproti DBF a ine databazy.
>Prave planujem vytvorit databazu, ktora umoznuje obydve pristupy a mnoho
ine,
>napr. specifikovat izolacny uroven transakcii,
> specifikovat paralelne nepristupne transakcie
> rozne sposoby prace transakcii na stejnom urovni izolace
> exkluzivne transakcie
> atd.
>Prave hladam sponzora na tuto pracu, ktora by mal trvat pol roka.
> Tungli J.
> tungli(zv)pvt.sk
>
>
>
>
>----------
>> Od: �ke��k Jaroslav <jaro(zv)zbk(tec)czn(tec)cz>
>> Pre: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
>> Predmet: Re: IBObject - prima konektivita k Interbsi
>> D�tum: 23. apr�l 1998 19:25
>>
>> Ja vim. O to neslo. Jasne ze pouzivam SQL pristup, ulozene procedury a
pod.
>> Je tez samozrejme ze vtip prace SQL spociva v natahovani co nejmensiho
>> mnozstvi dat na klienta.
>> Ale kdyz zkousim ktery pristup je rychlejsi, tak to nezjistim vyberem 10
>> vet.
>> Testuju databazi 400.000,- zaznamu a pozadam treba o mnozinu 10.000,-
>> Zatezovym parametrem je pro mne napr. presun na konec datasetu, treba
>> TQuery.Last, TQuery.Firsrt
>> nebo to udelam pomoci navigatoru, potahnutim za listu v gridu a pod.
>> Jestli to v jednom pripade trva 40 sec a v druhem 4 sec (na tech 10.000).
>> Jestli je i pro stejne operace rozdilna doba trvani Query1.Open,
>> pak se musim zamyslet nad tim, ze ty knihovny jsou mozna udelany lepe nez
>> SQL links
>> a zajimam se proto o ne.
>> Nevim, co presne mate na mysli tim "zaznamovo orientovany pristup". Jetli
>> tim myslite pripojeni
>> pomoci TTable, tak v tom to neni. Temer vyhradne pouzivam TQuery a SQL
>> jazyk.
>> ------
>>
>> >Ako sledujem vasu debatu, usudil som ze pouzivate zaznamovo orientovany
>> pristup
>> >k udajom. Tento pristup na SQL server je pomaly. Keby ste pouzily SQL
>> pristup tak vysledok mate takmer okamzite a to aj na 100MB databazy. Mam
>> velmi dobre skusenosti s IB, ovsem dosledne sa vyhibam urcitim veciam:
>> Locate, SetKey atd. prikazom ktore sposobuju ze logalne sa spracovava
>> >dotaz.
>> Nechajte spracovanie na IB SERVER vsetko cez SQL a uvidite ze vsetko
>> prebehne takmer za nenameratelny cas. Samozrejme to ma urcite obmedzenie
ako
>> napriklad nemozete sa nastavit na urcity zaznam iba filtrovat vo WHERE
casti
>> dotazu atd. Tungli Jan
>> ----
>> Spracovani nechavam na serveru, ale nekdy potrebuju data zobrazit k
>> prohlizeni i ve vetsim mnozstvi.
>> Uvedu priklad z praxe.
>> Kdyz mam napr. v jedne nejmenovane vetsi nemocnici zobrazit v saldu
>> neuhrazene faktury, tak jich tam je (x) tisic
>> az za nekolik let zpatky. Obsluha si je prolistuje a najde ty, ktere
urcil
>> los. No tak to neni, ale vybere nektere
>> k uhrade podle klice, ktery ani nechtejte vedet. Proste nejde to
>> algoritmizovat.
>> Asi blbej priklad, ale nekdy je to proste potreba.
>>
>> Vychazim tez z toho, ze kdyz je neco rychlejsi na vetsi mnozine dat, tak
to
>> bude rychlejsi i na mensi mnozene,
>> i kdyz tam ty rozdily nabudou tak patrne.
>> Ta rychlost nebyla jedina zajimavost na tech IB objektech - ono toho tam
je
>> vic.
>>
>> Nyni delame na projektu pristupu k datum na Interbasi po Internetu. Tam
je
>> dobra kazda sec.
>>
>> Zatim tedy velice dekuji vsem za namety. Vyzkousim to a kdyz neco
zajimaveho
>> objevime, tak dam vedet.
>> Jaro
>>
>> >
>> >--------------------------------------------------------
>> >> Od: Pavel Cisar <pcisar(zv)aktis(tec)cz>
>> >> Pre: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
>> >> Predmet: Re: IBObject - prima konektivita k Interbsi
>> >> D�tum: 23. apr�l 1998 9:48
>> >>
>> >> IB objekty jsou pekne, ale na muj vkus trochu drahe (na to, ze jsou
mirne
>> >> receno "neucesane"). Jako alternativu doporucuji vasi ctene pozornosti
>> >> FreeIBComponents k mani (byt zatim jen v dosti "horke" betaverzi) na
>> >> http://www.interbase.com (hned vedle FreeUDFLib). Jsou u toho
kompletni
>> >> zdroje a je to podstatne "odlehcenejsi", ale take chudsi nez IBO (ale
nam
>> >> slouzi s trochou domaci prace vice nez dobre :-)
>> >>
>> >> Co se tyce platby do ciziny, osvedcila se nam VISA karta a platba po
webu
>> >> (jinak se na toto tema jiz mluvilo pred casem, snad mozno vyhledat v
>> >> archivu).
>> >>
>> >> >Pred nedavnem jsem s jednim pritelem objevil uzasnou vec.
>> >> >Z www.ibbject.com jsme stahli mnozstvi komponent pro primy pristup
>> >> >k Interbasi. Zjistili jsme, ze v mnoha pripadech je to az
nekolikansobne
>> >> >rychlesi nez pri pouziti SQL links nebo ODBC.
>> >> >Napr. pri vyberu 10.0000,- zaznamu nam trva normalne presun na
posledni
>> >> >zaznam az 40 sec. Pri pouziti konektivity IB to same trvalo asi 1
sec.
>> >> >Vim, ze tyto objekty jsou na tomto serveru jiz dele. Mozna jsme
>> >> >jen znovu objevili Ameriku.
>> >> >Proto se chci zeptat, zda s tim nema jiz nekdo zkusenosti a zda nevi
>> >> >nekdo kde to u nas koupit. Na tom webu uvadeji cenu asi 400 US.
>> >>
>> >>
>> >>
>>

TQuery a TUpdate

[*] �ke��k Jaroslav�������6�����̿ - 24.4.1998 21:42:49

Odtrasuj si, jestli i v druhem pripade dojde tez k volani procedury s
TQuery.ApplyUpdates;
TQuery.CommitUpdates;
Jinak podle tveho popisu je dle meho nazoru ta konstrukce velmi nestastne
provedena. Vcem spociva to nestastne reseni?
Metoda TQuery.ApplyUpdates v pripade CachedUpdates
probiha na celem otevrenem datasetu.
Kdyz napr. pridas 100 zanamu, 20 zrusis a 50 jich zmenis ... a teprve
potom provedes ApplyUpdates a CommitUpdates, udela se vse naraz.
Nebo to muzes cele odvolat. Hodi se to dobre ve vazbe master-detail
na detail formulare.
Pokud jsi to ale povesil na AfterPost, tak to znamena, ze po kazdem post
se bude aktualizovat obsah celeho datasetu. Pritom Post provadis pro
kazdy zaznam jednotlive, takze je to zbytecne a pomalejsi.

Jestli to chces pouzivat takto, tak pouzij radeji tyto metody:
UpdateSQL1.SetParams(ukInsert);
UpdateSQL1.ExecSQL(ukInsert);
UpdateSQL1.SetParams(ukDelete);
UpdateSQL1.ExecSQL(ukModify);
UpdateSQL1.SetParams(ukDelete);
UpdateSQL1.ExecSQL(ukDelete);
To jsou metody pro jeden zaznam.

zdravi Jaro
----------------------------------------------------------------


>Ahoj p��tel�,
>nev�te n�kdo co d�l�m blb�?
>
>M�m TQuery, v n�m p�ipojenou datab�zi, vypln�n� dotaz, vlastnost
CachedUpdates
>nastavenou na true,
>UpdateObject nastaven� na p��slu�n� TUpdate, na ud�losti AfterPost
pov�enou
>sekvenci
> TQuery.ApplyUpdates;
> TQuery.CommitUpdates;
>TUpdate jsem nechal vyplnit pomoc� dialogu (kdy� se kouknu na samotn� SQL
>p��kazy je v�e v pohod�)
>
>K TQuery je p�ipojen TDataSource a kone�n� se dost�v�m k j�dru probl�mu.
>Jsem-li k TDatasource p�ipojen pomoc� TDBGrid, je v�e v pohod�. Zap�u nov�
>�daj, oprav�m star�, v�e prob�h� dle o�ek�v�n� a data se aktualizuj�.
>
>Ale, p�ipoj�m-li k TDataSource formul�� s TDBEdit a TDBComboBox ��dn� data
se
>neaktualizuj�.
>I kdy� si p�ipoj�m TDBNavigator, d�m nov� z�znam, zap�u data d�m odeslat,
>��dn� chyba nikde nevysko�� ale tak� se nic nezap�e.
>
>D�k za ka�dou radu :-(
>
>=======================================
>Richard Valny richard.valny(zv)oku-st(tec)cz
>Okresni urad Strakonice tel. 0342-441 l. 216
>Smetanova 533 fax. 0342-21208
>386 22 STRAKONICE FiDoNet 2:423/35
>=======================================

<none>

[*] �ke��k Jaroslav�������6�����̿ - 24.4.1998 21:53:01

Myslim ze da. Prejdi na neco spolehlivejsiho.
Ha ha ... ja vim cernej humor, ale prave i na tom a
nejenom na tom jsem zkoncil s Paradox pod Windows.
Kdyz ti zakaznici hazej tvuj program na hlavu tak uz zbyva
jen ten cernej humor.
Mozna jsem to ale taky neumel lepe naprogramovat.
Treba nekdo jinej vi jak na to.

Jaro
--------------------------------------------------------------


>Z Paradoxove tabulky se mi sem tam strati radek
> da se tomu nejak predejit
>Nejcasteji se to stane pri sitovem sdileni tabulky
>

akciovy erik - mate ho uz v ruke?

[*] Pavel Koutny <devdata(zv)earthling(tec)net> - 24.4.1998 23:05:45

Nic zvlastne, ja som ho m�l prislubeneho NAISTO tiez pred mesiacom, no vtedy
som mal pokazeny Sagem(na toho som cakal cez 2 mesiace), a zapozicany
Alcatel mal zly bateriu, dostal som na pouzivanie zatial Ericssona toho
isteho, ale mimoakcioveho, momentalne uz prisla aktivacia, a dokonca mam ist
rano uz zamenit tie Ericssony, takze som zvedavy.
btw.
Sagem bol v servise od priblizne 18. decembra do 7. aprila, nakoniec poslali
uplne novy telefon. No proste kopec srandy

Pavel Koutny

-----P�vodn� zpr�va-----
Od: No Comment Group, s.r.o. - Sales dept. <sales(zv)nocomment.sk>
Komu: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
Datum: 24. apr�l 1998 18:11
P�edm�t: akciovy erik - mate ho uz v ruke?>najde sa tu niekto, kto uz ma erika v ruke? Ak ano, ako dlho
>to globtelu trvalo? Osobne cakam uz 4 tyzdne a *****...
>
>
>Richard Willmann
>

Malilinky off-topic

[*] Pavel Koutny <devdata(zv)earthling(tec)net> - 24.4.1998 23:10:32

Ja osobne momentlne studujem na Zilinskej Univerzite (postarom VSDS) na
fakulte riadenia a informatiky. Ing. Janacek ma coskoro caka a je to
skutocne ziva legenda fakulty, ten ma najdenu najoptimalnejsiu cestu z
kabunetu do svojeho bytu na kroky (dlhorocne overovanie v praxi) a miluje
skusanie typu: "Pane koleg, hrajete sach?","Ano","Tak tahnete !!!" a
podobne. Operacna analyza sa vsak zaobera trochu narocnejsimi ulohami. Ja v
mam v sucastnosti predmet grafy a kombinatorika, no a tam ide prave o toto
(minimalne (maximalne) cesty, sledy, toky, casy, a na vsetko algoritmov a
algoritmov). Takze sa mi ozvi priamo na mail.

Pavel Koutny

koutny(zv)tkcmt.sk
-----P�vodn� zpr�va-----
Od: Richard Vdovjak <richardv(zv)win.tue.sk>
Komu: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
Datum: 24. apr�l 1998 19:20
P�edm�t: Re: Malilinky off-topic


>>> Potreboval by som velmi sikovne
>>> algoritmizovat vyhladavanie optimalnych cestovnych planov. V
>>> praxi sa jedna o vyhladanie najlepsej cesty z A do B nad
>>> databazou autobusovych planov...
>>
>>Na VS (VSDS Zilina 8-) jsme na takoveto optimalizace (hledani minimalni
>cesty)
>>meli skripta, jmenovalo se to "Operacni analyza I a II" a tam byly popsany
>>algoritmy pro tyto optimalizace. Bohuzel jsem tyto skripta pujcil a jiz se
>mi
>>nevratily, takze ani nevim autora. Zkus se po nich poptat (nebo po podobne
>autor sa vola Doc. RnDr. Jaroslav Janacek (ludia, kt. absolvovali tuto VS
>si urcite spomenu :)
>
>bye richo.

vypocet - "polska notace"

[*] info(zv)saton(tec)cz (SATON Glass s.r.o.) - 25.4.1998 00:52:50


Asi jsem se spatne vyjadril, priority znam, omlouvam se. Ano jde mne asi o "polskou notaci". Kdyz jsem si ted ten nazev precetl, tak me to prastilo do oci.
Bohuzel o ni nic jineho nevim. Takze bych rad vedel JAK se takovy vyraz prevadi. Vypada to na moji mezeru ve vzdelani a tak se ji snazim co nejrychleji zacelit.
Diky Kuba

Kupka Lubom�r
-------------------------------------------------------------------------------------------------------------
SATON Glass, s.r.o. - slu�by v oblasti programov�n� a v�po�etn� techniky
Klicperova 26, Brno, 628 00 �R
Tel.:+420 5 44217819 Fax.:+420 5 44217529
Mob:+420 603 429505
-------------------------------------------------------------------------------------------------------------

To se obecne resi tak, ze se vyraz prevede na "polskou notaci", ktera
respektuje
i priority operatoru a zavorek a pak se to jednoduse linearne spocita.
Ing. Jindrich Danihelka
E-Mail jidas(zv)mbox.vol(tec)cz
Tel. 038/57805
038/7512861

Format BMP souboru

[*] Michael Gallo <mgallo(zv)nocomment.sk> - 25.4.1998 01:43:25

Ak by to niekoho zaujimalo, tu su specifikacie formatu BMP (Windows, pozor,
nemylit si to s rovnomennym formatom OS2)
Takychto specifikacii mam plne cedecko (+kod v C++), ak by mal niekto zaujem
o ine formaty, no problem.

Btw: nema niekto TAR pod Windows?

Michael Gallo
No Comment Group s.r.o.
e-mail: mgallo(zv)nocomment.sk
web: www.nocomment.sk

-----Original Message-----
From: ing. Trn�n� Milan <bodlak1(zv)czn(tec)cz>
To: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
Date: 24. apr�l 1998 17:37
Subject: Re: Format BMP souboru


To je problem PaintShopu. Staci si to prekonvertovat pomoci AcdSee.

----------
> Odes�latel: V�t�zslav Gazda <softda(zv)mbox.vol(tec)cz>
> Komu: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
> P�edm�t: Re: Format BMP souboru
> Datum: 24. dubna 1998 10:28
>
> Potrebuji ulozit bitmapu do souboru. Zkusil jsem to pomoci TBitmap.
> Vytvoreny soubor sel otevrit v aplikaci Malovani, ale nesel otevrit v
> PaintShopu. Potrebuji nejaky univerzalni zpusob, aby byl soubor BMP
> pouzitelny ve vsech aplikacich, ktere ho podporuji. Nema nekdo nejaky
> kompletni a univerzalni popis formatu BMP ?
>
> Diky Vita

Microsoft Windows Bitmap Format



Note: the constants BI RGB, BI RLE8, and BI RLE4 have the values 0, 1, and 2,
respectively.

=============================================================================
Graphics File Formats

This topic describes the graphics-file formats used by the Microsoft Windows
operating system. Graphics files include bitmap files, icon-resource files,
and cursor-resource files.

Bitmap-File Formats

Windows bitmap files are stored in a device-independent bitmap (DIB) format
that allows Windows to display the bitmap on any type of display device. The
term "device independent" means that the bitmap specifies pixel color in a
form independent of the method used by a display to represent color. The
default filename extension of a Windows DIB file is .BMP.

Bitmap-File Structures

Each bitmap file contains a bitmap-file header, a bitmap-information header,
a color table, and an array of bytes that defines the bitmap bits. The file
has the following form:

BITMAPFILEHEADER bmfh;
BITMAPINFOHEADER bmih;
RGBQUAD aColors[];
BYTE aBitmapBits[];

The bitmap-file header contains information about the type, size, and layout
of a device-independent bitmap file. The header is defined as a
BITMAPFILEHEADER structure.

The bitmap-information header, defined as a BITMAPINFOHEADER structure,
specifies the dimensions, compression type, and color format for the bitmap.

The color table, defined as an array of RGBQUAD structures, contains as many
elements as there are colors in the bitmap. The color table is not present
for bitmaps with 24 color bits because each pixel is represented by 24-bit
red-green-blue (RGB) values in the actual bitmap data area. The colors in the
table should appear in order of importance. This helps a display driver
render a bitmap on a device that cannot display as many colors as there are
in the bitmap. If the DIB is in Windows version 3.0 or later format, the
driver can use the biClrImportant member of the BITMAPINFOHEADER structure to
determine which colors are important.

The BITMAPINFO structure can be used to represent a combined
bitmap-information header and color table. The bitmap bits, immediately
following the color table, consist of an array of BYTE values representing
consecutive rows, or "scan lines," of the bitmap. Each scan line consists of
consecutive bytes representing the pixels in the scan line, in left-to-right
order. The number of bytes representing a scan line depends on the color
format and the width, in pixels, of the bitmap. If necessary, a scan line
must be zero-padded to end on a 32-bit boundary. However, segment boundaries
can appear anywhere in the bitmap. The scan lines in the bitmap are stored
from bottom up. This means that the first byte in the array represents the
pixels in the lower-left corner of the bitmap and the last byte represents
the pixels in the upper-right corner.

The biBitCount member of the BITMAPINFOHEADER structure determines the number
of bits that define each pixel and the maximum number of colors in the
bitmap. These members can have any of the following values:

Value Meaning

1 Bitmap is monochrome and the color table contains two entries. Each
bit in the bitmap array represents a pixel. If the bit is clear, the pixel is
displayed with the color of the first entry in the color table. If the bit is
set, the pixel has the color of the second entry in the table.

4 Bitmap has a maximum of 16 colors. Each pixel in the bitmap is
represented by a 4-bit index into the color table. For example, if the first
byte in the bitmap is 0x1F, the byte represents two pixels. The first pixel
contains the color in the second table entry, and the second pixel contains
the color in the sixteenth table entry.

8 Bitmap has a maximum of 256 colors. Each pixel in the bitmap is
represented by a 1-byte index into the color table. For example, if the first
byte in the bitmap is 0x1F, the first pixel has the color of the
thirty-second table entry.

24 Bitmap has a maximum of 2^24 colors. The bmiColors (or bmciColors)
member is NULL, and each 3-byte sequence in the bitmap array represents the
relative intensities of red, green, and blue, respectively, for a pixel.

The biClrUsed member of the BITMAPINFOHEADER structure specifies the number
of color indexes in the color table actually used by the bitmap. If the
biClrUsed member is set to zero, the bitmap uses the maximum number of colors
corresponding to the value of the biBitCount member. An alternative form of
bitmap file uses the BITMAPCOREINFO, BITMAPCOREHEADER, and RGBTRIPLE
structures.

Bitmap Compression

Windows versions 3.0 and later support run-length encoded (RLE) formats for
compressing bitmaps that use 4 bits per pixel and 8 bits per pixel.
Compression reduces the disk and memory storage required for a bitmap.

Compression of 8-Bits-per-Pixel Bitmaps

When the biCompression member of the BITMAPINFOHEADER structure is set to
BI RLE8, the DIB is compressed using a run-length encoded format for a
256-color bitmap. This format uses two modes: encoded mode and absolute mode.
Both modes can occur anywhere throughout a single bitmap.

Encoded Mode

A unit of information in encoded mode consists of two bytes. The first byte
specifies the number of consecutive pixels to be drawn using the color index
contained in the second byte. The first byte of the pair can be set to zero
to indicate an escape that denotes the end of a line, the end of the bitmap,
or a delta. The interpretation of the escape depends on the value of the
second byte of the pair, which must be in the range 0x00 through 0x02.
Following are the meanings of the escape values that can be used in the
second byte:

Second byte Meaning

0 End of line.
1 End of bitmap.
2 Delta. The two bytes following the escape contain unsigned values
indicating the horizontal and vertical offsets of the next pixel from the
current position.

Absolute Mode

Absolute mode is signaled by the first byte in the pair being set to zero and
the second byte to a value between 0x03 and 0xFF. The second byte represents
the number of bytes that follow, each of which contains the color index of a
single pixel. Each run must be aligned on a word boundary. Following is an
example of an 8-bit RLE bitmap (the two-digit hexadecimal values in the
second column represent a color index for a single pixel):

Compressed data Expanded data

03 04 04 04 04
05 06 06 06 06 06 06
00 03 45 56 67 00 45 56 67
02 78 78 78
00 02 05 01 Move 5 right and 1 down
02 78 78 78
00 00 End of line
09 1E 1E 1E 1E 1E 1E 1E 1E 1E 1E
00 01 End of RLE bitmap

Compression of 4-Bits-per-Pixel Bitmaps

When the biCompression member of the BITMAPINFOHEADER structure is set to
BI RLE4, the DIB is compressed using a run-length encoded format for a
16-color bitmap. This format uses two modes: encoded mode and absolute mode.

Encoded Mode

A unit of information in encoded mode consists of two bytes. The first byte
of the pair contains the number of pixels to be drawn using the color indexes
in the second byte.

The second byte contains two color indexes, one in its high-order nibble
(that is, its low-order 4 bits) and one in its low-order nibble.

The first pixel is drawn using the color specified by the high-order nibble,
the second is drawn using the color in the low-order nibble, the third is
drawn with the color in the high-order nibble, and so on, until all the
pixels specified by the first byte have been drawn.

The first byte of the pair can be set to zero to indicate an escape that
denotes the end of a line, the end of the bitmap, or a delta. The
interpretation of the escape depends on the value of the second byte of the
pair. In encoded mode, the second byte has a value in the range 0x00 through
0x02. The meaning of these values is the same as for a DIB with 8 bits per
pixel.

Absolute Mode

In absolute mode, the first byte contains zero, the second byte contains the
number of color indexes that follow, and subsequent bytes contain color
indexes in their high- and low-order nibbles, one color index for each pixel.
Each run must be aligned on a word boundary.

Following is an example of a 4-bit RLE bitmap (the one-digit hexadecimal
values in the second column represent a color index for a single pixel):

Compressed data Expanded data

03 04 0 4 0
05 06 0 6 0 6 0
00 06 45 56 67 00 4 5 5 6 6 7
04 78 7 8 7 8
00 02 05 01 Move 5 right and 1 down
04 78 7 8 7 8
00 00 End of line
09 1E 1 E 1 E 1 E 1 E 1
00 01 End of RLE bitmap

Bitmap Example

The following example is a text dump of a 16-color bitmap (4 bits per pixel):

Win3DIBFile
BitmapFileHeader
Type 19778
Size 3118
Reserved1 0
Reserved2 0
OffsetBits 118
BitmapInfoHeader
Size 40
Width 80
Height 75
Planes 1
BitCount 4
Compression 0
SizeImage 3000

XPelsPerMeter 0
YPelsPerMeter 0
ColorsUsed 16
ColorsImportant 16
Win3ColorTable
Blue Green Red Unused
[00000000] 84 252 84 0
[00000001] 252 252 84 0
[00000002] 84 84 252 0
[00000003] 252 84 252 0
[00000004] 84 252 252 0
[00000005] 252 252 252 0
[00000006] 0 0 0 0
[00000007] 168 0 0 0
[00000008] 0 168 0 0
[00000009] 168 168 0 0
[0000000A] 0 0 168 0
[0000000B] 168 0 168 0
[0000000C] 0 168 168 0
[0000000D] 168 168 168 0
[0000000E] 84 84 84 0
[0000000F] 252 84 84 0
Image
.
. Bitmap data
.

Icon-Resource File Format

An icon-resource file contains image data for icons used by Windows
applications. The file consists of an icon directory identifying the number
and types of icon images in the file, plus one or more icon images. The
default filename extension for an icon-resource file is .ICO.

Icon Directory

Each icon-resource file starts with an icon directory. The icon directory,
defined as an ICONDIR structure, specifies the number of icons in the
resource and the dimensions and color format of each icon image. The ICONDIR
structure has the following form:
typedef struct ICONDIR {
WORD idReserved;
WORD idType;
WORD idCount;
ICONDIRENTRY idEntries[1];
} ICONHEADER;

Following are the members in the ICONDIR structure:

idReserved Reserved; must be zero.
idType Specifies the resource type. This member is set to 1.
idCount Specifies the number of entries in the directory.
idEntries Specifies an array of ICONDIRENTRY structures containing
information about individual icons. The idCount member specifies the number
of structures in the array.

The ICONDIRENTRY structure specifies the dimensions and color format for an
icon. The structure has the following form:
struct IconDirectoryEntry {
BYTE bWidth;
BYTE bHeight;
BYTE bColorCount;
BYTE bReserved;
WORD wPlanes;
WORD wBitCount;
DWORD dwBytesInRes;
DWORD dwImageOffset;
};

Following are the members in the ICONDIRENTRY structure:

bWidth Specifies the width of the icon, in pixels. Acceptable values
are 16, 32, and 64.

bHeight Specifies the height of the icon, in pixels. Acceptable
values are 16, 32, and 64.

bColorCount Specifies the number of colors in the icon. Acceptable values
are 2, 8, and 16.

bReserved Reserved; must be zero.
wPlanes Specifies the number of color planes in the icon bitmap.
wBitCount Specifies the number of bits in the icon bitmap.
dwBytesInRes Specifies the size of the resource, in bytes.
dwImageOffset Specifies the offset, in bytes, from the beginning of the
file to the icon image.

Icon Image

Each icon-resource file contains one icon image for each image identified in
the icon directory. An icon image consists of an icon-image header, a color
table, an XOR mask, and an AND mask. The icon image has the following form:
BITMAPINFOHEADER icHeader;
RGBQUAD icColors[];
BYTE icXOR[];
BYTE icAND[];

The icon-image header, defined as a BITMAPINFOHEADER structure, specifies the
dimensions and color format of the icon bitmap. Only the biSize through
biBitCount members and the biSizeImage member are used. All other members
(such as biCompression and biClrImportant) must be set to zero.

The color table, defined as an array of RGBQUAD structures, specifies the
colors used in the XOR mask. As with the color table in a bitmap file, the
biBitCount member in the icon-image header determines the number of elements
in the array. For more information about the color table, see Section 1.1,
"Bitmap-File Formats."

The XOR mask, immediately following the color table, is an array of BYTE
values representing consecutive rows of a bitmap. The bitmap defines the
basic shape and color of the icon image. As with the bitmap bits in a bitmap
file, the bitmap data in an icon-resource file is organized in scan lines,
with each byte representing one or more pixels, as defined by the color
format. For more information about these bitmap bits, see Section 1.1,
"Bitmap-File Formats."

The AND mask, immediately following the XOR mask, is an array of BYTE values,
representing a monochrome bitmap with the same width and height as the XOR
mask. The array is organized in scan lines, with each byte representing 8
pixels.

When Windows draws an icon, it uses the AND and XOR masks to combine the icon
image with the pixels already on the display surface. Windows first applies
the AND mask by using a bitwise AND operation; this preserves or removes
existing pixel color. Windows then applies the XOR mask by using a bitwise
XOR operation. This sets the final color for each pixel.

The following illustration shows the XOR and AND masks that create a
monochrome icon (measuring 8 pixels by 8 pixels) in the form of an uppercase
K:

Windows Icon Selection

Windows detects the resolution of the current display and matches it against
the width and height specified for each version of the icon image. If Windows
determines that there is an exact match between an icon image and the current
device, it uses the matching image. Otherwise, it selects the closest match
and stretches the image to the proper size.

If an icon-resource file contains more than one image for a particular
resolution, Windows uses the icon image that most closely matches the color
capabilities of the current display. If no image matches the device
capabilities exactly, Windows selects the image that has the greatest number
of colors without exceeding the number of display colors. If all images
exceed the color capabilities of the current display, Windows uses the icon
image with the least number of colors.
Cursor-Resource File Format

A cursor-resource file contains image data for cursors used by Windows
applications. The file consists of a cursor directory identifying the number
and types of cursor images in the file, plus one or more cursor images. The
default filename extension for a cursor-resource file is .CUR.

Cursor Directory

Each cursor-resource file starts with a cursor directory. The cursor
directory, defined as a CURSORDIR structure, specifies the number of cursors
in the file and the dimensions and color format of each cursor image. The
CURSORDIR structure has the following form:


typedef struct CURSORDIR {
WORD cdReserved;
WORD cdType;
WORD cdCount;
CURSORDIRENTRY cdEntries[];
} CURSORDIR;

Following are the members in the CURSORDIR structure:

cdReserved Reserved; must be zero.
cdType Specifies the resource type. This member must be set to 2.
cdCount Specifies the number of cursors in the file.
cdEntries Specifies an array of CURSORDIRENTRY structures containing
information about individual cursors. The cdCount member specifies the number
of structures in the array.

A CURSORDIRENTRY structure specifies the dimensions and color format of a
cursor image. The structure has the following form:
typedef struct CURSORDIRENTRY {
BYTE bWidth;
BYTE bHeight;
BYTE bColorCount;
BYTE bReserved;
WORD wXHotspot;
WORD wYHotspot;
DWORD lBytesInRes;
DWORD dwImageOffset;
} CURSORDIRENTRY;

Following are the members in the CURSORDIRENTRY structure:

bWidth Specifies the width of the cursor, in pixels.
bHeight Specifies the height of the cursor, in pixels.
bColorCount Reserved; must be zero.
bReserved Reserved; must be zero.
wXHotspot Specifies the x-coordinate, in pixels, of the hot spot.
wYHotspot Specifies the y-coordinate, in pixels, of the hot spot.
lBytesInRes Specifies the size of the resource, in bytes.
dwImageOffset Specifies the offset, in bytes, from the start of the file to
the cursor image.

Cursor Image

Each cursor-resource file contains one cursor image for each image identified
in the cursor directory. A cursor image consists of a cursor-image header, a
color table, an XOR mask, and an AND mask. The cursor image has the following
form:
BITMAPINFOHEADER crHeader;
RGBQUAD crColors[];
BYTE crXOR[];
BYTE crAND[];

The cursor hot spot is a single pixel in the cursor bitmap that Windows uses
to track the cursor. The crXHotspot and crYHotspot members specify the x- and
y-coordinates of the cursor hot spot. These coordinates are 16-bit integers.

The cursor-image header, defined as a BITMAPINFOHEADER structure, specifies
the dimensions and color format of the cursor bitmap. Only the biSize through
biBitCount members and the biSizeImage member are used. The biHeight member
specifies the combined height of the XOR and AND masks for the cursor. This
value is twice the height of the XOR mask. The biPlanes and biBitCount
members must be 1. All other members (such as biCompression and
biClrImportant) must be set to zero.

The color table, defined as an array of RGBQUAD structures, specifies the
colors used in the XOR mask. For a cursor image, the table contains exactly
two structures, since the biBitCount member in the cursor-image header is
always 1.

The XOR mask, immediately following the color table, is an array of BYTE
values representing consecutive rows of a bitmap. The bitmap defines the
basic shape and color of the cursor image. As with the bitmap bits in a
bitmap file, the bitmap data in a cursor-resource file is organized in scan
lines, with each byte representing one or more pixels, as defined by the
color format. For more information about these bitmap bits, see Section 1.1,
"Bitmap-File Formats."

The AND mask, immediately following the XOR mask, is an array of BYTE values
representing a monochrome bitmap with the same width and height as the XOR
mask. The array is organized in scan lines, with each byte representing 8
pixels.

When Windows draws a cursor, it uses the AND and XOR masks to combine the
cursor image with the pixels already on the display surface. Windows first
applies the AND mask by using a bitwise AND operation; this preserves or
removes existing pixel color. Window then applies the XOR mask by using a
bitwise XOR operation. This sets the final color for each pixel.

The following illustration shows the XOR and the AND masks that create a
cursor (measuring 8 pixels by 8 pixels) in the form of an arrow:

Following are the bit-mask values necessary to produce black, white,
inverted, and transparent results:

Pixel result AND mask XOR mask

Black 0 0
White 0 1
Transparent 1 0
Inverted 1 1

Windows Cursor Selection

If a cursor-resource file contains more than one cursor image, Windows
determines the best match for a particular display by examining the width and
height of the cursor images.==============================================================================


BITMAPFILEHEADER (3.0)
typedef struct tagBITMAPFILEHEADER { /* bmfh */
UINT bfType;
DWORD bfSize;
UINT bfReserved1;
UINT bfReserved2;
DWORD bfOffBits;
} BITMAPFILEHEADER;

The BITMAPFILEHEADER structure contains information about the type, size, and
layout of a device-independent bitmap (DIB) file.

Member Description

bfType Specifies the type of file. This member must be BM.
bfSize Specifies the size of the file, in bytes.
bfReserved1 Reserved; must be set to zero.
bfReserved2 Reserved; must be set to zero.
bfOffBits Specifies the byte offset from the BITMAPFILEHEADER structure
to the actual bitmap data in the file.

Comments

A BITMAPINFO or BITMAPCOREINFO structure immediately follows the
BITMAPFILEHEADER structure in the DIB file.

See Also

BITMAPCOREINFO, BITMAPINFO ==============================================================================
BITMAPINFO (3.0)
typedef struct tagBITMAPINFO { /* bmi */
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[1];
} BITMAPINFO;

The BITMAPINFO structure fully defines the dimensions and color information
for a Windows 3.0 or later device-independent bitmap (DIB).

Member Description

bmiHeader Specifies a BITMAPINFOHEADER structure that contains
information about the dimensions and color format of a DIB.

bmiColors Specifies an array of RGBQUAD structures that define the
colors in the bitmap.

Comments

A Windows 3.0 or later DIB consists of two distinct parts: a BITMAPINFO
structure, which describes the dimensions and colors of the bitmap, and an
array of bytes defining the pixels of the bitmap. The bits in the array are
packed together, but each scan line must be zero-padded to end on a LONG
boundary. Segment boundaries, however, can appear anywhere in the bitmap. The
origin of the bitmap is the lower-left corner.

The biBitCount member of the BITMAPINFOHEADER structure determines the number
of bits which define each pixel and the maximum number of colors in the
bitmap. This member may be set to any of the following values:

Value Meaning

1 The bitmap is monochrome, and the bmciColors member must contain two
entries. Each bit in the bitmap array represents a pixel. If the bit is
clear, the pixel is displayed with the color of the first entry in the
bmciColors table. If the bit is set, the pixel has the color of the second
entry in the table.

4 The bitmap has a maximum of 16 colors, and the bmciColors member
contains 16 entries. Each pixel in the bitmap is represented by a four-bit
index into the color table.

For example, if the first byte in the bitmap is 0x1F, the byte represents two
pixels. The first pixel contains the color in the second table entry, and the
second pixel contains the color in the sixteenth table entry.

8 The bitmap has a maximum of 256 colors, and the bmciColors member
contains 256 entries. In this case, each byte in the array represents a
single pixel.

24 The bitmap has a maximum of 2^24 colors. The bmciColors member is
NULL, and each 3-byte sequence in the bitmap array represents the relative
intensities of red, green, and blue, respectively, of a pixel.

The biClrUsed member of the BITMAPINFOHEADER structure specifies the number
of color indexes in the color table actually used by the bitmap. If the
biClrUsed member is set to zero, the bitmap uses the maximum number of colors
corresponding to the value of the biBitCount member.

The colors in the bmiColors table should appear in order of importance.
Alternatively, for functions that use DIBs, the bmiColors member can be an
array of 16-bit unsigned integers that specify an index into the currently
realized logical palette instead of explicit RGB values. In this case, an
application using the bitmap must call DIB functions with the wUsage
parameter set to DIB PAL COLORS.

Note: The bmiColors member should not contain palette indexes if the bitmap
is to be stored in a file or transferred to another application. Unless the
application uses the bitmap exclusively and under its complete control, the
bitmap color table should contain explicit RGB values.

See Also

BITMAPINFOHEADER, RGBQUAD

==============================================================================
BITMAPINFOHEADER (3.0)
typedef struct tagBITMAPINFOHEADER { /* bmih */
DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD biBitCount;
DWORD biCompression;
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;
DWORD biClrUsed;
DWORD biClrImportant;
} BITMAPINFOHEADER;

The BITMAPINFOHEADER structure contains information about the dimensions and
color format of a Windows 3.0 or later device-independent bitmap (DIB).

Member Description

biSize Specifies the number of bytes required by the
BITMAPINFOHEADER structure.

biWidth Specifies the width of the bitmap, in pixels.
biHeight Specifies the height of the bitmap, in pixels.

biPlanes Specifies the number of planes for the target device. This
member must be set to 1.

biBitCount Specifies the number of bits per pixel. This value must be 1,
4, 8, or 24.

biCompression Specifies the type of compression for a compressed bitmap. It
can be one of the following values:

Value Meaning

BI RGB Specifies that the bitmap is not compressed.

BI RLE8 Specifies a run-length encoded format for bitmaps with 8 bits
per pixel. The compression format is a 2-byte format consisting of a count
byte followed by a byte containing a color index. For more information, see
the following Comments section.

BI RLE4 Specifies a run-length encoded format for bitmaps with 4 bits
per pixel. The compression format is a 2-byte format consisting of a count
byte followed by two word-length color indexes. For more information, see
the following Comments section.

biSizeImage Specifies the size, in bytes, of the image. It is valid to
set this member to zero if the bitmap is in the BI RGB format.

biXPelsPerMeter Specifies the horizontal resolution, in pixels per meter, of
the target device for the bitmap. An application can use this value to select
a bitmap from a resource group that best matches the characteristics of the
current device.

biYPelsPerMeter Specifies the vertical resolution, in pixels per meter, of
the target device for the bitmap.

biClrUsed Specifies the number of color indexes in the color table
actually used by the bitmap. If this value is zero, the bitmap uses the
maximum number of colors corresponding to the value of the biBitCount member.
For more information on the maximum sizes of the color table, see the
description of the BITMAPINFO structure earlier in this topic.

If the biClrUsed member is nonzero, it specifies the actual number of colors
that the graphics engine or device driver will access if the biBitCount
member is less than 24. If biBitCount is set to 24, biClrUsed specifies the
size of the reference color table used to optimize performance of Windows
color palettes. If the bitmap is a packed bitmap (that is, a bitmap in which
the bitmap array immediately follows the BITMAPINFO header and which is
referenced by a single pointer), the biClrUsed member must be set to zero or
to the actual size of the color table.

biClrImportant Specifies the number of color indexes that are considered
important for displaying the bitmap. If this value is zero, all colors are
important.

Comments

The BITMAPINFO structure combines the BITMAPINFOHEADER structure and a color
table to provide a complete definition of the dimensions and colors of a
Windows 3.0 or later DIB. For more information about specifying a Windows 3.0
DIB, see the description of the BITMAPINFO structure.

An application should use the information stored in the biSize member to
locate the color table in a BITMAPINFO structure as follows:

pColor = ((LPSTR) pBitmapInfo + (WORD) (pBitmapInfo->bmiHeader.biSize))

Windows supports formats for compressing bitmaps that define their colors
with 8 bits per pixel and with 4 bits per pixel. Compression reduces the disk
and memory storage required for the bitmap. The following paragraphs describe
these formats.

BI RLE8

When the biCompression member is set to BI RLE8, the bitmap is compressed
using a run-length encoding format for an 8-bit bitmap. This format may be
compressed in either of two modes: encoded and absolute. Both modes can occur
anywhere throughout a single bitmap.

Encoded mode consists of two bytes: the first byte specifies the number of
consecutive pixels to be drawn using the color index contained in the second
byte. In addition, the first byte of the pair can be set to zero to indicate
an escape that denotes an end of line, end of bitmap, or a delta. The
interpretation of the escape depends on the value of the second byte of the
pair. The following list shows the meaning of the second byte:

Value Meaning

0 End of line.
1 End of bitmap.
2 Delta. The two bytes following the escape contain unsigned values
indicating the horizontal and vertical offset of the next pixel from the
current position.

Absolute mode is signaled by the first byte set to zero and the second byte
set to a value between 0x03 and 0xFF. In absolute mode, the second byte
represents the number of bytes that follow, each of which contains the color
index of a single pixel. When the second byte is set to 2 or less, the escape
has the same meaning as in encoded mode. In absolute mode, each run must be
aligned on a word boundary. The following example shows the hexadecimal
values of an 8-bit compressed bitmap:
03 04 05 06 00 03 45 56 67 00 02 78 00 02 05 01
02 78 00 00 09 1E 00 01

This bitmap would expand as follows (two-digit values represent a color index
for a single pixel):
04 04 04
06 06 06 06 06
45 56 67
78 78
move current position 5 right and 1 down
78 78
end of line
1E 1E 1E 1E 1E 1E 1E 1E 1E
end of RLE bitmap

BI RLE4

When the biCompression member is set to BI RLE4, the bitmap is compressed
using a run-length encoding (RLE) format for a 4-bit bitmap, which also uses
encoded and absolute modes. In encoded mode, the first byte of the pair
contains the number of pixels to be drawn using the color indexes in the
second byte. The second byte contains two color indexes, one in its
high-order nibble (that is, its low-order four bits) and one in its low-order
nibble. The first of the pixels is drawn using the color specified by the
high-order nibble, the second is drawn using the color in the low-order
nibble, the third is drawn with the color in the high-order nibble, and so
on, until all the pixels specified by the first byte have been drawn. In
absolute mode, the first byte contains zero, the second byte contains the
number of color indexes that follow, and subsequent bytes contain color
indexes in their high- and low-order nibbles, one color index for each pixel.
In absolute mode, each run must be aligned on a word boundary. The
end-of-line, end-of-bitmap, and delta escapes also apply to BI RLE4.

The following example shows the hexadecimal values of a 4-bit compressed
bitmap:
03 04 05 06 00 06 45 56 67 00 04 78 00 02 05 01
04 78 00 00 09 1E 00 01

This bitmap would expand as follows (single-digit values represent a color
index for a single pixel):
0 4 0
0 6 0 6 0
4 5 5 6 6 7
7 8 7 8
move current position 5 right and 1 down
7 8 7 8
end of line
1 E 1 E 1 E 1 E 1
end of RLE bitmap

See Also

BITMAPINFO

==============================================================================
RGBQUAD (3.0)
typedef struct tagRGBQUAD { /* rgbq */
BYTE rgbBlue;
BYTE rgbGreen;
BYTE rgbRed;
BYTE rgbReserved;
} RGBQUAD;

The RGBQUAD structure describes a color consisting of relative intensities of
red, green, and blue. The bmiColors member of the BITMAPINFO structure
consists of an array of RGBQUAD structures.

Member Description

rgbBlue Specifies the intensity of blue in the color.
rgbGreen Specifies the intensity of green in the color.
rgbRed Specifies the intensity of red in the color.
rgbReserved Not used; must be set to zero.

See Also

BITMAPINFO

==============================================================================
RGB (2.x)

COLORREF RGB(cRed, cGreen, cBlue)

BYTE cRed; /* red component of color */
BYTE cGreen; /* green component of color */
BYTE cBlue; /* blue component of color */


The RGB macro selects an RGB color based on the parameters supplied and the
color capabilities of the output device.

Parameter Description

cRed Specifies the intensity of the red color field.
cGreen Specifies the intensity of the green color field.
cBlue Specifies the intensity of the blue color field.

Returns

The return value specifies the resultant RGB color.

Comments

The intensity for each argument can range from 0 through 255. If all three
intensities are specified as zero, the result is black. If all three
intensities are specified as 255, the result is white.

Comments

The RGB macro is defined in WINDOWS.H as follows:
#define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)(g)<<8))| \
(((DWORD)(BYTE)(b))<<16)))

See Also

GetBValue, GetGValue, GetRValue, PALETTEINDEX, PALETTERGB

==============================================================================
BITMAPCOREINFO (3.0)
typedef struct tagBITMAPCOREINFO { /* bmci */
BITMAPCOREHEADER bmciHeader;
RGBTRIPLE bmciColors[1];
} BITMAPCOREINFO;

The BITMAPCOREINFO structure fully defines the dimensions and color
information for a device-independent bitmap (DIB). Windows applications
should use the BITMAPINFO structure instead of BITMAPCOREINFO whenever
possible.

Member Description

bmciHeader Specifies a BITMAPCOREHEADER structure that contains
information about the dimensions and color format of a DIB.

bmciColors Specifies an array of RGBTRIPLE structures that define the
colors in the bitmap.

Comments

The BITMAPCOREINFO structure describes the dimensions and colors of a bitmap.
It is followed immediately in memory by an array of bytes which define the
pixels of the bitmap. The bits in the array are packed together, but each
scan line must be zero-padded to end on a LONG boundary. Segment boundaries,
however, can appear anywhere in the bitmap. The origin of the bitmap is the
lower-left corner.

The bcBitCount member of the BITMAPCOREHEADER structure determines the number
of bits that define each pixel and the maximum number of colors in the
bitmap. This member may be set to any of the following values:

Value Meaning

1 The bitmap is monochrome, and the bmciColors member must contain two
entries. Each bit in the bitmap array represents a pixel. If the bit is
clear, the pixel is displayed with the color of the first entry in the
bmciColors table. If the bit is set, the pixel has the color of the second
entry in the table.

4 The bitmap has a maximum of 16 colors, and the bmciColors member
contains 16 entries. Each pixel in the bitmap is represented by a four-bit
index into the color table.

For example, if the first byte in the bitmap is 0x1F, the byte represents two
pixels. The first pixel contains the color in the second table entry, and the
second pixel contains the color in the sixteenth table entry.

8 The bitmap has a maximum of 256 colors, and the bmciColors member
contains 256 entries. In this case, each byte in the array represents a
single pixel.

24 The bitmap has a maximum of 2^24 colors. The bmciColors member is
NULL, and each 3-byte sequence in the bitmap array represents the relative
intensities of red, green, and blue, respectively, of a pixel.

The colors in the bmciColors table should appear in order of importance.
Alternatively, for functions that use DIBs, the bmciColors member can be an
array of 16-bit unsigned integers that specify an index into the currently
realized logical palette instead of explicit RGB values. In this case, an
application using the bitmap must call DIB functions with the wUsage
parameter set to DIB PAL COLORS.

Note: The bmciColors member should not contain palette indexes if the
bitmap is to be stored in a file or transferred to another application.
Unless the application uses the bitmap exclusively and under its complete
control, the bitmap color table should contain explicit RGB values.

See Also

BITMAPINFO, BITMAPCOREHEADER, RGBTRIPLE ==============================================================================
BITMAPCOREHEADER (3.0)
typedef struct tagBITMAPCOREHEADER { /* bmch */
DWORD bcSize;
short bcWidth;
short bcHeight;
WORD bcPlanes;
WORD bcBitCount;
} BITMAPCOREHEADER;

The BITMAPCOREHEADER structure contains information about the dimensions and
color format of a device-independent bitmap (DIB). Windows applications
should use the BITMAPINFOHEADER structure instead of BITMAPCOREHEADER
whenever possible.

Member Description

bcSize Specifies the number of bytes required by the
BITMAPCOREHEADER structure.

bcWidth Specifies the width of the bitmap, in pixels.
bcHeight Specifies the height of the bitmap, in pixels.

bcPlanes Specifies the number of planes for the target device. This
member must be set to 1.

bcBitCount Specifies the number of bits per pixel. This value must be 1,
4, 8, or 24.

Comments

The BITMAPCOREINFO structure combines the BITMAPCOREHEADER structure and a
color table to provide a complete definition of the dimensions and colors of
a DIB. See the description of the BITMAPCOREINFO structure for more
information about specifying a DIB.

An application should use the information stored in the bcSize member to
locate the color table in a BITMAPCOREINFO structure with a method such as
the following:
lpColor = ((LPSTR) pBitmapCoreInfo + (UINT) (pBitmapCoreInfo->bcSize))

See Also

BITMAPCOREINFO, BITMAPINFOHEADER, BITMAPINFOHEADER

=============================================================================
RGBTRIPLE (3.0)
typedef struct tagRGBTRIPLE { /* rgbt */
BYTE rgbtBlue;
BYTE rgbtGreen;
BYTE rgbtRed;
} RGBTRIPLE;

The RGBTRIPLE structure describes a color consisting of relative intensities
of red, green, and blue. The bmciColors member of the BITMAPCOREINFO
structure consists of an array of RGBTRIPLE structures. Windows applications
should use the BITMAPINFO structure instead of BITMAPCOREINFO whenever
possible. The BITMAPINFO structure uses an RGBQUAD structure instead of the
RGBTRIPLE structure.

Member Description

rgbtBlue Specifies the intensity of blue in the color.
rgbtGreen Specifies the intensity of green in the color.
rgbtRed Specifies the intensity of red in the color.

See Also

BITMAPCOREINFO, BITMAPINFO, RGBQUAD

==============================================================================


Microsoft Windows Bitmap Format

(c) 1993 Microsoft Corporation. All rights reserved.


Multimedia Technical Note: JPEG DIB
Format

Created: May 26, 1993

Goals for this DIB Format Extension

The purpose of this specification is twofold:

1. To define a standard DIB extension for storing JPEG-encoded
still images.

2. To define a standard DIB extension for storing JPEG-encoded
motion images.

A standard DIB extension is one in which the data format is clearly
defined so that any codec that claims to understand the standard will
be able to process the image data correctly. In addition, the image
data created by any codec must be readable by any other codec. In
other words, it must conform to the standard.

These standards are extensions to the standard DIB format defined by
Microsoftr Windows version 3.0 and extended by the technical note
entitled "DIB Format Extensions."

This standard will provide:

* Immediate support for partial implementation of the full scope of
JPEG Baseline Sequential DCT process as defined in ISO 10918 for SOF0
(marker Code 0xFFC0). The implemented subset of the full scope shall
maximize cross-platform interchange between the known universe of
existing JPEG codecs.

* Provision for transparent (or nearly so) implementation of the
full scope of JPEG Baseline Sequential DCT process as defined in ISO
10918 for SOF0 (marker Code 0xFFC0).

* Provision for subsequent inclusion of additional non-hierarchical
JPEG processes on a singular and individual basis. The additional
JPEG processes identified by JPEG Markers SOF1, SOF2, SOF3, SOF9,
SOF10, and SOF11 shall be capable of being implemented in whole or in
part by codecs with no constraint on the number or combination of
processes implemented. Provision for hierarchical processes is deemed
inappropriate to the DIB context.

* Maximal conformance to existing implications of the
BITMAPINFOHEADER structure and its use at application level and
system level. Adaptive redefinition of the BITMAPINFOHEADER shall
provide that members of the basic BITMAPINFOHEADER shall be
identically defined as the preliminary (and primary) members of each
re-definition of the BITMAPINFOHEADER. As a result, a pointer to a
re-defined BITMAPINFOHEADER structure shall always be capable of
being recast as a pointer to the basic BITMAPINFOHEADER from which it
is derived.

* Consideration of the usage of the revised BITMAPINFOHEADER within
enclosing structures of type BITMAPINFO, or analogous substitutes for
BITMAPINFO.

* Define JPEG DIBs in a manner "suitable" for AVI incorporation,
but unconstrained by AVI specific usage. A standalone JPEG DIB image
file shall not include conventions adopted solely for the convenience
of AVI file construction. The off-line process of creating AVI files
should not bring AVI peculiar design requirements into the arena of
still image files.

It is assumed that the reader is familiar with JPEG as defined in the
ISO 10918 document. For additional information on JPEG see the ISO
10918 document. For additional information about RIFF files, see the
Microsoft Windows Software Development Kit (SDK) Multimedia
Programmer's Guide and Multimedia Programmer's Reference. For
additional information on installable compressors and decompressors,
see the "Video Compression/Decompression Drivers" technical note from
Microsoft.

General Specifications

This specification will define two standards for use in Windows:

1. JPEG still-image format
2. JPEG motion format (a.k.a. motion-JPEG)

Type 1: Still Image JPEG

All JPEG DIB still image formats (e.g., DIB files) shall embed a
complete "Interchange Format" JPEG data stream as a contiguous whole.
This provision shall eliminate inadvertent introduction of platform-,
system-, or application-specific conditions that may cause some
JPEG-compliant codecs to be incapable of processing the embedded JPEG
data of a DIB. Provision for indexed access to tables and other data
within the JPEG portion of a DIB shall be accommodated solely by the
introduction of new offset and length members in the body of the
revised BITMAPINFOHEADER structure (none are yet defined). This
provision permits any application or codec to construct a JPEG DIB
file simply by prepending the defined structures to JPEG data, then
perform a single pass through the JPEG data to calculate and set the
associated offset and length members which correlate to JPEG data
items.

Type 2: Motion JPEG

Motion JPEG DIBs shall accommodate interchange formats that satisfy
the "General sequential and progressive syntax" (ISO 10918 Part 1,
Annex B, Para. B.2). A set of images of this type with compatible
parameters can be placed in an AVI file to describe a motion
sequence. Frame headers for these DIBs shall be limited to those
specified in Para B.2.2 of the cited Annex B. These types are SOF0,
SOF1, SOF2, SOF3, SOF9, SOF10, and SOF11. Of the types accommodated,
this specification provides implementation only for the Baseline
Sequential DCT.

BITMAPINFOHEADER for JPEG



typedef struct tagEXBMINFOHEADER {
BITMAPINFOHEADER bmi;
/* extended BITMAPINFOHEADER fields */
DWORD biExtDataOffset;
/* Other stuff will go here */

/* Format-specific information */
/* biExtDataOffset points here */
} EXBMINFOHEADER;

typedef struct tagJPEGINFOHEADER {
/* compress-specific fields */
DWORD JPEGSize;
DWORD JPEGProcess;

/* Process specific fields */
DWORD JPEGColorSpaceID;
DWORD JPEGBitsPerSample;

DWORD JPEGHSubSampling;
DWORD JPEGVSubSampling;
} JPEGINFOHEADER

Field Description

Standard BITMAPINFOHEADER fields


These fields are valid for all DIBs, regardless of compression format.


biSize Size of entire set of structures for header data. Image offset
in DIB file or '"packed" DIB is: biSize + biColorUsed*sizeof
(RGBQUAD)

biWidth Width of decompressed image in pixels.

biHeight Height of decompressed image in pixels.

biPlanes 1

biBitCount 24 for RGB or YCbCr, 8 for Y only images (8 bit mono). The
values and their meanings are as follows.1: The bitmap is monochrome,
and the color table contains two entries. Each bit in the bitmap
array represents a pixel. If the bit is clear, the pixel is displayed
with the color of the first entry in the color table. If the bit is
set, the pixel has the color of the second entry in the table.4: The
bitmap has a maximum of 16 colors. Each pixel in the bitmap is
represented by a four-bit index into the color table. For example,
the first byte in the (uncompressed) bitmap is 0x1F and the byte
represents two pixels. The first pixel contains the color in the
second table entry, and the second pixel contains the color in the
16th color table entry.8: The bitmap has a maximum of 256 colors.
Each pixel in the (uncompressed) bitmap is represented by a
byte-sized index into the color table. For example, if the first byte
in the (uncompressed) bitmap is 0x1F, then the first pixel has the
color of the thirty-second table entry.24: The bitmap has a maximum
of 224 colors. The biClrUsed and biClrImportant fields can optionally
be used (by setting biClrUsed to non-zero) to store an optimized
palette for the image.N (for N > 8): The bitmap has a maximum of 2N
colors. The biClrUsed and biClrImportant fields can optionally be used
(by setting biClrUsed to non-zero) to store an optimized palette for
the image.

biCompression Specifies the type of compression for a compressed
bitmap. See the technical note entitled "DIB Format Extensions" for a
complete list. Values and their meanings are as
follows.mmioFOURCC('J','P','E','G'): Still image JPEG
DIB.mmioFOURCC('M','J','P','G'): Motion image JPEG DIB.

biSizeImage Specifies the size of the compressed image data in bytes.
For JPEG data, this is the length of the data including the EOI
marker.

biXPelsPerMeter 0. Specifies the horizontal resolution in pixels per
meter of the target device for the bitmap. An application can use
this value to select from a resource group that best matches the
characteristics of the current device.

biYPelsPerMeter 0. Specifies the vertical resolution in pixels per
meter of the target device for the bitmap.

biClrUsed 0 to 256. Specifies the number of color values in the
color table actually used by the bitmap. See also the biBitCount
field description.

biClrImportant 0. Specifies the number of color indexes that are
considered important for displaying the bitmap. If this value is 0
and biClrUsed is non-zero, all used colors are important.


Extended BITMAPINFOHEADER fields


biExtDataOffset Specifies the offset to the start of the JPEG-specific
data. This field allows for an expanding BITMAPINFOHEADER structure.


JPEG DIB Specific fields


These fields start at the offset specified by biExtDataOffset.

JPEGSize Size of the JPEG DIB specific fields. This field allows
for expanding the JPEG DIB specific fields.

JPEGProcess Specifies the various format types. In this extension,
only 0 (Baseline DCT sequential) is allowed.


Process Specific fields


JPEGColorSpaceID Specifies the color space used for the compressed
JPEG data.JPEG Y. The Y only component of YCbCr, as described below.
Implies 1 component.JPEG YCbCr. YCbCr as defined by CCIR 601 (256
levels). The RGB components calculated by linear conversion from YC C
shall not be gamma corrected (gamma = 1.0). Implies 3 components.
This is the only option defined for motion JPEG images.JPEG RGB. 24
bit RGB. (3 components).

JPEGBitsPerSample Specifies the number of bits per sample per
component for the defined color space. For this extension, this value
will be 8. The subsequent frame header shall have its sample
precision parameter set to 8.


JPEGHSubSampling Specifies the horizontal sampling factors used for
the chrominance components of a YCbCr image. Applicable only to
images with JPEGColorSpaceID == 2 (YCbCr). Specifies the horizontal
sampling factor for the chrominance components (jointly) with respect
to the luminance component. Non-zero values must correlate to the
"Hi" values for both chrominance components in the JPEG frame header
(see ISO 10918). The values and their meanings are as follows.0:
Subsampling is not- applicable (JPEGColorSpaceID != 2).1: For every
luminance sample in the horizontal dimension, the chrominance
components are sampled in a 1:1 ratio.2: For every luminance sample in
the horizontal dimension, the chrominance components are sampled in a
1:2 ratio, with chrominance samples (Cb and Cr separately) sampled at
half the horizontal spatial resolution as for luminance.4: For every
luminance sample in the horizontal dimension, the chrominance
components are sampled in a 1:4 ratio, with chrominance samples (Cb
and Cr separately) sampled at one-fourth the horizontal spatial
resolution as for luminance.

JPEGVSubSampling Applicable only to images with JPEGColorSpaceID =2
(YCbCr). Specifies the vertical sampling factor for the chrominance
components (jointly) with respect to the luminance component.
Non-zero values must correlate to the "Vi" values for both chrominance
components in the JPEG frame header (see ISO 10918). The values and
their meanings are as follows.0: Subsampling is not- applicable
(JPEGColorSpaceID != 2).1: For every luminance sample in the vertical
dimension, the chrominance components are sampled in a 1:1 ratio.2:
For every luminance sample in the vertical dimension, the chrominance
components are sampled in a 1:2 ratio, with chrominance samples (Cb
and Cr separately) sampled at half the vertical spatial resolution as
for luminance.4: For every luminance sample in the vertical
dimension, the chrominance components are sampled in a 1:4 ratio, with
chrominance samples (Cb and Cr separately) sampled at one-fourth the
vertical spatial resolution as for luminance.

This specification affirms that the member biSize of structure
type BITMAPINFOHEADER and all JPEG derivative
redefinitions of BITMAPINFOHEADER shall be identically
defined. The member biSize shall always contain the count of
all bytes within the header information.
This specification affirms that the structure format and member
definition shall be correlated uniquely to the value of the
member biCompression. Further additions to the structure
definition shall not break any previous definitions, just as this
definition's use of the predefined fields (biSize especially) does
not break the BITMAPINFOHEADER definition. By virtue of this
provision, any application or system function given a pointer to
a BITMAPINFOHEADER structure (or derivative thereof) shall
be capable of determining the appropriate "recast" typedef by
examination of biCompression alone, with biSize serving only
as a cross-check. biSize can increase (but it should not
decrease) from the known definition.

This specification affirms that each redefinition of BITMAPINFOHEADER
for any value of biCompression shall contain the identical initial
members as defined for BITMAPINFOHEADER under Windows 3.1. This shall
apply equally to future redefinition of BITMAPINFOHEADER for those
biCompression values already incorporated (e.g., BI RGB, BI RLE8, and
BI RLE4).

The offset to the start of the compression specific data is specified
by the biExtDataOffset field. This is the offset from the beginning
of the BITMAPINFOHEADER for JPEG structure.

For JPEG DIB compression structure, the second field is always the
JPEG process used to compress the image. The process-specific fields
may change depending on the process ID in the JPEGProcess field.

Image Data

Image data should not contain any thumbnail or other optional data as
this will greatly increase the size of the image data. If thumbnail,
copyright, creator, etc. information is desired, the appropriate RIFF
chunks should be used to store this data (see the RDIB definition in
the RIFF references). The inclusion of optional data (e.g.,
comments, application-specific data, etc.) is strongly discouraged as
this will greatly increase the size of the image data.

Type 1: Still-image JPEG

Complete JPEG interchange format stream from SOI-EOI including all
tables and compressed data IAW ISO 10918 para 3.9.1"Interchange
Format". The size of the data shall be defined by the field
biSizeImage in the BITMAPINFOHEADER for JPEG structure.

Type 2: Motion JPEG

This DIB type contains incomplete JPEG data (abbreviated format per
ISO 10918) and is not intended for stand-alone single image frame
disk files. It may be used within RIFF files and other contexts where
it is appropriate to:

* Decode an image without supplying the associated JPEG Huffman
tables. This presumes the codec has been properly pre-initialized
prior to image decode.

* Request encoder output of compressed image data absent embedded
Huffman Tables.

All motion JPEG data will use YCrCb encoding. In an AVI sequence,
all JPEG frames will be key frames as this ensures that within the
AVI and Video for Windows architecture all frames will be directly
and independently addressable.

For optimal size and speed during playback of an AVI file, the
Huffman data used by motion JPEG will be fixed and defined by this
document. This will make the individual frames of every motion
sequence smaller and more efficient to play back. Also, because all
sequences of motion images use the same Huffman data and color space,
it is much more likely that motion data can be directly exchanged
without re-compression. A definition of the Huffman data will be
provided in MMREG.H (which is listed at the end of this document) as
a byte string which can be concatenated onto the start of a motion
JPEG image to form a valid still JPEG image.



MJPGDHTSeg = { X'FF', DHT, length, JPEG Huffman table parameters }

Q-table data is present and may vary in every frame of a motion
sequence to permit control over the bandwidth of sequences that
contain bursts of frames of varying levels of complexity. The restart
interval used during the compression process may also vary for every
frame.

Only the interleaved form of YCrCb images is supported for motion
JPEG data. This implies that only one SOS segment will be present in
any particular motion JPEG image. Following the Tables segment is
the compressed image data. The data is in JPEG stream syntax and
includes the SOI, DRI, DQT, SOF0, SOS, and EOI markers. For
JPEG YCbCr, JPEG RGB, and JPEG Y color space IDs, these markers are
shown in the typical order with typical values.

As with all DIB files and functions that take "packed" DIBs,
regardless of compression, the offset to the image data can be
calculated as follows:



ImageOffset = biSize + biColorUsed*sizeof (RGBQUAD)

Sample table segment for baseline process:



X'FF', SOI

X'FF', DHT, length, Huffman table parameters (only in still JPEG)
X'FF', DRI, length, restart interval
X'FF', DOT,
length Lq = 67 for JPEG Y or
132 for JPEG RGB or JPEG YCbCr
Precision, Table ID, Pq = 0, Tq = 0
DQT data [64]
[If 3 Components
Precision, Table ID, Pq = 0, Tq = 1
DQT data [64]
]
X'FF', SOF0, length,

Sample Precision P = 8
Number of lines Y = biHeight
Sample per line X = biWidth
Number of components Nc = 1 or 3 (must match information from
JPEGColorSpaceID)

YCbCr RGB
1st Component parameters C1= 1 =Y 4 =R
2nd Component parameters C2= 2 =Cb 5 =G
3rd Component parameters C3= 3 =Cr 6 =B
*
*]
X'FF', SOS, length,

Number of components Ns = 1 or 3 (must match information from
JPEGColorSpaceID)

YCbCr RGB
1st Component parameters C1= 1 =Y 4 =R
2nd Component parameters C2= 2 =Cb 5 =G
3rd Component parameters C3= 3 =Cr 6 =B
*
*
*

X'FF', EOI

Note that the order in which the internal JPEG data segments
shown above can actually occur is not restricted by this
definition; see ISO 10918 for any ordering restrictions that are
defined.

JPEG DIB File Format

Support for JPEG under Windows is fast becoming a
requirement due to the increased number of 16-bit and 24-bit
adapters on the market. The introduction of JPEG as a
Windows support file format will allow users to dramatically
decrease the storage requirement for their 16- and 24-bit
images.
Every DIB (including JPEG DIB) file has the following format:

1. DIB file header
2. Bitmap information header
3. Optional color table
4. Image data

The DIB file header is defined in the DIB documentation. The
JPEG DIB bitmap information header is defined in this
document. The (optional) color table must be RGBQUADs and
is defined in the DIB documentation. The JPEG DIB image
data is defined in this document.

JPEG AVI File Format

JPEG AVI files use the AVI RIFF form as described in the
Microsoft Multimedia technical note "AVI Files." The JPEG AVI
file format has the same mandatory LIST chunks as any other
AVI files. The following example shows the JPEG AVI RIFF
form expanded with the chunks needed to complete the LIST
"hdr1" and LIST "movi" chunks:
As defined in the AVI file format, key frames have the key
frame bit set in the index flags. Since all JPEG frames are key
frames, this flag will always be set for all the frames in a
motion JPEG AVI file.



RIFF ('AVI'
LIST ('hdr1'
'avih' (<Main AVI header>0
LIST ('str1'
'strh' (<Stream header>)
'strf (<Stream format>)
'strd (<additional header data>)
.
.
.
)
LIST ('movi'
{
'##dc' <DIB compressed>

Byte abJPEGdata[ ]; <JPEG image data>
}
.
.
.
<or>
LIST ('rec'
'##dc' <DIB compressed>
Byte abJPEGdata [ ]; <JPEG image data>
.

.
.
)
)
.
.
.
)
['idx' <AVI Index>]
)
)

The strh chunk contains the stream header chunk that
describes the type of data the stream contains.
The strf chunk describes the format of the data in the stream.
For the JPEG AVI case, the information in this chunk is a
BMINFOHEADER FOR JPEG.
The strd chunk contains the FOURCC ID and associated state
structure containing any specific state data for initializing the
identified codec.
All frames in the AVI file are key-frames and have a form
similar to that defined for JPEG "abbreviated format for
compressed image data" as specified in ISO 10918 para. B.4.

The LIST "movi" Chunk

Following the header information is a LIST "movi" chunk that
contains chunks of the actual data in the streams, that is, the
pictures and sounds themselves. The data chunks can reside
directly in the LIST "movi" chunk or they might be grouped into
"rec" chunks, as described in the AVI file format technical
note. As in any RIFF chunk, a four-character code is used to
identify the chunk.
As in the JPEG DIB format, the JPEG stream syntax is used
for the image data with the following constraints. The JPEG
marker codes SOI, DRI, DQT, SOF0, SOS, and EOI are
expected (mandatory) in the image data chunk, and the
constrained values shown in the example below are mandatory
for the image data within the AVI stream.

Any parameters in the SOF0 (frame) and SOS (start of scan)
headers that are duplicated in the BITMAPINFOHEADER for
JPEG must be the same. This would include Sample
Precision, subsampling, and number of components (as
implied by JPEGColorSpaceID). The number of lines and
samples per lines in the SOF0 segment and the width and
height defined in the format chunk must match the main AVI
header width and height values. All of these values are
expected to remain the same for every image data chunk in the
AVI sequence.

Within the image data chunk, two JPEG segments beginning
with the SOI marker and ending with the EOI marker are
allowed to accommodate field interleaved streams. There is an
APP0 marker immediately following the SOI marker that
contains information about the video image. Specifically, this
allows the identification of the ODD and EVEN fields of an
image for images stored in field interleaved fashion. This APP0
marker is expected to have the first 4 bytes following the length
bytes set to the characters 'A', 'V', 'I', '1'. The next byte
indicates which field the JPEG data was compressed from and
has an expected value of one for the first JPEG data segment
and two for the second segment, indicating the ODD and
EVEN fields respectively. If the stream is not field interleaved,
this value will be 0 and there will only be one JPEG segment.
The remaining seven bytes are expected to be set to 0 and will
be ignored by the codec.

If a codec cannot handle the interleaved fields, the codec will
use only the first (ODD) field and will replicate the lines as
necessary to provide an image that conforms to the image size
defined in the main AVI header. Conversely, if a capture
system only accesses a single field of each source frame, only
a single (ODD) field image may be present in a JPEG stream.
This implies that the single (ODD) field data should be used as
the source of both fields by a decompressor that wishes to
process full interlaced data.

It is an advantage to keep the interlace structure of all the
frames in a particular motion JPEG AVI file consistent. To this
end, the following convention can be followed concerning the
relationship of interlace structure to the biHeight parameter of
each motion JPEG image, and hence the entire AVI sequence.

biHeight Interlace structure suggested


<= 240 Single JPEG data block describing entire frame.
> 240 A pair of half-height JPEG data blocks describing ODD
and EVEN fields of the frame (EVEN field data is optional if these
blocks would be identical).

Note that interlace structure and individual fields of data should be
treated as an internal feature of the image data representation. The
entire frame remains an indivisible unit on which editors etc. should
operate. The following is an example of what the image data chunk
would look like for a non-interleaved stream.



X'FF', SOI
X'FF', APP0' 14, "AVI1", 0, 0, 0, 0, 0, 0, 0, 0

X'FF', DRI, length, restart interval
length Lq = 67 for JPEG Y or
132 for JPEG YCbCr or JPEG RGB
Precision, Table ID, Pq = 0, Tq = 0
DQT data [64]
[If 3 components
Precision, Table ID, Pq = 0, Tq = 1
DQT data [64]
]

X'FF', SOF0, length,

Sample Precision P = 8
Number of lines Y = biHeight
Sample per line X = biWidth
Number of components Nc = 1 or 3

YCbCr RGB
1st Component parameters C1= 1 =Y 4 =R
2nd Component parameters C2= 2 =Cb 5 =G
3rd Component parameters C3= 3 =Cr 6 =B

X'FF', SOS, length,
Number of components Ns = 1 or 3


YCbCr RGB
1st Component parameters C1= 1 =Y 4 =R
2nd Component parameters C2= 2 =Cb 5 =G
3rd Component parameters C3= 3 =Cr 6 =B
*
*
*

X'FF', EOI

Note that the order in which the internal JPEG data segments (other
than APP0) shown above can actually occur is not restricted by this
definition; see ISO 10918 for any ordering restrictions that are
defined.

To identify motion JPEG frames in an AVI "movi'" segment, the stream
ID plus the two-character code for a compressed DIB is used and would
have the following format:



DIB Bits '##dc'
BYTE abJPEGImageData [ ];

JPEG DIB Definitions

The following have been added to MMREG.H:



#define JPEG DIB mmioFOURCC('J','P','E','G');
/* Still image JPEG DIB biCompression */
#define MJPG DIB mmioFOURCC('M','J','P','G');
/* Motion JPEG DIB biCompression */

/* JPEGProcess Definitions */
#define JPEG PROCESS BASELINE 0 /* Baseline DCT */

/* JIF Marker byte pairs in JPEG Interchange Format sequence */
#define JIFMK SOF0 0xFFC0 /* SOF Huff - Baseline DCT*/
#define JIFMK SOF1 0xFFC1 /* SOF Huff - Extended sequential DCT*/

#define JIFMK SOF2 0xFFC2 /* SOF Huff - Progressive DCT*/
#define JIFMK SOF3 0xFFC3 /* SOF Huff - Spatial (sequential) lossless*/
#define JIFMK SOF5 0xFFC5 /* SOF Huff - Differential sequential DCT*/
#define JIFMK SOF6 0xFFC6 /* SOF Huff - Differential progressive DCT*/
#define JIFMK SOF7 0xFFC7 /* SOF Huff - Differential spatial*/
#define JIFMK JPG 0xFFC8 /* SOF Arith - Reserved for JPEG extensions*/
#define JIFMK SOF9 0xFFC9 /* SOF Arith - Extended sequential DCT*/

#define JIFMK SOF10 0xFFCA /* SOF Arith - Progressive DCT*/
#define JIFMK SOF11 0xFFCB /* SOF Arith - Spatial (sequential) lossless*/
#define JIFMK SOF13 0xFFCD /* SOF Arith - Differential sequential DCT*/
#define JIFMK SOF14 0xFFCE /* SOF Arith - Differential progressive DCT*/
#define JIFMK SOF15 0xFFCF /* SOF Arith - Differential spatial*/
#define JIFMK DHT 0xFFC4 /* Define Huffman Table(s) */
#define JIFMK DAC 0xFFCC /* Define Arithmetic coding conditioning(s) */

#define JIFMK RST0 0xFFD0 /* Restart with modulo 8 count 0 */
#define JIFMK RST1 0xFFD1 /* Restart with modulo 8 count 1 */
#define JIFMK RST2 0xFFD2 /* Restart with modulo 8 count 2 */
#define JIFMK RST3 0xFFD3 /* Restart with modulo 8 count 3 */
#define JIFMK RST4 0xFFD4 /* Restart with modulo 8 count 4 */
#define JIFMK RST5 0xFFD5 /* Restart with modulo 8 count 5 */
#define JIFMK RST6 0xFFD6 /* Restart with modulo 8 count 6 */
#define JIFMK RST7 0xFFD7 /* Restart with modulo 8 count 7 */

#define JIFMK SOI 0xFFD8 /* Start of Image */
#define JIFMK EOI 0xFFD9 /* End of Image */
#define JIFMK SOS 0xFFDA /* Start of Scan */
#define JIFMK DQT 0xFFDB /* Define quantization Table(s) */
#define JIFMK DNL 0xFFDC /* Define Number of Lines */
#define JIFMK DRI 0xFFDD /* Define Restart Interval */
#define JIFMK DHP 0xFFDE /* Define Hierarchical progression */
#define JIFMK EXP 0xFFDF /* Expand Reference Component(s) */

#define JIFMK APP0 0xFFE0 /* Application Field 0*/
#define JIFMK APP1 0xFFE1 /* Application Field 1*/
#define JIFMK APP2 0xFFE2 /* Application Field 2*/
#define JIFMK APP3 0xFFE3 /* Application Field 3*/
#define JIFMK APP4 0xFFE4 /* Application Field 4*/
#define JIFMK APP5 0xFFE5 /* Application Field 5*/
#define JIFMK APP6 0xFFE6 /* Application Field 6*/
#define JIFMK APP7 0xFFE7 /* Application Field 7*/
#define JIFMK JPG0 0xFFF0 /* Reserved for JPEG extensions */

#define JIFMK JPG1 0xFFF1 /* Reserved for JPEG extensions */
#define JIFMK JPG2 0xFFF2 /* Reserved for JPEG extensions */
#define JIFMK JPG3 0xFFF3 /* Reserved for JPEG extensions */
#define JIFMK JPG4 0xFFF4 /* Reserved for JPEG extensions */
#define JIFMK JPG5 0xFFF5 /* Reserved for JPEG extensions */
#define JIFMK JPG6 0xFFF6 /* Reserved for JPEG extensions */
#define JIFMK JPG7 0xFFF7 /* Reserved for JPEG extensions */
#define JIFMK JPG8 0xFFF8 /* Reserved for JPEG extensions */

#define JIFMK JPG9 0xFFF9 /* Reserved for JPEG extensions */
#define JIFMK JPG10 0xFFFA /* Reserved for JPEG extensions */
#define JIFMK JPG11 0xFFFB /* Reserved for JPEG extensions */
#define JIFMK JPG12 0xFFFC /* Reserved for JPEG extensions */
#define JIFMK JPG13 0xFFFD /* Reserved for JPEG extensions */
#define JIFMK COM 0xFFFE /* Comment */
#define JIFMK TEM 0xFF01 /* for temp private use arith code */
#define JIFMK RES 0xFF02 /* Reserved */

#define JIFMK 00 0xFF00 /* Zero stuffed byte - entropy data */
#define JIFMK FF 0xFFFF /* Fill byte */

/* JPEGColorSpaceID Definitions */
#define JPEG Y 1 /* Y only component of YCbCr */
#define JPEG YCbCr 2 /* YCbCr as define by CCIR 601 */
#define JPEG RGB 3 /* 3 component RGB */

/* Structure definitions */
typedef struct tagEXBMINFOHEADER {
BITMAPINFOHEADER bmi;
/* extended BITMAPINFOHEADER fields */

DWORD biExtDataOffset;
/* Other stuff will go here */

/* Format-specific information */
/* biExtDataOffset points here */
} EXBMINFOHEADER;

typedef struct tagJPEGINFOHEADER {
/* compression-specific fields */
/* these fields are defined for 'JPEG' and 'MJPG' */
DWORD JPEGSize;
DWORD JPEGProcess;

/* Process specific fields */
DWORD JPEGColorSpaceID;
DWORD JPEGBitsPerSample;

DWORD JPEGHSubSampling;
DWORD JPEGVSubSampling;
} JPEGINFOHEADER


#ifdef MJPGDHTSEG STORAGE

/* Default DHT Segment */

MJPGHDTSEG STORAGE BYTE MJPGDHTSeg[0x1A0] = {
/* JPEG DHT Segment for YCrCb omitted from MJPG data */
0xFF,0xC4,0x01,0xA2,
0x00,0x00,0x01,0x05,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x01,
0x00,0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,

0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x10,0x00,
0x02,0x01,0x03,0x03,0x02,0x04,0x03,0x05,0x05,0x04,0x04,0x00,0x00,0x01,0x7D,
0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,0x21,0x31,0x41,0x06,0x13,0x51,0x61,
0x07,0x22,0x71,0x14,0x32,0x81,0x91,0xA1,0x08,0x23,0x42,0xB1,0xC1,0x15,0x52,
0xD1,0xF0,0x24,0x33,0x62,0x72,0x82,0x09,0x0A,0x16,0x17,0x18,0x19,0x1A,0x25,
0x26,0x27,0x28,0x29,0x2A,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x43,0x44,0x45,
0x46,0x47,0x48,0x49,0x4A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x63,0x64,

0x65,0x66,0x67,0x68,0x69,0x6A,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x83,
0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,
0x9A,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xB2,0xB3,0xB4,0xB5,0xB6,
0xB7,0xB8,0xB9,0xBA,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xD2,0xD3,
0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,
0xE9,0xEA,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0x11,0x00,0x02,
0x01,0x02,0x04,0x04,0x03,0x04,0x07,0x05,0x04,0x04,0x00,0x01,0x02,0x77,0x00,

0x01,0x02,0x03,0x11,0x04,0x05,0x21,0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,
0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,0xA1,0xB1,0xC1,0x09,0x23,0x33,0x52,
0xF0,0x15,0x62,0x72,0xD1,0x0A,0x16,0x24,0x34,0xE1,0x25,0xF1,0x17,0x18,0x19,
0x1A,0x26,0x27,0x28,0x29,0x2A,0x35,0x36,0x37,0x38,0x39,0x3A,0x43,0x44,0x45,
0x46,0x47,0x48,0x49,0x4A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x63,0x64,
0x65,0x66,0x67,0x68,0x69,0x6A,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x82,
0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x92,0x93,0x94,0x95,0x96,0x97,0x98,

0x99,0x9A,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xB2,0xB3,0xB4,0xB5,
0xB6,0xB7,0xB8,0xB9,0xBA,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xD2,
0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,
0xE9,0xEA,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA
};
#endif


Lokalizace v Delphi 3 a C++ Builder 3

[*] Zbysek Hlinka <zhlinka(zv)login(tec)cz> - 25.4.1998 07:50:57

Ondrej Kelle wrote:

> ja vo svojich resource moduloch pouzivam uses, a zatial si nie som
> vedomy, ze by kvoli tomu lokalizacia nefungovala... Mohol by si
> presnejsie popisat ake problemy to sposobuje?

Jedna se o projekt, ktery ma vygenerovat lokalizovanou knihovnu se
zdroji, tedy s forms a strings. Kdyz jsem tam pridal do uses
jednotky, ktere si DLL projekt vyzadoval (v integrovanem prostredi,
programu dcc32 je to fuk), nadaval mi program po spusteni tusim ze
cosi o duplicitnach. Vyhodil jsem uses, IDE sice nadavalo, ale
lokalizace fungovala. Takze ve svem lokalizacnim programu to resim
zasadne pomoci dcc32.exe.

> Dalej mam tu napad, ktory by mohol stat za tu namahu: vytvoreny .DRC
> subor si skopirovat nabok a definiciu STRINGTABLE "rozobrat" do
> textovych suborov (napr. podla units), a v samotnom .DRC pouzivat
> prikaz
> #include. Po opatovnom vytvoreni .DRC suboru vlastne iba staci obnovit
> sekciu #define (pomocou Copy a Paste :). Napr:

Stalo to za namahu, mam to vyresene, i kdyz trochu jinak, nez to
navrhujes. Viz http://www.clexpert(tec)cz/software/localize/.
>
> A nakoniec este jedna diletantska otazka: Slo by vyuzit resource
> modules na zmenu jazyka aplikacie za behu programu? Dajme tomu:
> LoadLibraryEx(FileName1, 0, LOAD_LIBRARY_AS_DATAFILE);
> LoadLibraryEx(FileName2, 0, LOAD_LIBRARY_AS_DATAFILE);
> niekde v initialization sekcii, ale co dalej? Bude zrejme treba
> najst sposob, ako "prepinat" medzi jednotlivymi modulmi, a potom
> znova nacitat vsetky komponenty... Ma toto niekto vyriesene alebo
> napad ako na to?

No, to jsem zkousel, resp. dival jsem se, jak Borland nacita zdroje.
Pokud neni form vytvoren, tak to jde, prehodit resourcy. Jestlize je
vsak jiz hotovy, napriklad hlavni formular, tak uz to nejde, protoze
VCL knihovna si nacte predhozeny balik (neni-li, saha do exace) a
rovnou vytvari na vsechno Create a InsertComponent. Nebo, mozna by to
slo, ale muselo by se shodit vsechno, co je vytvorene a znovu to
vytvorit, tedy udelat restart tak jako tak. Tohle by myslim meli
Borlandi jeste trochu domyslet, aby se to dalo prehazovat za behu
nejak rozumneji. :-(

S pozdravem

Zbysek Hlinka
E-mail: zhlinka(zv)login(tec)cz
Tel.: 02/795 29 56
Krystofova 1016, 149 00 Praha 4
CZ


vypocet - "polska notace"

[*] Arthur <Arthur(zv)hlpsoft(tec)cz> - 25.4.1998 08:13:58


Cau
Nic proti, ale na Tvem miste bych si procetl nejake uplne zakladni
knihy o programovani a algoritmech (treba slovensky vysleho Wirtha
nebo kniho od pana Topfera - uz jsem zapomel, jak se jmenuje, ale
tehdy jsem ji ocenil, jako docela dobrou :-), kde se dozvis spoustu
informaci, rozsiris si prehled a minimalne termin "polska notace"
Te nejenze neprekvapi, ale budes i vedet, kde si o nem neco precist...
Arthur


-----Original Message-----
From: SATON Glass s.r.o. [SMTP:info(zv)saton(tec)cz]
Sent: Saturday, April 25, 1998 12:53 AM
To: DELPHI Distribution List
Subject: vypocet - "polska notace"

Asi jsem se spatne vyjadril, priority znam, omlouvam se. Ano jde mne asi o "polskou notaci". Kdyz jsem si ted ten nazev precetl, tak me to prastilo do oci.
Bohuzel o ni nic jineho nevim. Takze bych rad vedel JAK se takovy vyraz prevadi. Vypada to na moji mezeru ve vzdelani a tak se ji snazim co nejrychleji zacelit.
Diky Kuba

Kupka Lubom�r
-------------------------------------------------------------------------------------------------------------
SATON Glass, s.r.o. - slu�by v oblasti programov�n� a v�po�etn� techniky
Klicperova 26, Brno, 628 00 �R
Tel.:+420 5 44217819 Fax.:+420 5 44217529
Mob:+420 603 429505
-------------------------------------------------------------------------------------------------------------

To se obecne resi tak, ze se vyraz prevede na "polskou notaci", ktera
respektuje
i priority operatoru a zavorek a pak se to jednoduse linearne spocita.
Ing. Jindrich Danihelka
E-Mail jidas(zv)mbox.vol(tec)cz
Tel. 038/57805
038/7512861

Format BMP souboru

[*] Arthur <Arthur(zv)hlpsoft(tec)cz> - 25.4.1998 08:13:53


Zdar
Pred nedavnem jsem mel stejny problem jako kolega Gazda
a ulozenou Bmp metodou SaveToFile mi nesezral ani ten
AcdSee. Jenom Paint pro editaci. Na reseni jsem se potom vykaslal, protoze
jsem ty bmp potreboval zase jen z programu, ale predpokladal jsem,
ze pri nejakem formatu obrazku (pocet barev, paleta apod.) generuje
TBitMap mene-podporovany format bitmapy (a to nejspis jde i nastavit)
Reseni bych take ocenil.
Diky Arthur


-----Original Message-----
From: ing. Trnin� Milan [SMTP:bodlak1(zv)czn(tec)cz]
Sent: Friday, April 24, 1998 1:20 PM
To: DELPHI Distribution List
Subject: Re: Format BMP souboru

To je problem PaintShopu. Staci si to prekonvertovat pomoci AcdSee.

----------
> Odeslatel: Vtzslav Gazda <softda(zv)mbox.vol(tec)cz>
> Komu: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
> Pedmt: Re: Format BMP souboru
> Datum: 24. dubna 1998 10:28
>
> Potrebuji ulozit bitmapu do souboru. Zkusil jsem to pomoci TBitmap.
> Vytvoreny soubor sel otevrit v aplikaci Malovani, ale nesel otevrit v
> PaintShopu. Potrebuji nejaky univerzalni zpusob, aby byl soubor BMP
> pouzitelny ve vsech aplikacich, ktere ho podporuji. Nema nekdo nejaky
> kompletni a univerzalni popis formatu BMP ?
>
> Diky Vita

Re[2]: Malilinky off-topic

[*] Hubert <mneu3246(zv)ss1000.ms.mff.cuni(tec)cz> - 25.4.1998 08:58:19

Hello Tungli,


TJ> Keby sa Vami podarilo tento problem optimalizovat
TJ> tak by som bol velmi prekvapeny. Ked sa jedna o
TJ> obecny siet tak neexistuje ziadny algoritmus ktory by
TJ> dokazal aspon byt trosku rychlejsi ako algorimus hrubej sily.
TJ> Heuristicky algoritmus moze byt vytvoreny iba ked poznate urcite
TJ> pravidla ktorym sa da charkterizovat siet. Ale aj tak by to bolo len
TJ> sarlatanstvo.
TJ> Male zlepsenie sa da dosiahnut,
TJ> ked cesty do uzlov su utriedene podla vekosti a podla uzlov.


TJ> Tungli J.
TJ> tungli(zv)pvt.sk



Co je mysleno algoritmus hrube sily?

Hubert


RAS komponenta

[*] Petr Zahradnik <clexpert(zv)clexpert(tec)cz> - 25.4.1998 09:25:36

> *** RAS Komponenta:
> Kvalitne udelanou FREE-komponentu na vytaceni a pokladani, sledovani
> prave aktivnich spojeni pres RAS (i s ukazkovym programem) delal
> kamarad - ma ji na HomePage (http://members.xoom.com/aberka)

Stahl jsem si to, je to dobre, ale jak do toho nacpat jmeno/heslo
pro Internet? Totiz takhle, ja mam nastaveno, aby pripojeni
pouzivalo SLIP a ve skriptu pak mam vlozeni jmena/hesla pomoci
$USERNAME a $PASSWORD, normalne to chodi. Pouziji-li tuto RAS
komponentu, udelam to takto:

DialUp.SetEntryUserName('jmeno');
DialUp.SetEntryPassword('heslo');
DialUp.Dial;

Ale to se do slipu nedostane. Proste se to nepripoji, neprojde to
autorizaci. Kdyz slip skript upravim, ze neposilam serveru tyto
parametry $USERNAME/$PASSWORD, ale primo jmeno/heslo, pak to
chodi a pripoji se to. Co s tim?

Dekuji a jsem s pozdravem
Petr Zahradnik, pocitacovy expert

==============================================================
=== Petr Zahradnik - Computer Laboratory ===
=== Jezkova 12, 400 11 Usti nad Labem ===
=== Telefon, fax: 047-5501627, mobilni GSM: 0602-409601 ===
=== http://www.clexpert(tec)cz/ clexpert(zv)clexpert(tec)cz ===
==============================================================

RecordLock

[*] Petr Zahradnik <clexpert(zv)clexpert(tec)cz> - 25.4.1998 09:25:36

> zaujimalo by ma , ako sa daju zamykat zaznamy(records) nad lokalnymi
> tabulkami (napr. dBase) a ako potom nasledne zistit , ci je dany
> zaznam zamknuty.
> Da sa to vobec ?

Jsou na to primo funkce BDE API, nahledni do BDE.INT (zde orezano):

{=============================================================================}
{ LOCKING }
{=============================================================================}

function DbiAcqTableLock ( { Lock a table }
function DbiAcqPersistTableLock ( { Get a persistent lock }
function DbiRelPersistTableLock ( { Releases a persistent lock }
function DbiRelTableLock ( { Unlocks Table level locks }
function DbiRelRecordLock ( { Releases record level locks }
function DbiIsRecordLocked ( { Check if current record is locked }
function DbiIsTableLocked ( { Verify if Table is locked }
function DbiIsTableShared ( { Verify if this is a shared table }
function DbiOpenLockList ( { Get a list of locks }
function DbiOpenUserList ( { Get a list of users loggedin }
function DbiSetLockRetry ( { Set Lock wait time }

S pozdravem
Petr Zahradnik, pocitacovy expert

==============================================================
=== Petr Zahradnik - Computer Laboratory ===
=== Jezkova 12, 400 11 Usti nad Labem ===
=== Telefon, fax: 047-5501627, mobilni GSM: 0602-409601 ===
=== http://www.clexpert(tec)cz/ clexpert(zv)clexpert(tec)cz ===
==============================================================

<none>

[*] Petr Zahradnik <clexpert(zv)clexpert(tec)cz> - 25.4.1998 09:25:36

> Z Paradoxove tabulky se mi sem tam strati radek
> da se tomu nejak predejit
> Nejcasteji se to stane pri sitovem sdileni tabulky

Mas nastaveno LOCAL SHARE na TRUE ?

S pozdravem
Petr Zahradnik, pocitacovy expert

==============================================================
=== Petr Zahradnik - Computer Laboratory ===
=== Jezkova 12, 400 11 Usti nad Labem ===
=== Telefon, fax: 047-5501627, mobilni GSM: 0602-409601 ===
=== http://www.clexpert(tec)cz/ clexpert(zv)clexpert(tec)cz ===
==============================================================

<none>

[*] Petr Urban <urban(zv)zbk(tec)czn(tec)cz> - 25.4.1998 09:27:30

Vsechny Vas zdravim.
Pisu sem poprve a doufam, ze tento mail dostanete. A nyni k problemu:

V Delphi 3.0 mam problem s toolbarem (TToolBar). Kdyz totiz skryji jakekoliv
z jeho tlacitek (ToolButton.Visible:= False nebo ToolButton.Hide), nelze ho
znovu zobrazit (ToolButton.Visible := True nebo ToolButton.Show).

V delphi se teprve ucim (je mi 15 let), ale i tak doufam, ze se nikdo ze
starsich a zkusenejsich programatoru neurazi pred mym vekem. Predpokladam,
ze se s timto problemem uz nekdo nekdy zabyval a proto bych prosil o radu.
Jiz predem dekuji.

Petr Urban

vypocet - "polska notace"

[*] Radim Kunz <rkunz(zv)ova(tec)comp(tec)cz> - 25.4.1998 09:50:52

>Asi jsem se spatne vyjadril, priority znam, omlouvam se. Ano jde mne asi o
"polskou notaci". Kdyz jsem si ted ten >nazev precetl, tak me to prastilo do
oci.
>Bohuzel o ni nic jineho nevim. Takze bych rad vedel JAK se takovy vyraz
prevadi. Vypada to na moji mezeru ve >vzdelani a tak se ji snazim co
nejrychleji zacelit.
>Diky Kuba
>
>Kupka Lubom�r


Asi takhle:

Mas nejaky sileny vyraz, napr (A+B*C)/(D+E)+C*D

Tenhle vyraz si prevedes na binarni strom (to samozrejme nemuzu do emailu
nakreslit)
pak strom projedes postorderem a vyjde ti tohle:

A B C * + D E + / C D * + , tohle je polska notace

a pak jedes zleva doprava

A - operand - ulozis do zasobniku
B - operand - ulozis do zasobniku
C - operand - ulozis do zasobniku
* - operator - vyberes ze zasobniku posledni 2 operandy, t.j. B,C, provedes B*C a vysledek ulozis do zasobniku
+ - operator - vyberes ze zasobniku posledni 2 operandy, t.j : vysledek B*C a A, provedes (B*C)+A, vysledek ulozis
do zasobniku

A tak pokracujes, az ti na zasobniku zbude posledni hodnota, a to bude
vysledek.

Tohle je hodne zkracene a zjednodusene. Pokud se tim chces zabyvat, opatri si napr.:
Grada - Dekompozice a rekurzivni algoritmy, starsi kniha, takze stoji jenom 150 Kc , tenhle priklad je z ni

nebo pokud to chces jenom pouzivat, tak si na DSP stahni nejaky parser, je
jich tam myslim dost.


Radim Kunz


======================================================================
Cesky CASE na http://www(tec)czechia.com/rksoft , beta verze volne ke stazeni
======================================================================

tray icon

[*] Martin Fronek <FRONEK(zv)FIC.CZ> - 25.4.1998 10:03:24

Hi,

napis svou adresu, poslu ti to. fronek(zv)fic(tec)cz


Jakub Dusek wrote:
>
> Potreboval bych poradit jak v Delphi 2 udelat na taskbaru
> ikonu. Nasel jsem sice navod ale v Delphi 2 nefunguje. Diky.

<none> - znovuzobrazeni tlacitek v TToolBar

[*] Pavel Kral <kral(zv)afx(tec)cz> - 25.4.1998 10:55:47

Ahoj,

mne to funguje bez problemu, mozna mas chybu
nekde jinde
Zkousel jsem na stisk jineho tlacitka

ToolBar1.Buttons[1].visible := not ToolBar1.Buttons[1].visible;

Pavel

-----Original Message-----
From: Petr Urban <urban(zv)zbk(tec)czn(tec)cz>
To: delphi(zv)pinknet(tec)cz <delphi(zv)pinknet(tec)cz>
Date: 25. dubna 1998 12:20
Subject: <none>>Vsechny Vas zdravim.
>Pisu sem poprve a doufam, ze tento mail dostanete. A nyni k problemu:
>
>V Delphi 3.0 mam problem s toolbarem (TToolBar). Kdyz totiz skryji
jakekoliv
>z jeho tlacitek (ToolButton.Visible:= False nebo ToolButton.Hide), nelze ho
>znovu zobrazit (ToolButton.Visible := True nebo ToolButton.Show).
>
>V delphi se teprve ucim (je mi 15 let), ale i tak doufam, ze se nikdo ze
>starsich a zkusenejsich programatoru neurazi pred mym vekem. Predpokladam,
>ze se s timto problemem uz nekdo nekdy zabyval a proto bych prosil o radu.
>Jiz predem dekuji.
>
>Petr Urban
>
>
>
>

Zpracovani CGI skriptu

[*] Jan Sluka <snipe(zv)mail.cybernet(tec)cz> - 25.4.1998 11:34:52

Vazeni,

obracim se na Vas vsechy s nasledujicim dotazem.

Na UNIXu mam vybudovanou HTML stranku, ktera
zpracovava urcite CGI skripty.
Bohuzel jsem nucen tuto stranku vystavet take pod
Windows NT.
Zajimalo by me, jak je mozno vytvorit v Delphi 3.0
Professional program, ktery by zpracovaval tyto CGI
skripty a jak donutit prohlizec, aby byly tyto skripty
zaslany prave tomuto programu ke zpracovani.

Dekuji predem za Vase odpovedi.

S pozdravem

Jan Sluka, snipe(zv)mail.cybernet(tec)cz
Tkalcovska 856/B
688 01 Uhersky Brod


hook funkce - problem vyresen

[*] Pavel Kral <kral(zv)afx(tec)cz> - 25.4.1998 12:14:52

Ahoj
na zaklade drivejsich prispevku jsem si uvedomil,
ze data v DLL jsou rozdilna pro kazdou aplikaci,
ktera ji vola, proto nemuzu zjistit zmenu poctu volani.

Zjisteni, ze byla stisknuta klavesa v jinem programu
ted predavam udalosti PostMessage a handle okna
sve aplikace hledam s pomoci FindWindow.
Pokud mate nekdo napad, jak predat nejak lepe
handle okna aplikace, dejte vedet.

Diky Pavel

-----Original Message-----
From: Pavel Kral <kral(zv)afx(tec)cz>
To: DELPHI Distribution List <delphi(zv)io.pinknet(tec)cz>
Date: 25. dubna 1998 12:19
Subject: hook funkce - problem


>poprve se pokousim pracovat s hook funkcemi windows.
>Nedari se mi odchytavat udalosti smerovane na jine
>aplikace, nez v moji.
>
>Napsal jsem jednoduche DLL, ve ktere mam callback
>funkci, ktera pri udalosti klavesnice pricte do globalni
>promenne jednicku. Svou aplikaci tuto globalni promennou
>ctu.
>
>
>Muzete mi nekdo, prosim, poradit, kde je problem?
>
>deklarace:
>
>function VratPocet: integer; stdcall; external 'KEYHOOKLIB';
--------------^ takhle to nejde zjistovat z DLL

>procedure NastavCurrentHook: integer; stdcall; external 'KEYHOOKLIB';
>
>
>procedure TForm1.FormCreate(Sender: TObject);
>var
> CallProcAdr : TFNHookProc;
> HandleDLL : longint;
> HookHandle : HHook;
>begin
>HandleDLL := LoadLibrary(PChar('keyhooklib.dll'));
>CallProcAdr := GetProcAddress(HandleDLL, PChar('BylStisk'));
>
>// --- tady nastavuji Hook funkci
>
>HookHandle:= SetWindowsHookEx(WH_Keyboard,
> CallProcAdr, HandleDLL, 0);
>
>CurrentHook:= HookHandle;
>Label1.Caption:= IntToStr(CurrentHook); // pro kontrolu si
>vypisuji HookHandle
>NastavCurrentHook(CurrentHook);
>end;
>
>
>moje DLL:
>
>library KEYHOOKLIB;
>
>uses
> SysUtils, messages,windows,
> Classes;
>
>var Pocet: integer = 0;
> CurrentHook : HHook;
>
>
>function BylStisk(code: integer; wParam: WParam; LParam: LParam):
>integer;stdcall;
>var Zprava: integer;
>begin
>if code<0 then
> begin
> Result := CallNextHookEx(CurrentHook, Code, wParam, lParam);
> exit;
> end;
>
>Pocet := Pocet +1 ;>Result := CallNextHookEx(CurrentHook, Code, wParam, lParam);
>end;
>
>function VratPocet: integer; stdcall;
>begin
>result:= Pocet;
>end;
>
>procedure NastavCurrentHook(aHook :HHook); stdcall;
>begin
>CurrentHook := aHook;
>HandleAplikace := AHandleAplikace;
>end;
>
>exports
> BylStisk index 1,
> VratPocet index 2,
> NastavCurrentHook index 3;
>begin
>end.
>
>
>

Maxim�ln� width

[*] Petr Vones <pvones(zv)mbox.vol(tec)cz> - 25.4.1998 19:36:15

Leopold Grepl wrote:
>
> Ahoj Delphini,
>
> m�m takov� zaj�mav� probl�m. Ve scrollboxu m�m shape a u n�ho nastavuji width. Pokud s width p�es�hnu 32000 a n�jak� drobn�, tak po��t� u� se z�porn�mi hodnotami. To vypad� jako by se pro width pou��val 2-bytov� integer, ale p�itom Delphi 3 jsou 32-bitov� a tud� by integer m�l b�t 4-bytov�, tedy a� do 2mld. Ve zdroj�c�ch je to opravdu integer.
>
> Proto tedy nev�m, jak nakreslit shape s v�t�� ���kou ne� 32000.
>
> Dal�� probl�m mi nast�v�, pokud range u scrollbaru je v�t�� ne� 65535. Potom se tam dan� shape dokonce opakuje v�cekr�t se za��tky
> x * 65536 + Shape.left.
>
> P�edem d�kuji za ka�dou odpov�d na m� dva dotazy.
>
> Leopold Grepl
> Melzer s.r.o.

Zkousel jsi to na Windows 95 a NT ? Ted to sice nevim presne, ale mam pocit ze
ve Windows 95 je omezen souradnicovy system na 32768 (???) bodu a jen NT
pouzivaji plne 32 bitove hodnoty. Ale mozna kecam .... :-)

Co se tyce range ScrollBaru, tak tam je problem pokud se pouziva thumbtracking,
behem tazeni posuvniku lze totiz precist pozici pouze 16ti bitove i kdyz rozsah
scrollbaru muze byt 32bitovy (viz API fuknce GetScrollPos). Tento nedostatek
lze obejit napriklad tak jak je to v komponente TDrawGrid. Petr Vones, amatersky programator.

Vypocet Velikonoc

[*] Petr Vones <pvones(zv)mbox.vol(tec)cz> - 25.4.1998 19:39:39

Ahoj,

Shanim algoritmus na vypocet Velikonoc.

Dekuji.

Petr Vones, amatersky programator


Re[2]: vypocet - "polska notace"

[*] Hubert <mneu3246(zv)ss1000.ms.mff.cuni(tec)cz> - 25.4.1998 19:40:47

A> Cau
A> Nic proti, ale na Tvem miste bych si procetl nejake uplne zakladni
A> knihy o programovani a algoritmech (treba slovensky vysleho Wirtha
A> nebo kniho od pana Topfera - uz jsem zapomel, jak se jmenuje, ale
A> tehdy jsem ji ocenil, jako docela dobrou :-), kde se dozvis spoustu
A> informaci, rozsiris si prehled a minimalne termin "polska notace"
A> Te nejenze neprekvapi, ale budes i vedet, kde si o nem neco precist...
A> Arthur

Ta kniha od TOEPFERA se jmenuje ALGORITMY a programovaci techniky a
ta kniha od Wirtha se jmenuje pokud se nemylim Algoritmy a datove
struktury (samozrejme ve slovenskem prekladu).

Zpracovani CGI skriptu

[*] chaloupka(zv)mboxzn(tec)cz (Chaloupka Pavel) - 25.4.1998 22:31:04

Ja pouzivam pro psani CGI programu cgiexpert free. Jsou dve verze lite -
cgiexpert free a plna cgiexpert za penize. Umi to jak CGI tak WinCGI. V
hotove aplikaci se to da prepinat dle potreby pomoci jedne property. Pri
WinCGI se to da i debugovat. Testoval jsem nekolik serveru a jenom s Xitami
webserverem to chodi OK.
Je to celkem dobre. S helpem, nejake ukazky jak to psat.
(Testovano na Delphi 2.0 Developer)

Jsou verze jak pro Delphi 2.0 tak pro 3.0.

CGIExpert http://www.cgiexpert.com
CGiExpert free -"-
Xitami http://www.imatix.com

-----P�vodn� zpr�va-----
Od: Jan Sluka <snipe(zv)mail.cybernet(tec)cz>
Komu: delphi(zv)pinknet(tec)cz <delphi(zv)pinknet(tec)cz>
Datum: 25. dubna 1998 12:00
P�edm�t: Zpracovani CGI skriptu


>Vazeni,
>
>obracim se na Vas vsechy s nasledujicim dotazem.
>
>Na UNIXu mam vybudovanou HTML stranku, ktera
>zpracovava urcite CGI skripty.
>Bohuzel jsem nucen tuto stranku vystavet take pod
>Windows NT.
>Zajimalo by me, jak je mozno vytvorit v Delphi 3.0
>Professional program, ktery by zpracovaval tyto CGI
>skripty a jak donutit prohlizec, aby byly tyto skripty
>zaslany prave tomuto programu ke zpracovani.
>
>Dekuji predem za Vase odpovedi.
>
>S pozdravem
>
>Jan Sluka, snipe(zv)mail.cybernet(tec)cz
>Tkalcovska 856/B
>688 01 Uhersky Brod
>

tray icon

[*] chaloupka(zv)mboxzn(tec)cz (Chaloupka Pavel) - 25.4.1998 22:32:11

V RxLib je na to komponenta RxTrayIcon.

-----P�vodn� zpr�va-----
Od: Martin Fronek <FRONEK(zv)FIC.CZ>
Komu: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
Datum: 25. dubna 1998 10:16
P�edm�t: Re: tray icon


>Hi,
>
>napis svou adresu, poslu ti to. fronek(zv)fic(tec)cz
>
>
>Jakub Dusek wrote:
>>
>> Potreboval bych poradit jak v Delphi 2 udelat na taskbaru
>> ikonu. Nasel jsem sice navod ale v Delphi 2 nefunguje. Diky.

Vypocet Velikonoc

[*] peterrus(zv)intesys(tec)cz (Peter Rus) - 25.4.1998 23:23:18

Ahoj,

Sveho casu se probiralo ... tohle je od "unites(zv)telecom(tec)cz", Roman Palarcik
taky necim prispel.

------><<< Cut here :-)))))
function vel(rok:integer):string;
var s,dat,r:string;
e:integer;

begin
if rok<100 then rok:=rok+1900;
e:=((5+2*(rok mod 4)+4*(rok mod 7)+6*((19*(rok mod 19)+24) mod 30))
mod 7)+((19*(rok mod 19)+24) mod 30)+22;
str(rok:4,r);
if e<=31 then begin
str(e:2,dat);
s:='03/'+dat+'/'+r;
end else begin
if (e-31)>=26 then e:=19 else e:=e-31;
str(e:2,dat);
s:='04/'+dat+'/'+r;
end;
vel:=s;
end;

begin
writeln(vel(1998));
end.
--------


Bye,

Peter
peterrus(zv)intesys(tec)cz


Petr Vones wrote:

> Ahoj,
>
> Shanim algoritmus na vypocet Velikonoc.
>
> Dekuji.
>
> Petr Vones, amatersky programator

DdeInitialize ?

[*] Petr Vones <pvones(zv)mbox.vol(tec)cz> - 25.4.1998 23:58:50

Ahoj,

Mam aplikaci ktera pouziva soubory urcite pripony. Chtel bych pridruzeni
pripony a spousteni me aplikace pomoci DDE. Umistil jsem tedy na formular
komponentu TDdeServerConv a Name nastavil na System, coz je standartni
topic v tomto pripade. Problem je, ze komponenta se inicializuje az s
formularem, coz je asi moc pozde, aplikace se nespusti a ohlasi se chyba.

Po te jsem postupoval tak ze jsem inicializoval globani objekt v unitu me
komponenty, ktery vytvori TDdeServerConv s nazvem System (skoda ze neni
oddelen nazev komponenty a topicu, pak by bylo po problemech) a udalost
OnExecuteMacro preda do me komponenty. To sice funguje spolehlive ale
ma to problem ze po instalaci v prostredi Delphi se to tez inicializuje
coz se mi prilis nelibi.

Jde mi o to jestli je mozne provest vice volani funcke DdeInitialize v
ramci jedne aplikace a tim mit i vice callback funkci ?

S pozdravem

Petr Vones, amatersky programator


tray icon

[*] Martin Fronek <FRONEK(zv)FIC.CZ> - 26.4.1998 01:57:20

Vim.


Chaloupka Pavel wrote:
>
> V RxLib je na to komponenta RxTrayIcon.
>
> -----P�vodn� zpr�va-----
> Od: Martin Fronek <FRONEK(zv)FIC.CZ>
> Komu: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
> Datum: 25. dubna 1998 10:16
> P�edm�t: Re: tray icon
>
> >Hi,
> >
> >napis svou adresu, poslu ti to. fronek(zv)fic(tec)cz


ServerSocket, ClientSocket

[*] Arthur <Arthur(zv)hlpsoft(tec)cz> - 26.4.1998 07:46:12


K tomu bych se pripojil. Nedavno jsem se pokousel o komunikaci pomoci
Delphi Internet komponent a ziskal jsem dojem, ze to funguje jen v urcitych
pripadech (za uplnku a tak :-), nehlede k tomu, ze za sebou musis tahat
ty *.ocx a jeste je nejak registrovat. Nakonec jsem to rozbehl pomoci
komponent z internetu (hledal jsem to, myslim, na TORRY, ale urcite
budou i na DSP apod.). Jestli chces, tak Ti muzu poslat co mam.
Arthur

-----Original Message-----
From: ing. Trnin� Milan [SMTP:bodlak1(zv)czn(tec)cz]
Sent: Friday, April 24, 1998 12:51 PM
To: DELPHI Distribution List
Subject: Re: ServerSocket, ClientSocket

Pokud by se Ti to podarilo, dej vedet. Muj kolega ma podobny problem.

----------

Dobry den,
chtel bych se zeptat, jestli nekdo nahodou nemate podrobnou dokumentaci (nebo kde ji pripadne najit) ke komponentam pro Internet. V Delphi3 je napoveda jen na zakladni funkce. Konkretne si nevim rady s komponentou TClientSocket a TServerSocket. Ja

S pozdravem
Frantisek Sobola


Re[2]: vypocet - "polska notace"

[*] Arthur <Arthur(zv)hlpsoft(tec)cz> - 26.4.1998 07:49:46


-----Original Message-----
From: Hubert [SMTP:mneu3246(zv)ss1000.ms.mff.cuni(tec)cz]
Sent: Saturday, April 25, 1998 8:41 PM
To: DELPHI Distribution List
Subject: Re[2]: vypocet - "polska notace" Ta kniha od TOEPFERA se jmenuje ALGORITMY a programovaci techniky a
ta kniha od Wirtha se jmenuje pokud se nemylim Algoritmy a datove
struktury (samozrejme ve slovenskem prekladu).

[Arthur] Dik (-: To vis, pamet uz nejak neslouzi a v dobach, kdy jsem bloumal po Maly Strane
jsem to mel od nekoho pujceny.



Pouzivanie interfaceov

[*] Zdeno Jasek <zdeno.delphi(zv)mailcity(tec)com> - 27.4.1998 01:36:59 -0700

>Interface v Delphi je NECO NAPROSTO ODLISNEHO nez interface v Jave.

To ma mrzi, ale dakujem za vysvetlenie.
Get your FREE, private e-mail
account at http://www.mailcity.com


Tlac RichTextu

[*] Zdeno Jasek <zdeno.delphi(zv)mailcity(tec)com> - 27.4.1998 03:48:50 -0700

Ma niekto SERIOZNY komponent pre tlac RichTextu v QuickReporte? Za serioznu tlac
nepokladam, ked mi komponent nerozdeli text na dve strany, ak sa text nezmesti na
jednu! Riesil uz niekto nieco podobne?

Vdaka za rady...

Get your FREE, private e-mail
account at http://www.mailcity.com


Zobrazen� Html z disku

[*] No Comment Group, s.r.o. - Sales department <sales(zv)nocomment.sk> - 27.4.1998 19:27:31

ahoj

co tak namiesto "http" pouzit "file" ...

richard willmann

-----Original Message-----
From: Petr Urban <urban(zv)zbk(tec)czn(tec)cz>
To: Delphi(zv)pinknet(tec)cz <Delphi(zv)pinknet(tec)cz>
Date: 14. m�j 1998 6:35
Subject: Zobrazen� Html z disku


Zkou��m si trochu hr�t s Delphi a internetem. Nev�m ale, jak zobrazit v Html
(THtml) str�nku, kter� je na disku tak, aby se neza�al p�ihla�ovat k
internetu. Um�m pouze zobrazit str�nku, kter� je na internetu (u� to je ale
SUPER :). Nev�m, jestli jste to n�kdy n�kdo zkou�el. Ale
za pokus nic ned�m. Hledal jsem to n�jakou dobu v helphu, ale bezv�sledn�.
Jakoby na to snad ani nemysleli :(
S pozdravem

Cooler


Databazy a aplikacie

[*] No Comment Group, s.r.o. - Sales department <sales(zv)nocomment.sk> - 27.4.1998 19:31:23

Vzhladom na ukoncenu diskusiu o spolahlivosti Paradox tabuliek a na
skutocnost havarie mojho disku, mal by som na Vas pani dve otazky:* ako zarucit korektny beh aplikacie s Paradox tabulkami (caste vypadky
indexov atd.)

* aka existuje alternativa k Paradoxu a ake ma vyhody


predom dakujem


richard willmann


Nastaveni fontu pro tisk v Delphi1

[*] ZDENEK MIHULA <mihula(zv)tab.pvt(tec)cz> - 27.4.1998 07:35:34

Nevite prosim vas nekdo, jak v Delphi1 v programu, ktery ma behat pod W95 nastavit stredoevropsky script u fontu, ktery se pouzije pro tisk. V Deplhi1 objekt Printer ma moznost nastavit jmeno fontu (printer.canvas.font.name:=....] , ale jiz se neda nastvit script. Ve W3.x je to jasny, tam dosadim napr.Couries CE, ale v W95 nastavim jen Courier a jednou mi to tiskne cesky a jindy zase ne, podle toho jestli se script pisma nastavi zrovna na stredoevropsky nebo zapadoevropsky.

Za kazdou odpoved predem Dekuji.

Pouzivanie interfaceov

[*] Ing. Jahoda Jaroslav <Jaroslav.Jahoda(zv)lesprojekt(tec)cz> - 27.4.1998 07:43:01

> Pouziva niekto pri OOP interface? Programujem sucasne aj v Jave a dost
> som si na
> to zvykol a paci sa mi to. V Delphach vsak treba s nimi nejako
> specialne narabat
> a ked som ich zakomponoval do programu, zacal mi dost padat a nie vzdy
> mi fungoval
> tak, ako by som ocakaval.
>
> Ide mi o moznost deklarovat objekt sposobom
> type
> TMyObject = class( IMyInterface, TMyInyObject )
>
> kde prave IMyInterface by mal byt interface. V Delphi vsak kazdy
> interface vyzaduje
> implementaciu metody __AddRef ... apod., co sa mi vobec nepaci, lebo
> ma to nuti opakovane
> pisat ten isty kod. Ide to aj inak?
>
Vyjadrim se pouze k psani metod AddRef a Release. Z definice COM
je zrejme, ze kazdy interface musi byt potomkem IUnknown a ten uz sam
obsahuje metody AddRef, Release a QueryInterface. Takze objekt, ktery ma
20 interfaces ma take 20x implemetovano AddRef, 20x Release a 20x
QueryInterface.
Pokud vsak vim, tak Delphi na rozdil od C++ ma v sobe zabudovany
automaticky generator takovychto procedur, resp. dokaze vygenerovat
metodu IMyInterface.AddRef, ktera se odkazuje jiz hotovou meotdu
IMy2Interface.AddRef, ktera je jiz implementovana v jinem interface.
Pouze, pokud chcete, aby pro specificky interface byla naimplementovana
jina metoda AddRef, tak musite provest tzv. prejmenovani metod (viz
help).
Ve svych OCX komponentach, jsem byl nucen doimplementovat
nekolik standardnich interface, ktere Delphi neimplemetuje a IE4 je
vyzaduje pro nektere cinnosti. A dalsi zkusenost je s tim, kdy jsem
potreboval reimplementovat jednu metodu jiz implementovaneho interface.
V tomto pripade uvedu v deklaraci, ze implemetuji tento interface a v
metodach uvedu pouze tu metodu, kterou chci prepsat (nejedna se o
dedicnost!).

TMyComponenta = class(TActiveXControl, IMyComponenta,
IOleInPlaceObject)
{ IOleInPlaceObject }
function SetObjectRects(const rcPosRect: TRect; const
rcClipRect: TRect): HResult; stdcall;
{ IMyComponenta }
function Get_Enabled: WordBool; safecall;
function Get_FileName: WideString; safecall;
function Get_Visible: WordBool; safecall;
procedure Center(X, Y: Integer); safecall;
procedure Fit; safecall;
procedure Set_Enabled(Value: WordBool); safecall;
procedure Set_FileName(const Value: WideString); safecall;
procedure Set_Visible(Value: WordBool); safecall;
procedure Zoom(ZoomOut: WordBool); safecall;
procedure ZoomArea(LowX, LowY, HighX, HighY: Integer);
safecall;
end

V tomto priklade jsou vytaceny vsechny dulezite metody, jsou
odstraneny promenne. Jak vidite, zadne AddRef, Release ci QueryInterface
zde neni. Jo a komponenta funguje.

J.Jahoda

> Get your FREE, private e-mail
> account at http://www.mailcity.com


Properties

[*] Krayzel Libor <Libor.Krayzel(zv)czech-tv(tec)cz> - 27.4.1998 07:45:02

Zdravim,

da se nejak z Delphi vyvolat dialogove okno Properties (to, co se
objevi, kdyz v pruzkumniku kliknu na soubvor pravym tlacitkem a vyberu
Vlastnosti)?
Dekuji.

S pozdravem

Libor Krayzel
Czech Television, Television Studio Ostrava
Dvorakova 18
729 20 Ostrava

Phone: (069) 6201 375
E-mail: mailto:Libor.Krayzel(zv)czech-tv(tec)cz
> Homepage: http://members.tripod.com/~sovtop
> Fidonet: mailto:libor_krayzel(zv)p5.f59.n421.z2.fido(tec)cz
> E-mail2: mailto:sovtop(zv)email(tec)cz
>
>

RecordLock

[*] Martin Nedopil <nedopil(zv)eskon(tec)cz> - 27.4.1998 07:53:30

Ja bych to zkusil takto jednoduse:

* Otevru tabulku
* Zkusim editovat
* kdyz je vyjimka, tak to bude asi zamcene.
* neni vyjimka, oteviram pro editaci, a tim jsem zamkl


function LockEdit(ATable:TTable):boolean;
begin
Result:=false;
try
ATable.Edit;
Result:=true;
except
on E:Exception do begin end;
end;
end;

Staci takto?

Martin Nedopil
nedopil(zv)eskon(tec)cz
nedopil(zv)geocities.com
Delphi kitchen?: http://www.geocities.com/Athens/Olympus/5260

Nastaveni fontu pro tisk v Delphi1

[*] Ondrej Kelle <Kelleon(zv)nnsk.sk> - 27.4.1998 07:54:16

Vo svojom Delphi 1 programe nemusis menit nic... Nechaj tam napr.
Courier CE. Vo Win32 sice Courier CE neexistuje, ale v Registry su
definovane substitucie fontov prave pre Win3.x programy. Ja som
napriklad na svojom stroji nasiel nasledovne:

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes]
"Arial CE,0"="Arial,238"
"Arial CE,238"="Arial,238"
"Courier CE,0"="Courier,238"
"Courier CE,238"="Courier,238"
... atd.

Zdar

Ondrej Kelle
it(zv)nnsk.sk

> -----Original Message-----
> From: ZDENEK MIHULA [SMTP:mihula(zv)tab.pvt(tec)cz]
> Sent: 27. apr�l 1998 7:36
> To: delphi(zv)pinknet(tec)cz
> Subject: Nastaveni fontu pro tisk v Delphi1
>
> Nevite prosim vas nekdo, jak v Delphi1 v programu, ktery ma behat pod
> W95 nastavit stredoevropsky script u fontu, ktery se pouzije pro tisk.
> V Deplhi1 objekt Printer ma moznost nastavit jmeno fontu
> (printer.canvas.font.name:=....] , ale jiz se neda nastvit script. Ve
> W3.x je to jasny, tam dosadim napr.Couries CE, ale v W95 nastavim jen
> Courier a jednou mi to tiskne cesky a jindy zase ne, podle toho jestli
> se script pisma nastavi zrovna na stredoevropsky nebo zapadoevropsky.
>
> Za kazdou odpoved predem Dekuji.

vypocet - "polska notace"

[*] Ing. Jindrich Danihelka <jidas(zv)mbox.vol(tec)cz> - 27.4.1998 07:58:20

JAK se vzorec prevadi na polskou notaci bohuzel v hlave nemam.
Pamatuji si ze skoly, ze prave tenhle algoritmus nam ukazovali
jako priklad pouziti fifo zasobniku. Zkusim to nekde najit.

Ing. Jindrich Danihelka
E-Mail jidas(zv)mbox.vol(tec)cz
Tel. 038/57805
038/7512861



SATON Glass s.r.o. wrote:
>
> Asi jsem se spatne vyjadril, priority znam, omlouvam se. Ano jde mne asi o "polskou notaci". Kdyz jsem si ted ten nazev precetl, tak me to prastilo do oci.
> Bohuzel o ni nic jineho nevim. Takze bych rad vedel JAK se takovy vyraz prevadi. Vypada to na moji mezeru ve vzdelani a tak se ji snazim co nejrychleji zacelit.
> Diky Kuba
>
> Kupka Lubom�r
>
--


Zobrazeni loga

[*] �uhel Petr <Cuhel(zv)diamo(tec)cz> - 27.4.1998 08:29:54

lepsi, funguje, spokojen
Dik

>Od: Stepan Cerny[SMTP:chaosz(zv)geocities.com]

>To je vcelku jednoduche ...

>Packo shledacko


Malilinky off-topic

[*] Zdenek Prantl <prantl(zv)ptc.pvt(tec)cz> - 27.4.1998 08:37:22

> -----Original Message-----
> From: Richard Vdovjak [SMTP:richardv(zv)win.tue.sk]
> Sent: Friday, April 24, 1998 3:43 PM
> Subject: Re: Malilinky off-topic
>
> >Na VS (VSDS Zilina 8-) jsme na takoveto optimalizace (hledani minimalni
> cesty)
> >meli skripta, jmenovalo se to "Operacni analyza I a II" a tam byly popsany
> >algoritmy pro tyto optimalizace. Bohuzel jsem tyto skripta pujcil a jiz se
> mi
> >nevratily, takze ani nevim autora. Zkus se po nich poptat (nebo po podobne
> autor sa vola Doc. RnDr. Jaroslav Janacek (ludia, kt. absolvovali tuto VS
> si urcite spomenu :)
>
> bye richo.

?? I ty, Brute ??

Na Janacka nelze zapomenout, ale autora skript "proste si ne a ne vybavit" 8-)
Nechtel jsem balamutit...
Bye. Zdenek
prantl(zv)ptc.pvt(tec)cz

P.S.: Poslal bych to na privatni adresu, ale vraci se mi to jako nedorucitelne,
tak ostatni prominte.
----- Transcript of session follows -----
554 <richardv(zv)win.tue.sk>... 550 Host unknown (Authoritative answer from name
server)

Zobrazeni loga

[*] �uhel Petr <Cuhel(zv)diamo(tec)cz> - 27.4.1998 08:40:27

Dik,

to co jsem potreboval a jeste neco navic.

> P�vodn� zpr�va viz.

> Od: Petr Studeny[SMTP:studeny(zv)olympo(tec)cz]
> Odesl�no: 20. dubna 1998 18:27
> P�edm�t: Re: Zobrazeni loga
>

frekvence procesoru

[*] sula milos <crkstrobe(zv)geocities(tec)com> - 27.4.1998 09:07:47

Toto je zpr�va ve form�tu MIME obsahuj�c�n�kolik ��st�.

Na tema zjisteni frekvence procesoru tu jiz padlo nekolik odpovedi, ale dosud se mi nepodarilo zjistit jak spolehlive zjistim frekvenci procesoru nezavisle na jeho typu at se jedna o Intel AMD Cyrix atd...,nebo o procesor typu 80286 a vyssi. Proto se chci jeste zeptat zda nekdo nezna nejakou spolehlivou metodu, ktera by 100% fungovala.Podarilo se mi sehnat par rutin ale ty byly zalozeny na testovani poctu pruchodu cyklu za urcitou dobu, ale problem je v tom ze funguji pouze s nekterymi procesory a na jinych ukazuji spatnou frekvenci. Dalsi moznosti bylo pouziti CPUID, ale nejsem si jist zda je tato funkce implementovana na nizsich pocitacich tridy nez je 486.

hook funkce - problem

[*] Dalibor Toman <dtoman(zv)fortech(tec)cz> - 27.4.1998 09:07:54

>Ahoj
>
>poprve se pokousim pracovat s hook funkcemi windows.
>Nedari se mi odchytavat udalosti smerovane na jine
>aplikace, nez v moji.
>
>Napsal jsem jednoduche DLL, ve ktere mam callback
>funkci, ktera pri udalosti klavesnice pricte do globalni
>promenne jednicku. Svou aplikaci tuto globalni promennou
>ctu.
>
>
>Muzete mi nekdo, prosim, poradit, kde je problem?
>
>ve sve aplikaci pri onFormCreate volam SetWindowsHook
>a v handleru timeru si vypisuji hodnotu funkce VratPocet
>Pri stisku klavesnice v me aplikaci se hodnota zvysi,
>pri stisku klavesnice v jine aplikaci ne.


neni to tim, ze Keyboard hook opravdu chyta jen klavesy zarazovane do
fronty sve vlastni aplikace ? Neexperimentoval jsem s tim, ale da se mi,
ze v Helpu mezi radky to tak je napsano.

Cau
D. Toman

frekvence procesoru

[*] Turcan Peter <turcan(zv)softip.sk> - 27.4.1998 09:28:39

[P��loha v souboru: Peter Turcan.vcf]
CPUID je len od Pentia a nevracia frekvenciu CPU

Peter Turcan
-----Original Message-----
From: sula milos <crkstrobe(zv)geocities.com>
To: delphi konference <delphi(zv)pinknet(tec)cz>
Date: 27 April 1998 9:20
Subject: frekvence procesoru


Na tema zjisteni frekvence procesoru tu jiz padlo nekolik odpovedi, ale dosud se mi nepodarilo zjistit jak spolehlive zjistim frekvenci procesoru nezavisle na jeho typu at se jedna o Intel AMD Cyrix atd...,nebo o procesor typu 80286 a vyssi. Proto se chci jeste zeptat zda nekdo nezna nejakou spolehlivou metodu, ktera by 100% fungovala.Podarilo se mi sehnat par rutin ale ty byly zalozeny na testovani poctu pruchodu cyklu za urcitou dobu, ale problem je v tom ze funguji pouze s nekterymi procesory a na jinych ukazuji spatnou frekvenci. Dalsi moznosti bylo pouziti CPUID, ale nejsem si jist zda je tato funkce implementovana na nizsich pocitacich tridy nez je 486.

Vypocet Velikonoc

[*] Zdenek Prantl <prantl(zv)ptc.pvt(tec)cz> - 27.4.1998 09:42:56

> -----Original Message-----
> From: Petr Vones [SMTP:pvones(zv)mbox.vol(tec)cz]
> Sent: Saturday, April 25, 1998 7:40 PM
> Subject: Vypocet Velikonoc
> Shanim algoritmus na vypocet Velikonoc.

Staci zalistovat v archivu na http://delphi.mius(tec)cz (doufam, ze jsem se neupsal
v adrese)

Zdenek
prantl(zv)ptc.pvt(tec)cz


InstallShield SK

[*] �uhel Petr <Cuhel(zv)diamo(tec)cz> - 27.4.1998 09:47:06

Malinky dotaz.
pokud bych v ramci instalace chet instalovat nejnovejsi verzi BDE jak se
to da zaridit ?
Nova verze ma totiz drivery pro novy Access.
> puvodni zprava
> Ja jenom aby nodeslo k omylu. Pro majitele Delphi je dodavan IS jako
> soucast Delphi
> v urcite omezene podobe. Tim je ten problem vyresen. Umime lokalizovat
> i profesionalni
> verzi. Pro Delphisty je vsak ta dodavana verze nejlepsi. Jednak je
> zcela dostacujici
> a jednak ma skvele a jednoduse zabudovan system instalace celeho BDE,
> SQL links
> a tvorbu ALIAS.
> Jaro.
>

Format BMP souboru

[*] David Hrb�� - 27.4.1998 09:48:25

pro TAR zkus http://www.wotsit.demon.co.uk/
David.

-----P�vodn� zpr�va-----
Od: Michael Gallo <mgallo(zv)nocomment.sk>
Komu: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
Datum: 25. dubna 1998 2:48
P�edm�t: Re: Format BMP souboru


Ak by to niekoho zaujimalo, tu su specifikacie formatu BMP (Windows, pozor,
nemylit si to s rovnomennym formatom OS2)
Takychto specifikacii mam plne cedecko (+kod v C++), ak by mal niekto zaujem
o ine formaty, no problem.

Btw: nema niekto TAR pod Windows?

Michael Gallo
No Comment Group s.r.o.
e-mail: mgallo(zv)nocomment.sk
web: www.nocomment.sk

-----Original Message-----
From: ing. Trn�n� Milan <bodlak1(zv)czn(tec)cz>
To: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
Date: 24. apr�l 1998 17:37
Subject: Re: Format BMP souboru


To je problem PaintShopu. Staci si to prekonvertovat pomoci AcdSee.

----------
> Odes�latel: V�t�zslav Gazda <softda(zv)mbox.vol(tec)cz>
> Komu: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
> P�edm�t: Re: Format BMP souboru
> Datum: 24. dubna 1998 10:28
>
> Potrebuji ulozit bitmapu do souboru. Zkusil jsem to pomoci TBitmap.
> Vytvoreny soubor sel otevrit v aplikaci Malovani, ale nesel otevrit v
> PaintShopu. Potrebuji nejaky univerzalni zpusob, aby byl soubor BMP
> pouzitelny ve vsech aplikacich, ktere ho podporuji. Nema nekdo nejaky
> kompletni a univerzalni popis formatu BMP ?
>
> Diky Vita

Pouzivanie interfaceov

[*] Pavel Cisar <pcisar(zv)aktis(tec)cz> - 27.4.1998 09:49:22

Mily priteli,

Interface v Delphi je NECO NAPROSTO ODLISNEHO nez interface v Jave. V D3 se
jedna o COM interface, takze neni od veci si prostudovat nektere ZAKLADNI
materialy o COM/OLE, kterych se dnes uz vali vsude tucty (knihy, casopisy,
on-line atd. staci si pustit Altavistu nebo zavitat na www.microsoft.com).
Co se implementace _AddRef/_Release (IUnknown) tyce, pak neni nutne jej
stale dokola implementovat, staci pouze podedit z vhodneho predka, kterych
D3 nabizi hned nekolik (pro ruzne pouziti, viz TInterfacedObject,
TCOMObject, TAutoObject atd.).

Zaverem bych si dovolil jeste jednou DURAZNE PODTRHNOUT, ze interface v D3
je neco jineho nez v Jave, a NELZE k nim pristupovat (technicky ani
myslenkove) stejne.


-----P�vodn� zpr�va-----

>Pouziva niekto pri OOP interface? Programujem sucasne aj v Jave a dost som
si na
>to zvykol a paci sa mi to. V Delphach vsak treba s nimi nejako specialne
narabat
>a ked som ich zakomponoval do programu, zacal mi dost padat a nie vzdy mi
fungoval
>tak, ako by som ocakaval.
>
>Ide mi o moznost deklarovat objekt sposobom
>type
> TMyObject = class( IMyInterface, TMyInyObject )
>
>kde prave IMyInterface by mal byt interface. V Delphi vsak kazdy interface
vyzaduje
>implementaciu metody __AddRef ... apod., co sa mi vobec nepaci, lebo ma to
nuti opakovane
>pisat ten isty kod. Ide to aj inak?

vypocet - "polska notace"

[*] Pavel Drtil <drtil(zv)norek.list.skm.vutbr(tec)cz> - 27.4.1998 09:59:43

> JAK se vzorec prevadi na polskou notaci bohuzel v hlave nemam.
> Pamatuji si ze skoly, ze prave tenhle algoritmus nam ukazovali
> jako priklad pouziti fifo zasobniku. Zkusim to nekde najit.

mas napr. vzorec:

2+4*5-3*(4+8)-5*6/7+(8-(9*6))

no udelas si dva zasobniky
a jedes
cisla hazes doleva a operatory vpravo

Levy Pravy
2 +
4

Nyni se tam vyskytuje op. s vyssi prioritou ten se radi bez problemu na konec

2 +
4 *
5

Pak tu mame - coz ma nizsi prioritu nez * a tak presype pravy zasobnik doleva az po misto
s jeste nizsi prioritou (nebo levou zavorku)- zde to bude znamenat, ze presype vsechno

2 -
4
5
*
+

Pak zase normalne:
(uz to zacina byt dlouhy budu to psat na radky)

Levy: 2 4 5 * + 3
Pravy: - * (

Zde stoji za povsimnuti, ze zavorka pada do prava a nepresouva doleva nic

Levy: 2 4 5 * + 3 4 8
Pravy: - * ( +

a prava zavorka presype vse az po levou

Levy: 2 4 5 * + 3 4 8 +
Pravy: - *

dale pak normalne

Levy: 2 4 5 * + 3 4 8 + * -
Pravy: -

Levy: 2 4 5 * + 3 4 8 + * - 5 6 * 7 / - 8 9 6
Pravy: + ( - ( *

Levy: 2 4 5 * + 3 4 8 + * - 5 6 * 7 / - 8 9 6 * - +
Pravy:

no a je to tu 2 4 5 * + 3 4 8 + * - 5 6 * 7 / - 8 9 6 * - + je ten vyraz co jsme chteli

2+4*5-3*(4+8)-5*6/7+(8-(9*6))
2+4*5-3*(4+8)-5*6/7+8-9*6

je potreba si davat pozor na unarni minus - je potreba je rozlisovat
nebo pred unarni minus napr. hodit sikovne nulu

-66 +33

0 66 - 33 +

Priority jsou snad jasny + a - stejna nejnizsi pak vyssi * a /
Je mozno tam pak zamichat SQR, SQRT a dalsi ty pak lezi zase vys
a pak nejvyssi prioritu ma unarni minus a zavorky

Tot vse.

Ve starem dobrem Pascalu jsem v polske notaci delal i derivaci.
To se dela taky perfektne - stejne jako se vyhodnocuje hodnota vyrazu
ta jen jednotlive cleny derivujem a ono to pak vypadne samo
Prefixova polska notace me nejak nechytla, ackoli je to to samy jako tato postfixova

Pavel


Nastaveni fontu pro tisk v Delphi1

[*] chaloupka(zv)mboxzn(tec)cz (Chaloupka Pavel) - 27.4.1998 10:04:36

Ve Windows 95 je to v Win.ini a v NT v registrech.

-----P�vodn� zpr�va-----
Od: Ondrej Kelle <Kelleon(zv)nnsk.sk>
Komu: 'DELPHI Distribution List' <delphi(zv)pinknet(tec)cz>
Datum: 27. dubna 1998 8:09
P�edm�t: RE: Nastaveni fontu pro tisk v Delphi1


Vo svojom Delphi 1 programe nemusis menit nic... Nechaj tam napr.
Courier CE. Vo Win32 sice Courier CE neexistuje, ale v Registry su
definovane substitucie fontov prave pre Win3.x programy. Ja som
napriklad na svojom stroji nasiel nasledovne:

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes]
"Arial CE,0"="Arial,238"
"Arial CE,238"="Arial,238"
"Courier CE,0"="Courier,238"
"Courier CE,238"="Courier,238"
... atd.

Zdar

Ondrej Kelle
it(zv)nnsk.sk

> -----Original Message-----
> From: ZDENEK MIHULA [SMTP:mihula(zv)tab.pvt(tec)cz]
> Sent: 27. apr�l 1998 7:36
> To: delphi(zv)pinknet(tec)cz
> Subject: Nastaveni fontu pro tisk v Delphi1
>
> Nevite prosim vas nekdo, jak v Delphi1 v programu, ktery ma behat pod
> W95 nastavit stredoevropsky script u fontu, ktery se pouzije pro tisk.
> V Deplhi1 objekt Printer ma moznost nastavit jmeno fontu
> (printer.canvas.font.name:=....] , ale jiz se neda nastvit script. Ve
> W3.x je to jasny, tam dosadim napr.Couries CE, ale v W95 nastavim jen
> Courier a jednou mi to tiskne cesky a jindy zase ne, podle toho jestli
> se script pisma nastavi zrovna na stredoevropsky nebo zapadoevropsky.
>
> Za kazdou odpoved predem Dekuji.

Nastaveni aktual. casu a data

[*] Ing. Ji�� Kub��ek - 27.4.1998 10:20:54

Toto je zpr�va ve form�tu MIME obsahuj�c�n�kolik ��st�.

Prosim o radu, jak v DELPHI nastavit aktualni cas a datum operacniho systemu. Zjistit je lze pomoci NOW nebo DATE a TIME ale jak je nastavit?
Diky.

Uzavreni formulare

[*] SIPEK Stanislav, Ing. <SIPEK(zv)fbm.vutbr(tec)cz> - 27.4.1998 10:26:48

Nazdar vsichni

Mam problem s uzaviranim formulare. Mam globalni funkci ve ktere
vytvarim za behu formular a zobrazujiho jako ShowModal. V metode OnClose
tohoto formulare nastavim potrebny ModalResult a Action nastavim na
caHide, ale dany formular se nezavre. Staci vsak pres nej prejet mysi a
on se zavre a program pokracuje normalne dal. Cela konstrukce vypada asi
takto:

function CtiData (port : byte) : byte;
begin
.
.
SerialKomForm := TSerialKomForm.Create (Application);
if SerialKomForm.ShowModal = mrOK then //nechce to samo skoncit
begin
.
.
end;
SerialKomForm.Free;

end;

Mozna by pomohlo v OnClose metode daneho formulare poslat nejakou
zpravu, ale nevim jakou a kam. Vubec nechapu, proc to nechce skoncit.
Netusite nekdo v cem by mohl byt problem a jak to odstranit?

Diky Standa
---------------------------------------------------
Ing. Stanislav Sipek
VUT Fakulta podnikatelska
Technicka 2
BRNO
tel. 05/41142768
E-mail: sipek(zv)fbm.vutbr(tec)cz
---------------------------------------------------


Nastaveni fontu pro tisk v Delphi1

[*] Ondrej Kelle <Kelleon(zv)nnsk.sk> - 27.4.1998 11:12:50

>> Ve Windows 95 je to v Win.ini a v NT v registrech.

Matne si spominam, ze na stroji s Windows 95 som videl rovnake
nastavenia v Registry. Nemam momentalne pristup k Windows 95, takze:
mohli by ste to niekto prosim skontrolovat?

Myslim, ze namiesto "Windows NT" treba dosadit "Windows", takze:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\FontSubsti
tutes]
...atd.

Ondrej Kelle
it(zv)nnsk.sk


Uzavreni formulare

[*] Marek Prokop <prokopsw(zv)czn(tec)cz> - 27.4.1998 11:51:13

V OnClose nic delat nemusite. Jakmile kdekoli priradite ModalResult, formular se uz zavre sam.

Marek Prokop

On Monday, April 27, 1998 10:27 AM, SIPEK Stanislav, Ing. [SMTP:SIPEK(zv)fbm.vutbr(tec)cz] wrote:
> Nazdar vsichni
>
> Mam problem s uzaviranim formulare. Mam globalni funkci ve ktere
> vytvarim za behu formular a zobrazujiho jako ShowModal. V metode OnClose
> tohoto formulare nastavim potrebny ModalResult a Action nastavim na
> caHide, ale dany formular se nezavre.

Uzavreni formulare

[*] Zdenek Prantl <prantl(zv)ptc.pvt(tec)cz> - 27.4.1998 11:52:32

> -----Original Message-----
> From: SIPEK Stanislav, Ing. [SMTP:SIPEK(zv)fbm.vutbr(tec)cz]
> Sent: Monday, April 27, 1998 10:27 AM
> Subject: Uzavreni formulare
> Mam problem s uzaviranim formulare. Mam globalni funkci ve ktere
> vytvarim za behu formular a zobrazujiho jako ShowModal. V metode OnClose
> tohoto formulare nastavim potrebny ModalResult a Action nastavim na
> caHide

caHide formular nezrusi, ale pouze jej udela neviditelny
rusi se pomoci caFree
Navic nepises, s jakymi parametry vytvaris dany formular,u MDI aplikaci nelze u
formularu MDIChild dat priznak caHide.

>, ale dany formular se nezavre. Staci vsak pres nej prejet mysi a
> on se zavre a program pokracuje normalne dal.

To vypada spis, ze se formular zavre, ale nedojde k prekresleni podkladu pod
oknem...

> Mozna by pomohlo v OnClose metode daneho formulare poslat nejakou
> zpravu, ale nevim jakou a kam. Vubec nechapu, proc to nechce skoncit.

Zkus tam po zavreni formulare dat Refresh nebo Update.

Zdenek
prantl(zv)ptc.pvt(tec)cz

Nastaveni fontu pro tisk v Delphi1

[*] Zdenek Prantl <prantl(zv)ptc.pvt(tec)cz> - 27.4.1998 12:02:40

> >> Ve Windows 95 je to v Win.ini a v NT v registrech.
>
> Matne si spominam, ze na stroji s Windows 95 som videl rovnake
> nastavenia v Registry. Nemam momentalne pristup k Windows 95, takze:
> mohli by ste to niekto prosim skontrolovat?

Je to i v registrech, ale 16-ti bit programy se stale obraceji do WIN.INI

Zdenek
prantl(zv)ptc.pvt(tec)cz


Help a klavesa F1

[*] info(zv)saton(tec)cz (SATON Glass s.r.o.) - 27.4.1998 12:02:07


Zdravim,
mam problem s helpem, ktery odolava mym utokum.
Na vsech formularich mimo hlavniho jsem schopen klavesou F1 aktivovat help.
V hlavnim formu v menu u polozky Napoveda mam nastaveno ShortCut na F1 a nastaven� KeyPreview je TRUE(na 100%).
Pri stisku polozky menu Napoveda se help vyvola, pri stisku F1 ne. Na co jsem jeste zapomenul?
Za kazdou radu diky.
Kuba

Kupka Lubom�r
-------------------------------------------------------------------------------------------------------------
SATON Glass, s.r.o. - slu�by v oblasti programov�n� a v�po�etn� techniky
Klicperova 26, Brno, 628 00 �R
Tel.:+420 5 44217819 Fax.:+420 5 44217529
Mob:+420 603 429505
-------------------------------------------------------------------------------------------------------------


Uzavreni formulare

[*] Ondrej Kelle <Kelleon(zv)nnsk.sk> - 27.4.1998 12:19:30

>> Nazdar vsichni

>> Mam problem s uzaviranim formulare. Mam globalni funkci ve
ktere
>> vytvarim za behu formular a zobrazujiho jako ShowModal. V
metode OnClose
>> tohoto formulare nastavim potrebny ModalResult a Action
nastavim na
>> caHide, ale dany formular se nezavre.

Mam dojem, ze nemas nastavene vlastnosti ModalResult tlacitok... On
totiz TButton, ktoreho ModalResult je mrNone, nesposobi zatvorenie
formulara, takze OnClose sa vobec nekona...

Ondrej Kelle
it(zv)nnsk.sk


Nastaveni fontu pro tisk v Delphi1

[*] info(zv)saton(tec)cz (SATON Glass s.r.o.) - 27.4.1998 12:31:16


Jen poznamka na okraj. Pri jedne hromadne distribuci jsme zjistili, ze se jeste vyskytuji lide, kteri mazou !?nepotrebne?! fonty v systemu. Museli jsme kvuli tomu zabudovat do programu moznost uzivatelsky menit font tisku. Pri chybejicim fontu se sice nasel ten "nejpodobnejsi", ale pravda, ne vzdy to vypadalo dobre.
Nikdy by me nenapadlo, ze bude nekdo cistit adresat s fonty.
Kuba

Kupka Lubom�r
-------------------------------------------------------------------------------------------------------------
SATON Glass, s.r.o. - slu�by v oblasti programov�n� a v�po�etn� techniky
Klicperova 26, Brno, 628 00 �R
Tel.:+420 5 44217819 Fax.:+420 5 44217529
Mob:+420 603 429505
-------------------------------------------------------------------------------------------------------------

Nevite prosim vas nekdo, jak v Delphi1 v programu, ktery ma behat pod W95 nastavit stredoevropsky script u fontu, ktery se pouzije pro tisk. V Deplhi1 objekt Printer ma moznost nastavit jmeno fontu (printer.canvas.font.name:=....] , ale jiz se neda nastvit script. Ve W3.x je to jasny, tam dosadim napr.Couries CE, ale v W95 nastavim jen Courier a jednou mi to tiskne cesky a jindy zase ne, podle toho jestli se script pisma nastavi zrovna na stredoevropsky nebo zapadoevropsky.

Za kazdou odpoved predem Dekuji.

Nastaveni aktual. casu a data

[*] stingp1.eti(zv)mail.cez(tec)cz - 27.4.1998 12:38:55



The SetSystemTime function sets the current system time and date. The
system time is expressed

in Coordinated Universal Time (UTC).

BOOL SetSystemTime(CONST SYSTEMTIME * lpst);
Parameters
lpst

Points to a SYSTEMTIME structure that contains the current system date and
time.
The wDayOfWeek member of the SYSTEMTIME structure is ignored.

Tolik napoveda DELPHI, resp. WIN32

Cau, Pavel

stingp1.eti(zv)mail.cez(tec)cz

etatherm(zv)telecom(tec)cz na 27.04.98 09:20:54

Odpov?zte pros?m - delphi(zv)pinknet(tec)cz

Komu: delphi(zv)pinknet(tec)cz
Kopie: (Na v?dom?: Stingl Pavel/2310/ETI/CEZ)
P?edm?t: Nastaveni aktual. casu a data

Prosim o radu, jak v DELPHI nastavit aktualni cas a datum operacniho
systemu. Zjistit je lze pomoci NOW nebo DATE a TIME ale jak je
nastavit? Diky.

Zvukovka z Delphi

[*] Nykl, Pavel <nykl(zv)satoya(tec)cz> - 27.4.1998 12:45:10

Ahoj vsichni, nevite, prosim, nekdo jak menit z Delphi hlasitost ze
zvukovky?
Diky

-----------------------------------------------------------------
Pavel Nykl Saturn Toya s.r.o. - Teletext systems
mailto:nykl(zv)satoya(tec)cz P.O.Box 44,169 00 Praha 69,Czech republic
http://www.satoya(tec)cz/~nykl/ Phone,fax **420-2-57216290,352939
-----------------------------------------------------------------

Nastaveni aktual. casu a data

[*] V�t�zslav Gazda������u��n�?��? - 27.4.1998 13:13:13

Pouzij API funkci SetSystemTime.

Vita


Delphi 3 & Informix

[*] Wagner Lubomir <wagner(zv)minv.sk> - 27.4.1998 13:16:03

Prosim o radu ...

V nasej spolocnosti pouzivame Informix ako databazovy server.
Ja robim programy v Delphi a na spojenie s databazou v Informixe
pouzivam ODBC driver. Ale radsej by som pouzival native driver od
Borlandu ( dodavany s Delphi C/S ).
Problem je v tom, ze pri ukonceni aplikacie (ukonceni spojenia s databazou)
- pri pouziti native driveru - dostanem chybovu hlasku tohoto znenia :

--------------------------------------------------------
OSCAR caused an invalid page fault in
module KERNEL32.DLL at 0137:bff798fb.
Registers:
EAX=00000001 CS=0137 EIP=bff798fb EFLGS=00010202
EBX=006ffc84 SS=013f ESP=00600000 EBP=00600020
ECX=7d5692e0 DS=013f ESI=00000001 FS=4667
EDX=c00174ac ES=013f EDI=815e4740 GS=0000
Bytes at CS:EIP:
53 56 57 89 65 e8 75 04 33 c0 eb 4f 85 c9 74 46
Stack dump:
815e4740 00000001 006ffc84 815e4740
00601df4 bffb8cf8 bffb8fe0 ffffffff
00601e04 bff7add7 7d5692e0 00000001
7d569401 7d5692e0 00601e2c 7d569320
---------------------------------------------------------

Aplikacia pracuje dobre a chybova hlaska sa objavi iba pri jej ukonceni.
Tato chybova hlaska sa objavuje iba pri pouziti aplikacie pod Windows 95
a nie pod Windows NT. Ale v nasej spolocnosti sa pouziva hlavne Windows 95
na prac. staniciach.
Pouzivam najnovsi Informix net od Informixu (ISQLT07C.DLL), ako aj najnovsie Delphi
- 3.02.

Zdravi Vas

Lubo.

Help a klavesa F1

[*] V�t�zslav Gazda������u��n�?��? - 27.4.1998 13:25:31

Nevim to jiste, ale myslim si ze by klavesa F1 mela spustit napovedu
automaticky, bez toho aniz by jsi musel nastavovat ShortCut v menu.
Zkus nastavit vlastnost HelpFile pro Application nebo pro hlavni formular.

Vita


Help a klavesa F1

[*] Ondrej Kelle <Kelleon(zv)nnsk.sk> - 27.4.1998 13:29:20

Napada ma este Application.HelpFile, pripadne MainForm.HelpFile...
KeyPreview mam False a chodi to.

Ondrej Kelle
it(zv)nnsk.sk

> -----Original Message-----
> From: info(zv)saton(tec)cz [SMTP:info(zv)saton(tec)cz]
> Sent: 27. apr�l 1998 12:02
> To: 'DELPHI Distribution List'
> Subject: Help a klavesa F1
>
> Zdravim,
> mam problem s helpem, ktery odolava mym utokum.
> Na vsech formularich mimo hlavniho jsem schopen klavesou F1 aktivovat
> help.
> V hlavnim formu v menu u polozky Napoveda mam nastaveno ShortCut na F1
> a nastaven� KeyPreview je TRUE(na 100%).
> Pri stisku polozky menu Napoveda se help vyvola, pri stisku F1 ne. Na
> co jsem jeste zapomenul?
> Za kazdou radu diky.
> Kuba


hook funkce - problem

[*] Pavel Kral <kral(zv)afx(tec)cz> - 27.4.1998 13:30:33


-----Original Message-----
From: Dalibor Toman <dtoman(zv)fortech(tec)cz>
To: DELPHI Distribution List <delphi(zv)pinknet(tec)cz>
Date: 27. dubna 1998 11:19
Subject: Re: hook funkce - problem
>neni to tim, ze Keyboard hook opravdu chyta jen klavesy zarazovane do
>fronty sve vlastni aplikace ? Neexperimentoval jsem s tim, ale da se mi,
>ze v Helpu mezi radky to tak je napsano.
>
>Cau
>D. Toman
>

Ne, uz se mi to podarilo rozchodit, spatne jsem identifikoval odchyceni
udalosti. Ted pokazde, kdyz prijmu udalost, odesilam ji na svou aplikaci
a tim se to vyresilo.

Cau Pavel

Nastaveni aktual. casu a data

[*] VLADO KEDER<keder(zv)pbko.sk> - 27.4.1998 13:46:17


Volanim funkcie SetSystemTime.

Vlado.


Tu je cast helpu (win32.hlp)

The SetSystemTime function sets the current system time and date. The
system time is expressed in Coordinated Universal Time (UTC).

BOOL SetSystemTime(
CONST SYSTEMTIME * lpst // address of system time to set
);
Parameters

lpst

Points to a SYSTEMTIME structure that contains the current system date and
time.


etatherm(zv)telecom(tec)cz on 27.04.98 10:20:54

Please respond to delphi(zv)pinknet(tec)cz

To: delphi(zv)pinknet(tec)cz
cc: (bcc: VLADO KEDER/PBKO/SK)
Subject: Nastaveni aktual. casu a data

Prosim o radu, jak v DELPHI nastavit aktualni cas a datum operacniho
systemu. Zjistit je lze pomoci NOW nebo DATE a TIME ale jak je
nastavit? Diky.

DDE

[*] NDCA <ndca(tec)cz(zv)pha.pvtnet(tec)cz> - 27.4.1998 14:04:30

Muze nekdo poradit jak poslat string z aplikace s komponentou DdeClient do aplikace s komponentou DdeServer?
Ja jsem do Clienta napsal:

procedure TForm1.btnZPETClick(Sender: TObject);
var
TheData: PChar;
begin
StrPCopy(TheData, Edit1.Text);
DDEClientConv1.PokeData(DDEClientItem1.DDEItem,TheData);
end;

V aplikaci Server udalost chyta:

procedure TForm1.DdeServerItem1PokeData(Sender: TObject);
begin
Edit2.Text:=DdeServerItem1.Text;
showmessage('POKE');
end;

K preneseni textu z Edit1.Text Clienta do Edit2.Text Serveru dojde, ale vzapeti je vyvolana chyba "Access violation at address..."

Diky za kazdy namet. Radim Hauptmann <ndca(tec)cz(zv)pha.pvtnet(tec)cz>

Zvukovka z Delphi

[*] David Hrb�� - 27.4.1998 14:18:16

Je toho hodne, ale napr.
http://SunSITE.ICM.edu.pl/delphi/ftp/d10free/audio.zip

David


-----P�vodn� zpr�va-----
Od: Nykl, Pavel <nykl(zv)satoya(tec)cz>
Komu: Delphi <delphi(zv)io.pinknet(tec)cz>
Datum: 27. dubna 1998 13:50
P�edm�t: Zvukovka z Delphi


>Ahoj vsichni, nevite, prosim, nekdo jak menit z Delphi hlasitost ze
>zvukovky?
>Diky
>
>-----------------------------------------------------------------
>Pavel Nykl Saturn Toya s.r.o. - Teletext systems
>mailto:nykl(zv)satoya(tec)cz P.O.Box 44,169 00 Praha 69,Czech republic
>http://www.satoya(tec)cz/~nykl/ Phone,fax **420-2-57216290,352939
>-----------------------------------------------------------------
>
>

frekvence procesoru

[*] Bielik Marian <bielik(zv)basl.sk> - 27.4.1998 14:45:00


Neviem ci ti to pomoze, ale na http://www.delphideli.com/dlsys.htm je
niekolko
"sysinfo" komponentov. Sam som ich neskusal , ale ak nemas inu moznost
...

Marian

sula milos wrote:

> Na tema zjisteni frekvence procesoru tu jiz padlo nekolik odpovedi,
> ale dosud se mi nepodarilo zjistit jak spolehlive zjistim frekvenci
> procesoru nezavisle na jeho typu at se jedna o Intel AMD Cyrix
> atd...,nebo o procesor typu 80286 a vyssi. Proto se chci jeste zeptat
> zda nekdo nezna nejakou spolehlivou metodu, ktera by 100%
> fungovala.Podarilo se mi sehnat par rutin ale ty byly zalozeny na
> testovani poctu pruchodu cyklu za urcitou dobu, ale problem je v tom
> ze funguji pouze s nekterymi procesory a na jinych ukazuji spatnou
> frekvenci. Dalsi moznosti bylo pouziti CPUID, ale nejsem si jist zda
> je tato funkce implementovana na nizsich pocitacich tridy nez je 486.

z bodu A do B

[*] jan.pruha(zv)matsushita(tec)cz (Jan Pruha) - 27.4.1998 15:00:00 jst


Ahoj

Ten algoritmus se jmenuje hledani kriticke cesty.
V podstate musis mit datovou strukturu, ktera obsahuje konektivitu
vsech definovanych bodu se vzdalnostmi mezi nimi. Nejlepe by se asi
hodil nejaky vicesmerne zretezeny seznam.

1) Pak si najdes ve strukture vychozi bod.

2) Z neho se vydas postupne po vsech linkach do bodu, ktere maji k
tvemu bodu primou vazbu.

3) Vsude kam vlezes nejprve otestujes, zda to neni tvuj cil. Pokud ne,
nechas znacku TADY UZ JSEM BYL (ochrana proti zacykleni) a opakujes 2)
(tady bude asi nejlepsi pouzit rekurzi)

4) Kdyz dospejes do ciloveho bodu, ulozis si nekam tuto variantu spolu
s jeji delkou (postupne musis nascitat vsechny vzdalenosti po ceste).

5) Algoritmus konci, kdyz mas ve vsech bodech znacku TADY UZ JSEM BYL

Pak uz si jen ze vsech ulozenych variant vyberes tu nejlepsi.

Samozrejme toto je jen obecna verze. Lze pripojit spoustu
optimalizaci. Napriklad kdyby se melo jednat o hledani cesty na mape,
pak by bylo dobre nekam natvrdo ulozit cestu mezi vyznamnymi uzly a
pak hledat cestu jen z A do spadoveho uzlu a z druheho spadoveho uzlu
do B atd.

cao Honza


INF soubory

[*] Martin Nedopil <nedopil(zv)eskon(tec)cz> - 27.4.1998 15:12:00

Pratele,

mam maly problemek a nevim si s nim opet rady.

Chci si napsat instalacni programek ve stylu INF-Tool tzn. cela
instalace probiha pomoci INF souboru.

Co je vsak problem je struktura INF souboru. Bohuzel vubec nevim (az
na par svetlych mist) co jednotlive sekce znamenaji, co jsou sekce
definovane
programatorem a co sekce, ktere pouziva Setup.

Knizka Microsoft Windows 95 Resource Kit , konkretne dil II.strana 1049
dodatek C
mlzi a mlzi a mlzi, takze da pet odpovedi a padesat otazek. Nakonec to hodi
na
prirucku Win32 Software Development Kit for Windows 95 and Windows NT.

A tak se ptam:
* Pracoval uz nekdo s temito INF soubory? Demo potesi...
* Nemate nekdo onu vyse citovanou prirucku? Kde se da sehnat a kolik stoji,
pripadne bych ji radsi shanel v elektronicke podobe.

Diky.

Martin Nedopil
nedopil(zv)eskon(tec)cz
nedopil(zv)geocities.com
Delphi kitchen�: http://www.geocities.com/Athens/Olympus/5260

CGI apod.

[*] Arthur <Arthur(zv)hlpsoft(tec)cz> - 27.4.1998 16:21:18

Jsem tu opet s malym off topicem, ikdyz je to pro me s Delphi uzce spjato.
V ramci zuslechtovani naseho firemniho Intranetu jsem se dopracoval k CGI
(coz uz tu probehlo a za CGI Experta jeste jednou dekuju :-) a ted i k
DHTML_JScript-um. No neni to spatne (mohlo by byt i lepsi).
Otazka zni, zda mam moznost v ramci nejakeho JScriptu vyvolat CGI nebo
cokoli "od jinud" nebo alespon zapsat na serveru do nejakeho log souboru.
Diky Arthur

PS Obcas se nas IIS zblazni a normalni dotaz metodou get: blabla.exe?sdf=4 sice
zavola blabla.exe, ale ty paramtry tam jaksi nejsou... Nesetkali jste se nekdo s tim?

=====================================
David Arthur Muzatko
HelpSoft, spol. s r. o.
Uruguayska 1, Praha 2
tel./fax.: 24255816, 90004272-5
e-mail: Arthur(zv)HlpSoft(tec)cz
=====================================

Help a klavesa F1

[*] info(zv)saton(tec)cz (SATON Glass s.r.o.) - 27.4.1998 16:48:35


Ten je nastaveny, jen jsem ho neuvadel.
Jeste bych snad uvedl, ze v menu (primo kdyz stojim na nektere polozce menu) po stisku F1 se help rozjede tak jak ma.
Kuba

Kupka Lubom�r
-------------------------------------------------------------------------------------------------------------
SATON Glass, s.r.o. - slu�by v oblasti programov�n� a v�po�etn� techniky
Klicperova 26, Brno, 628 00 �R
Tel.:+420 5 44217819 Fax.:+420 5 44217529
Mob:+420 603 429505
-------------------------------------------------------------------------------------------------------------
Napada ma este Application.HelpFile, pripadne MainForm.HelpFile...
KeyPreview mam False a chodi to.

Ondrej Kelle
it(zv)nnsk.sk

Nastaveni aktual.casu a data

[*] Ing. Ji�� Kub��ek - 27.4.1998 16:48:14

Toto je zpr�va ve form�tu MIME obsahuj�c�n�kolik ��st�.

Diky za bleskovou pomoc. Bohuzel v 16-ti bitovem DELPHI1, ktere mam jsem v helpu (ani ve WINAPI) funkci SetSystemTime nenasel. Je jina moznost nez dokoupeni DELPHI2-3?
Jirka


Zvukovka z Delphi

[*] Vaclav Sazima <sazima(zv)comp(tec)cz> - 27.4.1998 19:18:20

http://www.aye.net/~bstowers/delphi/meeder/files/amdcpack.zip

Vaclav Sazima

Nykl, Pavel wrote:

> Ahoj vsichni, nevite, prosim, nekdo jak menit z Delphi hlasitost ze
> zvukovky?
> Diky
>
> -----------------------------------------------------------------
> Pavel Nykl Saturn Toya s.r.o. - Teletext systems
> mailto:nykl(zv)satoya(tec)cz P.O.Box 44,169 00 Praha 69,Czech republic
> http://www.satoya(tec)cz/~nykl/ Phone,fax **420-2-57216290,352939
> -----------------------------------------------------------------

TImageList

[*] Jan Krizek <krizek(zv)pinknet(tec)cz> - 27.4.1998 20:14:24

Ahoj,

mam problem ve svem programu. Pouzivam komponentu TImageList (v D3) a
vse je v poradku, ale na nekterych pocitacich se obrazky nezobrazuji.
Nemate nekdo s tim zkusenost. Co to zpusobuje, ci jak tento problem
vyresit?

Diky Honza +

---------------------------------------------------------------------
Jan Krizek e-mail : mailto:krizek(zv)pinknet(tec)cz
http://i.love.pinknet(tec)cz/~krizek
* Letecke Muzeum http://letadla.pinknet(tec)cz/LeteckeMuzeum
* 1938 http://web.pinknet(tec)cz/1938

TImageList

[*] Roman Appeltauer <tool_tim(zv)tyhan(tec)cz> - 27.4.1998 20:50:00

Zdrav�m!
Zalezi na tom, kde a jak mas ulozeny obrazky, podle mne je to jen tim,
ze je
imagelist prazny.

Tool Tim

-----P�vodn� zpr�va-----
P�edm�t: TImageList


>Ahoj,
>
>mam problem ve svem programu. Pouzivam komponentu TImageList (v D3) a
>vse je v poradku, ale na nekterych pocitacich se obrazky nezobrazuji.
>Nemate nekdo s tim zkusenost. Co to zpusobuje, ci jak tento problem
>vyresit?
>
> Diky Honza +

Tlac RichTextu

[*] �ke��k Jaroslav�������6�����̿ - 27.4.1998 20:57:27

Zdravim.
Tisk formatu RTF ukladanaho napr. pomoci DBRichText resi nas generator
tiskovych
sestav. Informace naleznete na www.inea(tec)cz. Je zde uveden i distributor pro
SR.
Verze pro Delphi1 a Delphi2jsou ke stazeni bezplatne. Pro Delphi 3 je k
dipozici
demonstracni verze. Demonstracni program DemoVCL (pro Delphi 3) resi ukazku
tisku RTF
tak, ze tiskne vlastni navod. Vyzkousejte. Tisknul jsem asi 60-tistrankovy
dokument.
Vice se do BLOB polozky neveslo.
S pozdravem Jaro.
Jaro(zv)sinea(tec)cz
----------------------------------------------------------------------------
--


>Ma niekto SERIOZNY komponent pre tlac RichTextu v QuickReporte? Za serioznu
tlac
>nepokladam, ked mi komponent nerozdeli text na dve strany, ak sa text
nezmesti na
>jednu! Riesil uz niekto nieco podobne?
>
>Vdaka za rady...
>
>
>
>Get your FREE, private e-mail
>account at http://www.mailcity.com


Pouzivanie interfaceov

[*] Hubert <mneu3246(zv)ss1000.ms.mff.cuni(tec)cz> - 27.4.1998 21:06:56

ZJ> Pouziva niekto pri OOP interface? Programujem sucasne aj v Jave a dost som si na
ZJ> to zvykol a paci sa mi to. V Delphach vsak treba s nimi nejako specialne narabat
ZJ> a ked som ich zakomponoval do programu, zacal mi dost padat a nie vzdy mi fungoval
ZJ> tak, ako by som ocakaval.

ZJ> Ide mi o moznost deklarovat objekt sposobom
ZJ> type
ZJ> TMyObject = class( IMyInterface, TMyInyObject )

ZJ> kde prave IMyInterface by mal byt interface. V Delphi vsak kazdy interface vyzaduje
ZJ> implementaciu metody __AddRef ... apod., co sa mi vobec nepaci, lebo ma to nuti opakovane
ZJ> pisat ten isty kod. Ide to aj inak?
ZJ> Get your FREE, private e-mail
ZJ> account at http://www.mailcity.com

Pokud te to neurazi, tak prejdi na VB 5.0, ten ma implementaci
INTERFACE na docela slusny urovni.

z bodu A do B

[*] Hubert <mneu3246(zv)ss1000.ms.mff.cuni(tec)cz> - 27.4.1998 21:23:08


JP> Ahoj

JP> Ten algoritmus se jmenuje hledani kriticke cesty.
JP> V podstate musis mit datovou strukturu, ktera obsahuje konektivitu
JP> vsech definovanych bodu se vzdalnostmi mezi nimi. Nejlepe by se asi
JP> hodil nejaky vicesmerne zretezeny seznam.

JP> 1) Pak si najdes ve strukture vychozi bod.

JP> 2) Z neho se vydas postupne po vsech linkach do bodu, ktere maji k
JP> tvemu bodu primou vazbu.

JP> 3) Vsude kam vlezes nejprve otestujes, zda to neni tvuj cil. Pokud ne,
JP> nechas znacku TADY UZ JSEM BYL (ochrana proti zacykleni) a opakujes 2)
JP> (tady bude asi nejlepsi pouzit rekurzi)

JP> 4) Kdyz dospejes do ciloveho bodu, ulozis si nekam tuto variantu spolu
JP> s jeji delkou (postupne musis nascitat vsechny vzdalenosti po ceste).

JP> 5) Algoritmus konci, kdyz mas ve vsech bodech znacku TADY UZ JSEM BYL

JP> Pak uz si jen ze vsech ulozenych variant vyberes tu nejlepsi.

JP> Samozrejme toto je jen obecna verze. Lze pripojit spoustu
JP> optimalizaci. Napriklad kdyby se melo jednat o hledani cesty na mape,
JP> pak by bylo dobre nekam natvrdo ulozit cestu mezi vyznamnymi uzly a
JP> pak hledat cestu jen z A do spadoveho uzlu a z druheho spadoveho uzlu
JP> do B atd.

JP> cao Honza



Uz vas tu dlouho pozoruju a tak si taky musim prihodit trochu do
mlyna. Pokud hledas nejkratsi cestu je i jiny zpusob. Staci jit z
vychoziho bodu a pomoci prohledavani do sirky (prohledavani pomoci
vlny) muzes najit nejkratsi cestu do hledaneho mista.
Pokud se ti vsak jedna o nejkratsi nejlevnejsi cestu, tak ti
doporucuji pouzit Dijkstruv algoritmus.

Pokud moc nerozumis doporucuji ti knihu od Pavle Toepfera :
Algoritmy a programovaci techniky. Nakladatelstvi Prometheus.
Je tam primo kapitola NEJKRATSI CESTA V GRAFU.

© Delphi.cz, program netcode.cz, 2008-9.