29-05-21, 02:20 PM
هذا كود لمشروع يتألف من فورم1 FORM1 فيه داتا جريد فيو اسمها DGV
وهناك كودين لجعل العمود 1 والعمود2 لا يقبلان الا الارقام والفاصلة فقط
وهناك كودين لجعل العمود 1 والعمود2 لا يقبلان الا الارقام والفاصلة فقط
PHP كود :
Public Class Form1
Dim column_index As Integer = 0
Private Sub DGV_EditingControlShowing(ByVal sender As Object, ByVal e As System.Windows.Forms
.DataGridViewEditingControlShowingEventArgs)
Handles DGV.EditingControlShowing
Dim j As Integer = DGV.CurrentCell.ColumnIndex
If j = 1 Or j = 2 Then
column_index = DGV.CurrentCell().ColumnIndex
Dim TextEdit As TextBox = e.Control
RemoveHandler TextEdit.KeyPress, AddressOf TextBox_KeyPress_Number
AddHandler TextEdit.KeyPress, AddressOf TextBox_KeyPress_Number
End If
End Sub
Public Sub TextBox_KeyPress_Number(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)
Dim j As Integer = DGV.CurrentCell.ColumnIndex
If j = 1 Or j = 2 Then
Select Case column_index = 0
Case 0
If(e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> ControlChars.Back AndAlso e.KeyChar<> "." AndAlso e.KeyChar<> ","Then
e.Handled = True
End If
End Select
End If
End Sub
End Class
تطبيق للجوال يشبه تطبيق حراج
سورس كود برنامج محاسبة ومبيعات احترافي
سورس كود تطبيق ارسال رصيد من الجوال B4A
سورس كود تطبيق مبيعات للجوال
تيليجرام Abo_anas_kahwaji@
واتساب 00963951283515

