jamal2080 قام بنشر سبتمبر 16, 2023 قام بنشر سبتمبر 16, 2023 (معدل) Dim frm As Form Dim intScreenWidth As Integer Dim intScreenHeight As Integer Dim intFormWidth As Integer Dim intFormHeight As Integer Dim intLeft As Integer Dim intTop As Integer ' احضار مرجع للنموذج الحالي Set frm = Screen.ActiveForm ' الحصول على عرض الشاشة وارتفاعها intScreenWidth = Screen.Width / Screen.twipsPerPixelX intScreenHeight = Screen.Height / Screen.TwipsPerPixelY ' الحصول على عرض وارتفاع النموذج intFormWidth = frm.Width / frm.ScaleX intFormHeight = frm.Height / frm.ScaleY ' حساب الموضع الأفقي المتوسط intLeft = (intScreenWidth - intFormWidth) / 2 ' حساب الموضع الرأسي المتوسط intTop = (intScreenHeight - intFormHeight) / 2 ' تعيين الموضع الجديد للنموذج frm.Move intLeft * frm.ScaleX, intTop * frm.ScaleY تم تعديل سبتمبر 16, 2023 بواسطه jamal2080 للون خظ 1
UserUser2 قام بنشر سبتمبر 20, 2023 قام بنشر سبتمبر 20, 2023 في 16/9/2023 at 15:32, jamal2080 said: Dim frm As Form Dim intScreenWidth As Integer Dim intScreenHeight As Integer Dim intFormWidth As Integer Dim intFormHeight As Integer Dim intLeft As Integer Dim intTop As Integer ' احضار مرجع للنموذج الحالي Set frm = Screen.ActiveForm ' الحصول على عرض الشاشة وارتفاعها intScreenWidth = Screen.Width / Screen.twipsPerPixelX intScreenHeight = Screen.Height / Screen.TwipsPerPixelY ' الحصول على عرض وارتفاع النموذج intFormWidth = frm.Width / frm.ScaleX intFormHeight = frm.Height / frm.ScaleY ' حساب الموضع الأفقي المتوسط intLeft = (intScreenWidth - intFormWidth) / 2 ' حساب الموضع الرأسي المتوسط intTop = (intScreenHeight - intFormHeight) / 2 ' تعيين الموضع الجديد للنموذج frm.Move intLeft * frm.ScaleX, intTop * frm.ScaleY من فضلك لو وقتك يسمح تعمل لنا مثال 1
الردود الموصى بها
انشئ حساب جديد او قم بتسجيل دخولك لتتمكن من اضافه تعليق جديد
يجب ان تكون عضوا لدينا لتتمكن من التعليق
انشئ حساب جديد
سجل حسابك الجديد لدينا في الموقع بمنتهي السهوله .
سجل حساب جديدتسجيل دخول
هل تمتلك حساب بالفعل ؟ سجل دخولك من هنا.
سجل دخولك الان