English 中文(简体)
如何把下个牢房集中起来,同时点击制成表的关键和细胞色
原标题:How to focus the next cell while clicking tab key and cell coloring

我是新鲜的。

灵活治理

Header 01 .... 31
Values .........

如果我点击表塔顿,那么,我会把重点转移到同一行的下囚室。

Ascii

Private Sub flexgrid_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
  Case 48 To 57
   flexgrid.Text = flexgrid.Text & Chr(KeyAscii)
  Case 46  Dot
   flexgrid.Text = flexgrid.Text & Chr(KeyAscii)
  Case 8
   If Len(flexgrid.Text) > 0 Then
    flexgrid.Text = Left(flexgrid.Text, (Len(flexgrid.Text) - 1))
   End If
  Case Else
   KeyAscii = 0
   Beep
 End Select
End Sub

如何做到这一点。

And also how to change the particular cell background color. Code

    For i = 1 To flexgrid.Rows - 1
        flexgrid.TextMatrix(i, 33) = vbred  It s giving value like  255 
        flexgrid.TextMatrix(i, 33) = .CellBackColor = vbred  It s giving value  False 
    Next i

任何想法和建议?

最佳回答

移转所选栏使用主编(如果你愿意的话,则使用主编)活动,并将贵方的代码放在其中。

Private Sub MSFlexGrid1_KeyDown(KeyCode As Integer, Shift As Integer)

    If KeyCode = Asc(vbTab) Then
        If MSFlexGrid1.Col < MSFlexGrid1.Cols - 1 Then
            MSFlexGrid1.Col = MSFlexGrid1.Col + 1
        End If
    End If

End Sub

为了改变囚室背景颜色,首先将囚室设为囚室,然后将囚室设置。

flexgrid.Row = i
flexgrid.Col = 33
flexgrid.CellBackColor = vbRed
问题回答

暂无回答




相关问题
Prevent windows from queuing shellexecute requests

Win.ShellExecute 0, "open", "C:dirprogram.exe", "arguments", vbNullString, SW_SHOWNORMAL Win.ShellExecute 0, "open", "http://www.google.com", vbNullString, vbNullString, SW_SHOWNORMAL I want google....

Why is My Loop Only Deleting One File?

Using VB6 In a folder, i have n number of files, i want to delete a 0 kb files code Dim filename5 As String filename5 = Dir$(txtsourcedatabasefile & "*_*", vbDirectory) MsgBox filename5 Do ...

How to check the filesize?

Using VB6 I have the text file with different sizes, so i want to delete the file where filesize = 0 kb. How to make a vb6 code for deleting the 0 kb files. Need vb6 code Help

File Rename problem?

I m using VB6 and I have a folder where I have n number of files. I want to change the file extension to .txt. I used the code below to change the extension of all .fin files to .txt. Dim filename1 ...

Error 20728-F while in using Crystal Reports in VB6

I m using Crystal Reports in my VB6 project, but I m facing error while loading the report in crystalreport1.action=1; Please give me some solution for this problem. It is showing the error as Error ...

DllRegisterServer entry point was not found

When running my vb6 application I am getting error like, runtime error 53 : file not found: rscomclNoMsg.dll then i tried to register that dll from cmd line using regsvr32. Then I am getting ...

SQL Server 2000, ADO 2.8, VB6

How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8

热门标签