Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
Color.FromArgb(128,0,255,0)
me.list.Add
list.Add
public Form1()
{
InitializeComponent();
this.list = new List<Point>(); //Liste für Koordinaten instanziieren
this.bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height);
pictureBox1.Image = bmp;
}
public partial class Form1 : Form
{
this.list = new List<Point>(); //Liste für Koordinaten instanziieren
this.bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height);
public Form1()
{
...
public partial class Form1 : Form
{
this.list = new List<Point>();
this.bmp = new Bitmap(1,1); //(1,1), weil (,) nicht funktioniert
public Form1()
{
bmp.width = picturebox1.width;
bmp.height = picturebox1.height;
...
public Form1()
{
...
}
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
...
End Sub
public Form1()
{
InitializeComponent();
...
Nein, das was das ist, ist der Konstruktor. Dort wird nur der Speicher für das Bitmap und die Liste angefordert.Hmm, ja, sie müssen ja global sein, wenn man sie aus ner anderen Subroutine auch ansprechen kann.
Beide werden ja hier deklariert:
Code:public Form1() { InitializeComponent(); this.list = new List<Point>(); //Liste für Koordinaten instanziieren this.bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height); pictureBox1.Image = bmp; }
private bool mouseDown; //ob Maustaste gedrückt wird (zur Speicherung der Maus koordinaten)
private readonly List<Point> list; //Mauskoordinaten
private readonly Bitmap bmp; //Bitmap zum speichern des gezeichneten
}
Du liegst falsch.ODER:
Ich liege komplett falsch mit der Annahme, dass
aus C# identisch ist mitCode:public Form1() { ... }
Code:Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ... End Sub
public Form1()
Private Sub Form1_Load
Starte ein neues VB Projekt als Windows Application. Dann müsstest du dort ein erstes Formular Names Form1 sehen. Schaut dir denn dort generierten Code anIn dem Fall bräuchte ich eine Möglichkeit in VB, erst die Form mit allen Steuerelementen zu laden, und anschließend die Bitmap zu erstellen.
Public Class Form1
End Class
Public Class Form1
Sub New()
InitializeComponent()
'Hier z.B. die Variablen eintragen
End Sub
End Class