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
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.