ok, sono riuscito a capire come agire su una singola picture.. grazie a questo documento:
http://www.acthompson.net/DotNet/ControlArrays.htm
che riporto in parte:
Ora posso agire sulle singole picture.. ma mi ritrovo con il solito problema, come disegnare del testo sopra la picture senza cancellare ciò che già ci avevo disegnato sopra?codice:[...] The array will be declared at the top of the class declaration after the controls on the form are declared. The statement will look something like: Public Class Form1 Inherits System.Windows.Forms.Form Dim ships(4) As PictureBox Now that your picture boxes have been created and an array has been declared to hold references to them they must be copied into the array. This is done using a set of assignment statements in the class constructor after the call to the InitializeComponent method like the example below. InitializeComponent() ships(0) = PictureBox1 ships(1) = PictureBox2 ships(2) = PictureBox3 ships(3) = PictureBox4 This will allow you to move these objects using a loop. These objects can be moved by changing the location property of the object. A new point is determined and assigned to the location property of the object. This code might look something like the following: Dim i As Int16 Dim newPoint As Point For i = 0 To 3 newPoint.Y = ships(i).Location.Y + 5 If newPoint.Y > 200 Then newPoint.Y = 0 newPoint.X = ships(i).Location.X ships(i).Location = newPoint Next [...]
Il problema è che nell'esempio che mi hai fatto sopra (PB_Paint) utilizzi "e.Graphics.DrawString" e so che "e As System.Windows.Forms.PaintEventArgs" quindi per risolvere a me basterebbe anche richiamare solo PB_Paint ma non so che valore passargli perchè non so "e" che cosa sia.. nel senso che non saprei come richiamarla..
Call PB_Paint(????)

Rispondi quotando