Posted 5 February 2021, 11:00 am EST
My code
Private Sub Form_Load()
gridset
End Sub
Private Sub gridset()
gr.MaxRows = 14
gr.MaxCols = 2
gr.UnitType = UnitTypeTwips
gr.AppearanceStyle = AppearanceStyleEnhanced
gr.Appearance = AppearanceFlat
gr.BorderStyle = BorderStyleNone
gr.CursorStyle = CursorStyleArrow
gr.EditModePermanent = True 'edit mode
gr.EditMode = True 'edit mode
gr.ColsFrozen = 1
gr.AutoSize = False
gr.UserResize = UserResizeColumns
gr.TextTip = TextTipOff
gr.SetActionKey 0, False, False, 0 'f2
gr.SetActionKey 1, False, False, 0 'f3
gr.SetActionKey 2, False, False, 0 'f4
gr.RowHeadersShow = False
gr.NoBeep = True
gr.ProcessTab = True
gr.TabStop = False
gr.MoveActiveOnFocus = True
gr.Col = -1
gr.Row = 0
gr.TypeTextShadow = False
gr.TypeTextShadowIn = False
gr.FontName = “arial”
gr.FontSize = 9
gr.FontBold = False
gr.RowHeight(0) = 255 * 1.3
gr.TypeHAlign = TypeHAlignLeft
gr.TypeVAlign = TypeVAlignCenter
gr.Row = -1
gr.FontName = “arial”
gr.FontSize = 9
gr.FontBold = False
gr.RowHeight(-1) = 255 * 1.3
gr.Text = “”
gr.Col = 1
gr.Row = -1
gr.CellType = CellTypeEdit
gr.TypeHAlign = TypeHAlignLeft
gr.TypeVAlign = TypeVAlignCenter
gr.Lock = True
gr.Row = 1
gr.Text = " Name"
gr.Row = 2
gr.Text = " Password"
gr.Row = 3
gr.Text = " Server"
gr.Row = 4
gr.Text = " Port"
gr.Row = 5
gr.Text = " Database"
gr.Row = 6
gr.Text = " Backup directory"
gr.Row = 7
gr.Text = " Backup file to be restored"
gr.Col = 2
gr.Row = -1
gr.CellType = CellTypeEdit
gr.TypeHAlign = TypeHAlignLeft
gr.TypeVAlign = TypeVAlignCenter
gr.SetActiveCell 2, 6
gr.EditModeReplace = True
End Sub