1

Konu: VFP formu ile ekran klavyesi kullanma

Son aylarda Windows Tablet PC lerin cogalmasi, fiyatlarinin dusmesi, RT degilde Normal Windows 8.1 calistiriyor olmasi mobil uygulama gelistiremeyen , zamani olmayan  yada web app gelistiremeyenler icin bir alternatif oldu.

Bu tabletlerde VFP sorunsuz calisiyor, SQL ve daha bir cogunu.. yani kullandigimiz pc den farki yok!
sadece kurulumlari C:\ uzerine yapmak zorundayiz SD card yada harici diske kurulum yapmiyor.

bu dert degil ben native dbf kullaniyorum da deseniz local yada remote sql de kullansaniz vfp formlarini kullanabiliyorsunuz. sadece yapmaniz gereken kontrolleri cozunurluge gore uydurmak buraya kadar tamam ancak sanal klavye yada OSK yi tetiklemeniz gerekebiliyor.

bunlarin disinda hic bunlari kullanmayan bir cozumde gozum carpti paylasmak istedim.

Visual Fox Pro
* Author:  Vilhelm-Ion Praisach

* Date: March 4, 2015
 
Declare Integer ShellExecute In shell32 Integer hWindow, String lpOperation, String lpFile, String lpParameters, String lpDirectory, Integer nShowCmd
Declare Integer SetParent In User32 Integer HWnd, Integer ParenthWnd
Declare Integer FindWindow In user32 String lpClassName, String lpWindowName
Declare Integer GetWindowLong In user32 Integer HWnd, Integer nIndex
Declare Integer SetWindowLong In user32 Integer HWnd, Integer nIndex, Integer dwNewLong
Declare Integer SetFocus In user32 Integer
Declare Integer SetWindowPos In user32 INTEGER HWnd, INTEGER hWndInsertAfter, INTEGER x, INTEGER Y, INTEGER cx, INTEGER cy, INTEGER uFlags
Declare Integer GetWindowThreadProcessId in Win32API Integer hWnd, Integer @lpdwProcessId
Declare Integer OpenProcess in Win32API Integer dwDesiredAccess, Integer bInheritHandle, Integer dwProcessID
Declare Integer TerminateProcess in Win32API Integer hProcess, Integer uExitCode
 
Clear
Public ofrm
ofrm = Createobject("MyForm")
ofrm.Show()
 
Define Class MyForm As Form
      Width = 900
      Height=430
      hOsk = 0
      nOskHeight = 200
      ShowWindow = 2
      Desktop = .T.
      AutoCenter = .T.
      Add Object txt As TextBox
      Add Object cmd As CommandButton With Top = 50 , Caption = "\<Tıkla"
      Add Object tmr As Timer With Interval = 300
 
      Procedure Load
            = ShellExecute(0, "open", "freevk.exe", "", "", 1) && this should be inside among your VFP paths
      ENDPROC
 
      PROCEDURE cmd.click
      MESSAGEBOX(thisform.txt.value + " yazıldı")
      ENDPROC 
 
      Procedure tmr.Timer
            LOCAL nStyle
            ThisForm.hOsk = FindWindow (.Null., "Free Virtual Keyboard (www.FreeVirtualKeyboard.com)")
            nStyle = GetWindowLong (ThisForm.hOsk, -16)
            SetWindowLong (ThisForm.hOsk, -16, Bitset(m.nStyle,30)) && set child
            SetWindowLong (ThisForm.hOsk, -16, Bitclear(m.nStyle,31)) && remove popup
            SetParent(ThisForm.hOsk, Thisform.HWnd) && change parent
            SetWindowLong (ThisForm.hOsk, -16, BITAND(m.nStyle,2^32-1-0xCF0000)) && remove the title bar
            SetWindowPos(ThisForm.hOsk, 0, 0, ThisForm.Height-ThisForm.nOskHeight,ThisForm.width, ThisForm.nOskHeight,  0x0020+0x0040) && move to the bottom of the form and show
 
            This.Enabled = .F.
            SetFocus(Thisform.HWnd) && set focus to the VFP window
      ENDPROC
      PROCEDURE destroy
            LOCAL lnProcessID
            lnProcessID = 0       
            GetWindowThreadProcessId(ThisForm.hOsk, @lnProcessID)       
            TerminateProcess(OpenProcess(1, 1, m.lnProcessID) , 0)
      ENDPROC
      PROCEDURE resize
            SetWindowPos(ThisForm.hOsk, 0, 0, ThisForm.Height-ThisForm.nOskHeight,ThisForm.width, ThisForm.nOskHeight,  0x0020+0x0040+0x0010) && move to the bottom of the form, and show, and SWP_NOACTIVATE
      ENDPROC
 
Enddefine
İleti eklentileri

vfp-osk.jpg
vfp-osk.jpg 59.81 kb, 3 kez indirildi, 2015-03-23 tarihinden itibaren 

Bu iletideki eklenti/leri indirmeye yetkiniz yok.

2

Re: VFP formu ile ekran klavyesi kullanma

Bu ne ise yariyor? Tabletde zaten klavye var.

3

Re: VFP formu ile ekran klavyesi kullanma

klavye form uzerinde(icinde)  calisiyor

4

Re: VFP formu ile ekran klavyesi kullanma

Mevcut klavye de oyle ve zaten o sekilde rahatsiz edici oldugu icin ben su anda yeniden ekran dizaynlariyla ugrasiyorum sad