Delphi onClick
-
jorg22
Medium Professional
- Príspevky: 1087
- Registrovaný: 12 aug 2006, 20:39
- Kontaktovať používateľa:
Delphi onClick
Pls akou funkciou v delphi zistim ci uzivatel stlacil lave tlacitko mysi hocikde v programe?
Thx.
Thx.
-
jorg22
Medium Professional
- Príspevky: 1087
- Registrovaný: 12 aug 2006, 20:39
- Kontaktovať používateľa:
No ja som so skusal riesit takto:
Inac hodila by sa mi aj nejaka dokumentacia pre komponentu webbrowser a to OleObject tiez neviem co to presne je, ja som nic zrozumitelneho nenasiel. thx
to mam v timeri takze vzdy ked dakto ukaze na nejaky odkaz tak sa zobrazi//Get the point where the mouse was clicked
GetCursorPos(currPoint);
// Convert the screen coordinates to client coordinates
currPoint := WebBrowser1.ScreenToClient(currPoint);
//Now get the element which was clicked
CurrElem := WebBrowser1.OleObject.Document.ElementFromPoint(CurrPoint.X,CurrPoint.Y);
//Verify whether the element is a link
if CurrElem.TagName = 'A' then
ShowMessage(CurrElem.href);
ale ja to chcem sprravit tak ze ked dakto na ten odkaz klikne aby sa to zobrazilo a nato potrebujem kontrolovat tlacitko mysi ci je stlacene a to neviem.ShowMessage(CurrElem.href);
Inac hodila by sa mi aj nejaka dokumentacia pre komponentu webbrowser a to OleObject tiez neviem co to presne je, ja som nic zrozumitelneho nenasiel. thx
Skús pozrieť úplne posledný príspevok: http://www.programmersheaven.com/mb/del ... /?S=B20000