Создание приложений ОС Windows средствами Visual Basic


Описание - часть 3


/p>

'Поместить настройки в реестр

Private Sub Form_Load()

Me.Move GetSetting("MyApp", "FormSettings", "Left", 0), _

GetSetting("MyApp", "FormSettings", "Top", 0), _

GetSetting("MyApp", "FormSettings", "Width", 5000), _

GetSetting("MyApp", "FormSettings", "Height", 4000)

Me.Text1.Text = GetSetting("MyApp", "FormSettings", "txtValue")

End Sub

'Использовать настройки из реестра для сохранения свойств

'выгружаемой формы

Private Sub Form_Unload(Cancel As Integer)

SaveSetting "MyApp", "FormSettings", "Left", Me.Left

SaveSetting "MyApp", "FormSettings", "Top", Me.Top

SaveSetting "MyApp", "FormSettings", "Width", Me.Width

SaveSetting "MyApp", "FormSettings", "Height", Me.Height

SaveSetting "MyApp", "FormSettings", "txtValue", Me.Text1.Text

End Sub





Начало  Назад  Вперед



Книжный магазин