タイトル | : Re^4: フォーム上をダブルクリック・・・ |
記事No | : 1208 |
投稿日 | : 2004/12/07(Tue) 13:35 |
投稿者 | : さち。 |
[OSのVer]:Windows [VBのVer]:VB.NET 花さん、るしぇさん、java.lang.Nullpoさんありがとうございました 以下コードをのせています(念のため全部載せてます。長くてうっとーしーでしょうし 恥ずかしいコードなので後で消しときますね。) がご指摘頂いた事に関してはクリアしているようです。 (日本語化がうまくいかず日本語部分が?になってます、これも問題なんですが(^_^;)・・・)
Imports System Imports System.Xml Imports System.Drawing Imports System.Windows.Forms
Namespace DefaultNamespace Public Class Form1 Inherits System.Windows.Forms.Form Private label1 As System.Windows.Forms.Label Private textBox1 As System.Windows.Forms.TextBox Private textBox2 As System.Windows.Forms.TextBox Public Sub New() MyBase.New ' ' The Me.InitializeComponent call is required for Windows Forms designer support. ' Me.InitializeComponent ' ' TODO : Add constructor code after InitializeComponents ' End Sub #Region " Windows Forms Designer generated code " ' This method is required for Windows Forms designer support. ' Do not change the method contents inside the source code editor. The Forms designer might ' not be able to load this method if it was changed manually. Private Sub InitializeComponent() Me.textBox2 = New System.Windows.Forms.TextBox Me.textBox1 = New System.Windows.Forms.TextBox Me.label1 = New System.Windows.Forms.Label Me.SuspendLayout ' 'textBox2 ' Me.textBox2.BackColor = System.Drawing.SystemColors.InactiveCaption Me.textBox2.Location = New System.Drawing.Point(32, 104) Me.textBox2.Multiline = true Me.textBox2.Name = "textBox2" Me.textBox2.Size = New System.Drawing.Size(440, 40) Me.textBox2.TabIndex = 2 Me.textBox2.Text = "textBox2" ' 'textBox1 ' Me.textBox1.BackColor = System.Drawing.SystemColors.InactiveCaption Me.textBox1.Location = New System.Drawing.Point(32, 48) Me.textBox1.Multiline = true Me.textBox1.Name = "textBox1" Me.textBox1.Size = New System.Drawing.Size(440, 40) Me.textBox1.TabIndex = 1 Me.textBox1.Text = "textBox1" ' 'label1 ' Me.label1.ForeColor = System.Drawing.SystemColors.ControlLightLight Me.label1.Location = New System.Drawing.Point(32, 24) Me.label1.Name = "label1" Me.label1.Size = New System.Drawing.Size(152, 23) Me.label1.TabIndex = 0 Me.label1.Text = "label1" ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12) Me.BackColor = System.Drawing.SystemColors.Desktop Me.ClientSize = New System.Drawing.Size(504, 158) Me.Controls.Add(Me.textBox2) Me.Controls.Add(Me.textBox1) Me.Controls.Add(Me.label1) Me.Name = "Form1" Me.Text = "Form1" AddHandler Load, AddressOf Me.Form1Load Me.ResumeLayout(false) End Sub #End Region Private Sub Form1Load(sender As System.Object, e As System.EventArgs) label1.Text = System.DateTime.Now.ToString("yyyy/MM/dd dddd") Dim doc2 as XmlDocument = new XmlDocument() doc2.Load("sorcefiles/eve.xml") Dim domdata2 as XmlNodeList Dim tod As String tod = "a" + System.DateTime.today.ToString("MM/dd") domdata2 = doc2.GetElementsByTagName(tod) textBox1.Text = System.DateTime.today.ToString("MM?dd?") + "??????: & quot; If domdata2.Count > 0 Then Dim i As Integer for i = 0 To domdata2.Count-1 textBox1.Text + = domdata2(i).InnerText + "?" Next End If '?? Dim doc3 as XmlDocument = new XmlDocument() doc3.Load("sorcefiles/his.xml") Dim domdata3 as XmlNodeList domdata3 = doc3.GetElementsByTagName(tod) textBox2.Text = System.DateTime.today.ToString("MM?dd?") + "????? ??: " If domdata3.Count > 0 Then Dim i As Integer for i = 0 To domdata3.Count-1 textBox2.Text + = domdata3(i).InnerText + "?" Next End If End Sub End Class End Namespace
|