Đang chuẩn bị liên kết để tải về tài liệu:
Programming Microsoft Windows with C# phần 7

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Visual Studio NET 2003 bao gồm một trang pageLayout bất động sản, cho phép định vị chính xác của điều khiển máy chủ, khi tài sản pageLayout được thiết lập để GridLayout. Visual Studio và ASP.NET 2.0 và sau đó không có một tài sản pageLayout trên các tài liệu mẫu web, nhưng có một khả năng tương tự như trong các thiết kế HTML. | public DialogsWithRegistryO Text Font and Color Dialogs with Registry RegistryKey regkey Registry.CurrentUser.OpenSubKey strRegKey if regkey null Font new Font string regkey.GetValue strFontFace float.Parse string regkey.GetValue strFontSize Fontstyle regkey.GetValue strFontStyle ForeColor Color.FromArgb int regkey.GetValue strForeColor BackColor Color.FromArgb int regkey.GetValue strBackColor int aiColors new intfis for int i 0 i IS i aiColorsfi int regkey.GetValue strCustomClr i clrdlg.CustomColors aiColors regkey.Close protected override void OnClosed EventArgs ea RegistryKey regkey Registry.CurrentUser.OpenSubKey strRegKey true if regkey null regkey Registry.CurrentUser.CreateSubKey strRegKey regkey.SetValue strFontFace Font.Name regkey.SetValue strFontSize Font.SizelnPoints.ToStringO regkey.SetValue strFontStyle int Font.style regkey.SetValue strForeColor ForeColor.ToArgbO regkey.SetValue strBackColor BackColor.ToArgbO for int i 0 i IS i regkey.SetValue strCustomClr i clrdlg.CustomColorsfi regkey.close Let s look at the override of the OnClosed method first. OnClosed is called when the form has been closed. That s a good time for the program to write information to the registry. If the OpenSubKey call returns null the program must be running for the first time so it calls CreateSubKey to create the registry key. Each Setvalue call stores either an integer or a string in the registry. For the form s Font property three values must be stored the Name SizelnPoints and Style properties. The SizelnPoints property of Font is a float so that value is converted to a string representation with ToString. The ToArgb method of the Color class converts Color objects into integers. Also take note of the Setvalue call in the for loop that s used to store the custom colors. The value name is strCustomClr i which creates names of CustomColorO CustomColorl through CustomColor15. The values are loaded from the registry in the program s constructor. The form s font is re-created

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.