# Native Code > برنامه نویسی در 6 VB >  کنترل فرم

## بابک زواری

با کمک این کنترل میتونید کارهای جالبی رو با فرم انجام بدید

AppName&#58; Type here the name of your application. This property will be used to store in the registry the information about the last position and state of the form, and is only necessary if you set to True the RecordWindowPos property. The information will be saved under HKCU/Software/AppName/FormName. 
BackgroundType&#58; None &#40;0&#41;, Gradient &#40;1&#41;, &#91;Picture Centered&#93; &#40;2&#41; or &#91;Picture Tiled&#93; &#40;3&#41;. 
DontShowMaximizedAtStartup&#58; if you set this property to True, the form will not be shown maximized even if last time it was maximized when it was unloaded. 
Flash&#58; True or False, set it to True if you want the form to flash. 
FlashRate&#58; How many times per second you want the form to flash. 
GradientEndColor&#58; If BackgroundType is Gradient, this color will be used as the ending color for the gradient shown in the background of your form. 
GradientIniColor&#58; If BackgroundType is Gradient, this color will be used as the initial color for the gradient shown in the background of your form. 
GradientOrientation&#58; &#91;Up Down&#93; &#40;0&#41;, &#91;Left Right&#93; &#40;1&#41;, &#91;Down Up&#93; &#40;2&#41; or &#91;Right Left&#93; &#40;3&#41;. If BackgroundType is Gradient, use this property to set the orientation that you want the gradient in the background to have. 
GradientTitle&#58; True or False. Setting this to True will make the control display a gradient in the title bar of the form. This could give some problems in Windows NT, like changing the font used in the form. 
INIFile&#58; Put here the full path to a file in which information about the size and position of the form will be saved. If you set this property at run-time &#40;like in the Form_Load event&#41;, make sure that the RecordWindowPos property is True and that the RecordWindowPosTo is set to &#91;INI File&#93; &#40;1&#41; before hand. 
IniPosLeft&#58; Initial left positition of the form if it's the first time it's shown and there is previous information. 
IniPostTop&#58; Initial top positition of the form if it's the first time it's shown and there is previous information. 
LoadWindowInScreen&#58; If last time the form was unloaded part of the form was not visible because it was out of the limits of the screen, setting this property to True will make sure the form is completely visible next time the form is loaded. 
MaxHeight&#58; Maximum height that you want the form to have, given in twips. Set it to 0 if you want this property to be ignored. 
MaxWidth&#58; Maximum width that you want the form to have, given in twips. Set it to 0 if you want this property to be ignored. 
MinHeight&#58; Minimum height that you want the form to have, given in twips. Set it to 0 if you want this property to be ignored. 
MinWidth&#58; Minimum width that you want the form to have, given in twips. Set it to 0 if you want this property to be ignored. 
MouseClipped&#58; When set to True, the cursor movement will be restricted to the area of the form. Additionally, the user will not be able to resize or move the form in any case. This property can only be set at run-time. 
OnTop&#58; True or False, set it to True if you want the form to stay on top of all the other forms. 
Picture&#58; This will be the pictured used in the background if BackgroundType is set to &#91;Picture Centered&#93; or &#91;Picture Tiled&#93;. 
RecordWindowPos&#58; Set this property to True if you want the form to remember the last position and state of the form in which it is placed. You will also have to set the AppName property. If the form was closed being in minimized state, next time the form loads the control will put it in restored state, using last size and position saved. I assume it is not practical loading a form in minimized state &#40;at least not in my programs&#41;, so if you need this because any strange reasons, you will not be able to do it using this control. Note&#58; Please, make sure that the StartUpPosition property of the form is set to Manual or to WindowsDefault. 
RecordWindowPosTo&#58; Registry &#40;0&#41; or &#91;INI File&#93; &#40;1&#41;. This tells the control where the information about the form size and position should be saved. 
ResizeContents&#58; True or False. When set to True, controls contained in the form will be resized the form changes of size. The system used to do this is very simple, and doesn't support fonts. 
Methods&#58; 

Refresh&#58; This refreshes the background of the form. You will have to use it if you change background options at run-time. 
RemoveCloseButton&#58; This method disables the close button of the form. 
Events&#58; 

Resize &#40;WidthChange As Single, HeightChange As Single&#41;&#58; You can use this event to resize other controls contained in the form. The special features of this event are that it will provide you the vertical and horizontal changes &#40;given in twips&#41; since the last time this event was fired, and that it will not be fired when the form is minimized.

----------


## Roza_tsc

این کنترل کجاست؟؟ از این متن چطوری باید استفاده کرد؟؟

----------


## Roza_tsc

ممنون پیداش کردم :wink:  :D

----------


## حامد مصافی

سلام
من قبلاٌ از این کنترل استفاده کردم و بهتون توصیه می کنم ازش استفاده نکنین!!!
چون یک سری مشکلات واسه برنامه خصوصاٌ هنگام لود و آنلود ایجاد میکنه حتی گاهی اوقات برنامه به درستی آنلود نمیشه :D

----------


## بابک زواری

منم استفاده کردم و اگر درست تنظیم بشه هیچ مشکلی پیش نمیاد

----------


## حامد مصافی

تا حالا پیش نیومده برنامه موقع بسته شدن خطا بده؟؟

----------


## Morteza Manafpour

:flower:   :تشویق:

----------


## M-Gheibi

:flower:

----------


## R_BABAZADEH

:flower:   :تشویق:   :flower:

----------


## Ariyan

ممنون عالی بود .

----------


## ehsan.pn2

اگه می شه طریقه به کار بردن  active x رو هم در برنامه های مختلف توضیح بدین ؟؟؟  :گیج:   :flower:

----------


## بابک زواری

دوست عزیز سوالات خودتون رو به طور مجزا مطرح کنید 
لطفا قبل از فعالیت در این بخش به قوانین مربوطه مراجعه کنید

----------


## kia_programmer

مرسی آقای کد نویس
 :flower:  :flower:   :تشویق:   :تشویق:   :flower:  :flower:

----------


## بابک زواری



----------

