المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : هـــل من الممكن جعل Dialog.Inputلا يقيل الا ارقام فقط ؟


ياسرهتهت
18-07-2017, 11:57 PM
بسم الله الرحمن الرحيم

هـــل من الممكن جعل Dialog.Input لا يقيل الا ارقام فقط ؟

https://b.top4top.net/p_564v8gjx1.png

والتحكم في عدد الارقام

موفق بإذن الله ... لك مني أجمل تحية .

عبد الهادي بهاب
19-07-2017, 12:11 PM
بسم الله الرحمن الرحيم

هـــل من الممكن جعل Dialog.Input لا يقيل الا ارقام فقط ؟

https://b.top4top.net/p_564v8gjx1.png

والتحكم في عدد الارقام

موفق بإذن الله ... لك مني أجمل تحية .

لا تستعمل Dialog.Input بل استعمل Dialog.MaskedInput و حدد عدد الارقام او وضعها باستعمال #

مثال

result = Dialog.MaskedInput("Enter Data", "Your number:", "#######################", "", MB_ICONQUESTION, " ");

ياسرهتهت
19-07-2017, 12:31 PM
لا تستعمل Dialog.Input بل استعمل Dialog.MaskedInput و حدد عدد الارقام او وضعها باستعمال #

مثال

result = Dialog.MaskedInput("Enter Data", "Your number:", "#######################", "", MB_ICONQUESTION, " ");


==========
بسم الله الرحمن الرحيم
شكرا لك استاذ عبد الهادي
وبارك الله فيك
:abc_152::abc_152:

ثامر أبو بلقيس
19-07-2017, 12:36 PM
لا تستعمل Dialog.Input بل استعمل Dialog.MaskedInput و حدد عدد الارقام او وضعها باستعمال #

مثال

result = Dialog.MaskedInput("Enter Data", "Your number:", "#######################", "", MB_ICONQUESTION, " ");


- حل ممتـــــاز لكن كيف سأستعلم عن القيمة result
- وكيف أجعل العكس أي Dialog.MaskedInput يقبل حروفا لا أرقاما

مجرد تساؤل ?

عبد الهادي بهاب
19-07-2017, 01:29 PM
- حل ممتـــــاز لكن كيف سأستعلم عن القيمة result
- وكيف أجعل العكس أي Dialog.MaskedInput يقبل حروفا لا أرقاما

مجرد تساؤل ?


بحدف علامة # سيقبل كل شيء

result = Dialog.MaskedInput("Enter Data", "Your number:", "", "", MB_ICONQUESTION, " ");

ثامر أبو بلقيس
19-07-2017, 01:53 PM
بحدف علامة # سيقبل كل شيء

result = Dialog.MaskedInput("Enter Data", "Your number:", "", "", MB_ICONQUESTION, " ");


من المؤكــــد ذلك :abc_139:
الجواب متوفر في الردود

عبد الهادي بهاب
19-07-2017, 02:23 PM
- حل ممتـــــاز لكن كيف سأستعلم عن القيمة result
- وكيف أجعل العكس أي Dialog.MaskedInput يقبل حروفا لا أرقاما

مجرد تساؤل ?

اذا استبدلنا علامة # بعلامة ? فانه لا يقبل الا الحروف

Input Mask:
The input mask you want to use to control the data the user inputs into the object. Input masks let you pre-format the user's response a bit with "guide" characters, and help prevent errors by performing keystroke validation. You can click the select button to display a list of sample input masks.

One of the sample input masks available is a telephone number. It appears in the list as (###) ###-####.
The "#" character in the input mask is a special digit placeholder (0-9). For every # in the input mask, the user will only be able to enter a digit between 0 and 9. At runtime, the user will only be able to enter 10 numeric characters and will appear as a formatted telephone number such as (204) 946-0263.

You can also include alphabetic characters in an input mask. For example, one of the sample input masks is ?#? #?# used to represent a Canadian postal code. The "?" character in the input mask is a special alphabetic placeholder (a-Z). For every ? in the input mask, the user will only be able to enter a letter from a to Z. For example, R3B 0R3 is one valid postal code that the user could enter. The mask would prevent the user from entering two sequential alphabetic characters or numbers.