📄 temp.vb
字号:
Public Class temp
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'creat a new Configinfo object...
Dim Config As New ConfigInfo()
'copy the values from the form into the configinfo...
PopulateConfigFromForm(Config)
'save the configinfo
Dim filename As String = DataFilename
Config.Save(filename)
'tell the user...
MsgBox("The configinfo was saved to" & filename)
End Sub
'DataFilename -where should we store our data?
Public ReadOnly Property DataFilename() As String
Get
'get our working folder...
Dim folder As String
folder = Environment.CurrentDirectory
'return the folder with the name "Config.xml"..
Return folder & "\Config.xml"
End Get
End Property
'populateConfigfromForm -populates Config from the form fileds...
Public Sub PopulateConfigFromForm(ByVal config As ConfigInfo)
''copy the values
'config.MainAlawyRefresh = True
'config.MainOpacity = 0.6
''config.Height = 1000
''config.IsMinStart = True
'config.IsResize = True
'config.MainRefreshTime = 60
'config.NotifyAlawyRefresh = True
'config.NotifyRefreshTime = 60
''config.PopupOpacity = 0.6
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'load the config using a shared method on SerializableData...
Dim newConfig As ConfigInfo = SerializableData.load(DataFilename, GetType(ConfigInfo))
'update the display...
PopulateFormFromConfig(newConfig)
End Sub
'PopulateFormFromConfig -populates the form from an Config object...
Public Sub PopulateFormFromConfig(ByVal config As ConfigInfo)
'copy the values...
TextBox1.Text = config.MainAlawyRefresh
TextBox3.Text = config.MainOpacity
'TextBox4.Text = config.Height
End Sub
Private Sub temp_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'PictureBox1.ImageLocation = Environment.CurrentDirectory & "\Images\ICO\" & "A" & ".ICO"
'PictureBox1.Image = Web
'SetStyle(ControlStyles.SupportsTransparentBackColor, True)
'Me.SetStyle(ControlStyles.SupportsTransparentBackColor, True)
Panel1.BackColor = Color.Transparent
WebBrowser1.Navigate("http://quote.jrj.com.cn/htmdata/price_ggda2.asp?code=600050")
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
PictureBox1.ImageLocation = Environment.CurrentDirectory & "\Images\ICO\" & ComboBox1.Text & ".ICO"
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -