Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub DrawScreen()
- 'Call g.DrawImage to draw whatever you want in here
- Dim layers(Me.ListBox1.Items.Count) As PictureBox
- For i = 0 To ListBox1.Items.Count - 1
- 'Create New Layer as picturebox
- layers(i) = New PictureBox
- layers(i).Parent = Me.picWatch
- layers(i).BackColor = Color.Transparent
- layers(i).Visible = True
- Select Case ListBox1.Items(i)
- Case "image"
- 'Debug.Print(ListofLayers(i).Full_Path)
- layers(i).Image = Image.FromFile(ListofLayers(i).Full_Path)
- layers(i).Top = ListofLayers(i).X
- picWatch.Controls.Add(layers(i))
- Case "shape"
- 'Dim g As Graphics
- 'g.DrawRectangle()
- Case "text"
- Dim g As Graphics = layers(i).CreateGraphics
- g.DrawString(ListofLayers(i).Text, New Font("Arial", 12), Brushes.White, ListofLayers(i).X, ListofLayers(i).Y)
- Case Else
- Debug.Print(ListBox1.Items(i))
- End Select
- Next
- Me.Refresh()
- End Sub
- Me.Controls.Add(layers(i))
- layers(i).Top = ListofLayers(i).X
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement