Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Rechnen mit Koordinaten (z.B. von Rectangle)

Empfohlene Antworten

Veröffentlicht

Hallo!

Ich möchte, dass der Computer zu den Koordinaten eines Rechtecks jeweils den angegebenen Wert hinzuzählt.

Gedacht hätte ich mir das folgendermaßen(Fantasiecode!):

erstesRechteckt (10, 10, 100, 100)

weiteresRechtecke (erstesRechteck.X + 105, erstesRechteckt.Y + 105, 100, 100)

Wie setze ich das am besten um?

Eine Datentyp umwandlung habe ich jetzt nicht mit aufgeschrieben, ich hatte jedoch im Programm versucht, die Daten in Integer umzuwandeln, allerdings lässt der Compiler dies anscheinend nicht zu.

Ich bin für jeden Lösungsansatz dankbar,

Viele Grüße,

Basti

Hoppla ich bin doof.

Hat sich von selbst erledigt, tut mir leid, einfach ignorieren!

EDIT:

Ich habe allerdings ein anderes Problem und zwar möchte ich nun noch ein wenig weiter rechnen, also so z.B.:

Dim nextRect As New System.Drawing.Rectangle(firstRect.X + cdbl(50 + cdbl(TextBox1.Text), firstRect.Y, firstRect.Width, firstRect.Height)

Ich soll allerdings mit der Option Strict On programmieren.

Diese lässt obiges Beispiel allerdings nicht zu.

Wie kann ich es also schreiben, so dass es auch für die option strict okay ist?

grüße!

EDIT:

Und schon wieder war ich doof, ich habs nun mit CType gelöst und in Integer statt in double konvertieren lassen.

Merke: Erst denken, dann posten.

Tut mir leid!

Bearbeitet von Bastiman

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.