home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 2.00 Begin Form KeyBrdFrm BackColor = &H00FFFFFF& BorderStyle = 3 'Fixed Double Caption = "On-Screen Keyboard Button Sample" ControlBox = 0 'False Height = 6255 Left = 135 LinkMode = 1 'Source LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 390 ScaleMode = 3 'Pixel ScaleWidth = 612 Top = 195 Width = 9300 Begin SKBButton SKB1 Height = 2055 Left = 6840 Picture = KEYBRD.FRX:0000 SKBType = 1 'Basic Keyboard Top = 1320 Version = 268435458 Width = 2055 End Begin PictureBox Picture1 BackColor = &H00C0C0C0& Height = 975 Index = 0 Left = 240 ScaleHeight = 945 ScaleWidth = 8745 TabIndex = 4 TabStop = 0 'False Top = 120 Width = 8775 Begin Label Label1 Alignment = 2 'Center BackColor = &H00C0C0C0& Caption = "Windows for Pens provides an on-screen keyboard that may be displayed at any time. In this demonstration, tap the SKB Button to make the keyboard appear below the control that has the focus." FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 735 Index = 0 Left = 540 TabIndex = 5 Top = 120 Width = 7635 End End Begin TextBox Text1 BackColor = &H00FFFFFF& FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 12 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 495 Left = 360 TabIndex = 0 Text = "Text1" Top = 1320 Width = 6255 End Begin VHedit HEdit1 BackColor = &H00FFFFFF& FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 12 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 495 InflateBottom = 18 InflateLeft = 18 InflateRight = 18 InflateTop = 18 Left = 360 TabIndex = 1 Text = "HEdit1" Top = 2040 Version = 268435458 Width = 6255 End Begin VBedit BEdit1 BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single CellHeight = 32 CellWidth = 24 CombBaseLine = 26 CombColor = &H00000000& CombEndHeight = 8 CombHeight = 4 FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 12 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 615 InflateBottom = 12 InflateLeft = 12 InflateRight = 12 InflateTop = 16 Left = 360 TabIndex = 2 Text = "BEdit1" Top = 2760 Version = 268435458 Width = 6255 End Begin PictureBox Picture2 BackColor = &H00C0C0C0& Height = 1395 Left = 120 ScaleHeight = 1365 ScaleWidth = 8865 TabIndex = 6 TabStop = 0 'False Top = 3720 Width = 8895 Begin CommandButton QueryKeyBrd Caption = "Query Keyboard " Height = 1095 Left = 6240 TabIndex = 3 Top = 120 Width = 2475 End Begin Label KBhWnd BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 375 Left = 1440 TabIndex = 13 Top = 120 Width = 1455 End Begin Label KBMinimized BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 375 Left = 4560 TabIndex = 16 Top = 120 Width = 1455 End Begin Label Label2 Alignment = 1 'Right Justify BackColor = &H00C0C0C0& Caption = "KB hWnd" FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 255 Index = 0 Left = 120 TabIndex = 7 Top = 240 Width = 1095 End Begin Label Label2 Alignment = 1 'Right Justify BackColor = &H00C0C0C0& Caption = "Minimized" FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 255 Index = 3 Left = 3120 TabIndex = 10 Top = 240 Width = 1335 End Begin Label KBStyle BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 375 Left = 1440 TabIndex = 14 Top = 480 Width = 1455 End Begin Label KBLeft BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 375 Left = 4560 TabIndex = 18 Top = 480 Width = 1455 End Begin Label Label2 Alignment = 1 'Right Justify BackColor = &H00C0C0C0& Caption = "SKBType" FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 255 Index = 1 Left = 120 TabIndex = 8 Top = 600 Width = 1095 End Begin Label Label2 Alignment = 1 'Right Justify BackColor = &H00C0C0C0& Caption = "Left" FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 255 Index = 5 Left = 3120 TabIndex = 11 Top = 600 Width = 1335 End Begin Label KBVisible BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 375 Left = 1440 TabIndex = 15 Top = 840 Width = 1455 End Begin Label KBTop BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 375 Left = 4560 TabIndex = 17 Top = 840 Width = 1455 End Begin Label Label2 Alignment = 1 'Right Justify BackColor = &H00C0C0C0& Caption = "SKBVisible" FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 255 Index = 2 Left = 0 TabIndex = 9 Top = 960 Width = 1215 End Begin Label Label2 Alignment = 1 'Right Justify BackColor = &H00C0C0C0& Caption = "Top" FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 255 Index = 6 Left = 3120 TabIndex = 12 Top = 960 Width = 1335 End End Begin CommandButton ExitButton Caption = "Return to Main Menu" FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 495 Left = 120 TabIndex = 19 Top = 5220 Width = 8895 End Sub BEdit1_GotFocus () If (SKB1.SKBVisible = False) Then SKB1.SKBLeft = BEdit1.Left SKB1.SKBTop = BEdit1.Top + BEdit1.Height + 5 End If End Sub Sub ExitButton_Click () MainFrm.Show KeyBrdFrm.Hide SKB1.SKBVisible = False End Sub Sub Form_Load () SKB1.SKBLeft = HEdit1.Left SKB1.SKBTop = HEdit1.Top + HEdit1.Height + 5 End Sub Sub HEdit1_GotFocus () If (SKB1.SKBVisible = False) Then SKB1.SKBLeft = HEdit1.Left SKB1.SKBTop = HEdit1.Top + HEdit1.Height + 5 End If End Sub Sub QueryKeyBrd_Click () Rem -- Query the keyboard for status properties KBhWnd.Caption = " &&h" + Hex$(SKB1.hWnd) KBStyle.Caption = " " + Str$(SKB1.SKBTypeStatus) If (SKB1.SKBVisibleStatus) Then KBVisible.Caption = " True" Else KBVisible.Caption = " False" End If If (SKB1.SKBMinStatus) Then KBMinimized.Caption = " True" Else KBMinimized.Caption = " False" End If On Error GoTo ErrTrap KBLeft.Caption = Str$(SKB1.SKBLeftStatus) KBTop.Caption = Str$(SKB1.SKBTopStatus) Exit Sub ErrTrap: KBLeft.Caption = " 0" KBTop.Caption = " 0" Exit Sub End Sub Sub Text1_GotFocus () If (SKB1.SKBVisible = False) Then SKB1.SKBLeft = Text1.Left SKB1.SKBTop = Text1.Top + Text1.Height + 5 End If End Sub