Private Sub Form1_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint For i = 1 To cnt Dim myBrush As New SolidBrush(col) myBrush.Color = Color.FromArgb(200, col) Dim g As Graphics = Me.CreateGraphics g.FillEllipse(myBrush, xp(i) - 5, yp(i) - 5, 10, 10) g.Dispose() Next 'http://hanatyan.sakura.ne.jp/dotnet/zu05.htm End Sub Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown 'kchar = "" k = e.KeyCode.ToString("G") If keys.Contains(k) Then Else keys.Add(k) End If 'kochakoさんのweb(下記)を参考にLISTに代入していきます 'https://seesaawiki.jp/pg-note/d/%ca%a3%bf%f4%a5%ad%a1%bc%b2%a1%b2%bc%be%f5%c2%d6%a4%ce%c8%bd%c4%ea 'https://developer.mozilla.org/en-US/docs/Web/CSS/color_value 'http://rucio.o.oo7.jp/main/dotnet/shokyu/standard21.htm End Sub Private Sub Form1_Keyup(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp k = e.KeyCode.ToString("G") keys.Remove(k) End Sub Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click ini = ini + 1 If ini <= 1 Then 'http://www.nextftp.com/swlabo/m1_vbnet/hp_experiment/exp902.htm Dim img As New Bitmap(Me.Width, Me.Height) Dim g As Graphics = Graphics.FromImage(img) Dim fnt As New Font("IPAmj明朝", 180) '文字列を位置(0,0)、青色で表示 g.DrawString(ChrW(&HD867) & ChrW(&HDE3D) & ChrW(&HDB40) & ChrW(&HDD03), fnt, Brushes.Blue, 0, 0) 'リソースを解放する fnt.Dispose() g.Dispose() '作成した画像を表示する Dim form As Form form = Me form.BackgroundImage = img Else End If ' Dim g As Graphics = Me.CreateGraphics 'http://pckowaza.web.fc2.com/html/vbdotnet_graphics_drawstringtoform_basic.html 'http://bbs.wankuma.com/index.cgi?mode=al2&namber=67412&KLOG=114 'http://dobon.net/vb/dotnet/graphics/drawstring.html 'http://hanatyan.sakura.ne.jp/dotnet/zu05.htm End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Dim sjisEnc As Encoding = Encoding.GetEncoding("Shift_JIS") Dim writer As System.IO.StreamWriter MsgBox(cnt) writer = My.Computer.FileSystem.OpenTextFileWriter("C:\Users\Y2\Desktop\key2.txt", True, sjisEnc) Dim c As Long For c = 1 To cnt writer.WriteLine(m(c) & "," & xp(c) & "," & yp(c) & "," & keysA(c)) Next writer.Close() End Sub Function TakeOut(ByVal list As List(Of String)) As String Dim keyt As String keyt = "" For Each e As String In list keyt = keyt + e Next Return keyt End Function End Class