PDA

View Full Version : معادل AutoRedraw در سی شارپ چیست؟



Mousavmousab
چهارشنبه 15 آبان 1392, 23:29 عصر
سلام
معادل AutoRedraw در سی شارپ چیست؟

یادم می آد توی وی بی 6 که قدیما کار می کردیم فرم یک ویژگی به نام AutoRedraw داشت که به طور پیش فرض False بود. در این صورت وقتی روی فرم چیزی print یا Draw می کردی اگه Minimize می کردی اون متن یا شکل پاک می شد (خد به خود) ولی وقتی این ویژگی را به True تبدیل می کردی. دیگه پاک نمی شد.
الان می خوام بدونم وقتی توی سی شارپ روی panel متنی ، چیزی را ترسیم می کنیم. برای اینکه وقتی مینی مایز می کنیم فرم را ، اون شکل یا متن به طور خودکار پاک نشه باید چیکار کنیم؟

مهرداد صفا
پنج شنبه 16 آبان 1392, 14:26 عصر
با سلام.


In Visual Basic 6.0, graphics methods can be called from any event procedure; the AutoRedraw property is used to persist graphics when graphics methods are called from an event other than the Paint event.
In Visual Basic 2008, graphics methods should only be called from the Paint event procedure, or in the case of some owner-drawn controls, from the various Draw event procedures (DrawItem, DrawSubItem, etc.). The AutoRedraw property is no longer supported and is not necessary because the Paint and Draw events automatically persist graphics.
موفق باشید.