csyasar Posted September 7, 2014 Share Posted September 7, 2014 Kısaca istediğim şey F5 tuşuna basınca yazdığım query refresh komutu işletilsin istiyorum. ancak f5 browserda sayfa refresh komutu olarak atandığı için hem query refresh ediliyor hem de sayfa refresh ediliyor. tuşların tamamının sadece programı etkilemesini nasıl sağlarım? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted September 7, 2014 Administrators Share Posted September 7, 2014 UniMainModule->MonitoredKeys->Enabled -> True UniMainModule->Keys : Yeni Key ekle, sonra: KeyEnd = KeyStart = 116, HandleBrowser = False Form'da KeyPreview = True procedure TMainForm.UniFormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = 116 then begin // refresh dbgrid task end; end; Not: F5 özel bir tuş olduğundan tüm tarayıcılarda aynı sonucu vermeyebilir. Quote Link to comment Share on other sites More sharing options...
csyasar Posted September 7, 2014 Author Share Posted September 7, 2014 chrome'da olumsuz, ie 11'de olumsuz. istediğim bu özel tuşları iptal edebilmek. bu mainmodule da gerekli ayarlamalar yapılmasa bile diğer tuşlar sorunsuz çalışıyor. Quote Link to comment Share on other sites More sharing options...
csyasar Posted September 8, 2014 Author Share Posted September 8, 2014 yazılımında kısayol tuşlar kullanmak isteyen biri forumda arama yaparsa diye yazıyorum: unigui'de kısayol tuşları olarak Shift + Harf veya Fonksiyon tuşu kombinasyonunu kullanabilirsiniz. hiç sıkıntı olmuyor. Quote Link to comment Share on other sites More sharing options...
csyasar Posted September 8, 2014 Author Share Posted September 8, 2014 şimdi deneyip buldum UniMainModule->MonitoredKeys->Enabled -> True UniMainModule->Keys : Yeni Key ekle, sonra: KeyEnd = KeyStart = 116, HandleBrowser = False Form'da KeyPreview = True procedure TMainForm.UniFormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = 116 then begin // refresh dbgrid task end; end; Not: F5 özel bir tuş olduğundan tüm tarayıcılarda aynı sonucu vermeyebilir. main module da ayarlama yapmaya gerek yok. çalışmıyor zaten. yukardaki ayarları ilgili form üzerinde yaparsanız tuşlar yalnızca ilgili formunuzda çalışıyor. Quote Link to comment Share on other sites More sharing options...
David Oliveira Posted May 29, 2015 Share Posted May 29, 2015 //disable f5 of browser in one edit procedure DesabilitaF5(AObject: TObject); var PropInfoPtr: PPropInfo; begin PropInfoPtr := GetPropInfo(AObject, 'ClientEvents'); if PropInfoPtr = nil then exit; AObject := GetObjectProp(AObject, PropInfoPtr); if AObject = nil then Exit; TUniClientEvents(AObject).ExtEvents.Values['keydown'] := //FbeforeInit; 'function (sender, e, eOpts)' + sLineBreak + '{' + sLineBreak + ' if(e.keyCode == ' + IntToStr(VK_F5) +')' + sLineBreak + ' {' + sLineBreak + ' e.preventDefault();' + sLineBreak + ' }' + sLineBreak + '}'; end; //To use DesabilitaF5(EdtCodigo); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.