Etwas auf einer halbdurchsichtigen Form ausschneiden und weiter verwenden

  • VB.NET

Es gibt 54 Antworten in diesem Thema. Der letzte Beitrag () ist von ThuCommix.

    Ich würde es so machen:

    Du machst mit Graphics.CopyFromScreen einen kompletten Screenshot (Wie das geht ist hier im Forum beschrieben) und speicherst das Original in einer Variable.
    Dann Machst du eine Kopie der Variable und hellst die Kopie auf. Danach: BackgroundImage = DeineVariable

    Beim Selektieren (also bein Ziehen der Maus) muss dann immer das Originalbild an der Richtigen Stelle über das Aufgehellte Bild gezeichnet werden und Koordinaten und Größe des Rechtsecks gespeichert werden.

    Dann kannst du das ausgewählte Bild speichern.


    ---- TimoS ----
    Ja, ja... Ich mach ja schon...
    Alles Bullshit.
    Bild zeichnen, Transparente Farbe drüber, Ausschnitt ins Selected-Rectange zeichnen.
    Opacity is hier fehl am Platz.
    Ich mache genau das grade für mich privat, weil das Snipping Tool scheisse ist.

    Übrigens: Dein wv. Projekt ist das jetzt? Aber vergiss es. Du hört ja eh nicht auf uns.
    "Life isn't about winning the race. Life is about finishing the race and how many people we can help finish the race." ~Marc Mero

    Nun bin ich also auch soweit: Keine VB-Fragen per PM! Es gibt hier ein Forum, verdammt!
    Nein. Du wolltest irgendeinen Scheiss mit BackgroundImage machen.
    Von Transparenten Brushes oder co war bei dir nie die Rede.
    "Life isn't about winning the race. Life is about finishing the race and how many people we can help finish the race." ~Marc Mero

    Nun bin ich also auch soweit: Keine VB-Fragen per PM! Es gibt hier ein Forum, verdammt!
    Ich frage das ganze ab und setze die Eckkoordinaten in eigene Variablen dementsprechend neu @faxe1008:

    Grüße
    "Life isn't about winning the race. Life is about finishing the race and how many people we can help finish the race." ~Marc Mero

    Nun bin ich also auch soweit: Keine VB-Fragen per PM! Es gibt hier ein Forum, verdammt!
    @Nikx: Sorry hab grade mal eine Phase der Begriffsstuzigkeit. Habe es mal so probiert:

    VB.NET-Quellcode

    1. ''normalfall des Rectangle.x < Pt.x und y
    2. cut_rect.Width = Pt.X - cut_rect.X
    3. cut_rect.Height = Pt.Y - cut_rect.Y
    4. ''Ausnahme abfangen
    5. If Pt.X < cut_rect.X OrElse Pt.Y < cut_rect.Y Then
    6. cut_rect.Width = -1 * (Pt.X - cut_rect.X)
    7. cut_rect.Height = -1 * (Pt.Y - cut_rect.Y)
    8. cut_rect.X = Pt.X
    9. cut_rect.Y = Pt.Y
    10. End If


    Wär nett wenn du mir mal kurz auf die Sprünge hilfst.

    8-) faxe1008 8-)
    @nafets3646:
    Funktioniert leider nicht wie gewollt:

    VB.NET-Quellcode

    1. If Pt.X < cut_rect.X OrElse Pt.Y < cut_rect.Y Then
    2. cut_rect.X = Pt.X
    3. cut_rect.Y = Pt.Y
    4. cut_rect.Width = Math.Abs(cut_rect.Width)
    5. cut_rect.Height = Math.Abs(cut_rect.Height)
    6. End If

    8-) faxe1008 8-)
    Melde dich mal per PN. Es wär Schwachsinn, das hier auszudiskutieren. @faxe1008:

    Grüße
    "Life isn't about winning the race. Life is about finishing the race and how many people we can help finish the race." ~Marc Mero

    Nun bin ich also auch soweit: Keine VB-Fragen per PM! Es gibt hier ein Forum, verdammt!
    Klar aber dadurch kommt es zu Verschiebungen. Nichts desto trotz hier meine Lösung des Problems:

    VB.NET-Quellcode

    1. cut_rect.Width = Pt.X - cut_rect.X
    2. cut_rect.Height = Pt.Y - cut_rect.Y
    3. If Pt.X < cut_rect.X And Pt.Y < cut_rect.Y Then
    4. cut_rect.X = Pt.X
    5. cut_rect.Y = Pt.Y
    6. cut_rect.Width = Math.Abs(cut_rect.Width)
    7. cut_rect.Height = Math.Abs(cut_rect.Height)
    8. End If
    9. If Pt.X > cut_rect.X And Pt.Y < cut_rect.Y Then
    10. cut_rect.Y = Pt.Y
    11. cut_rect.Width = Math.Abs(cut_rect.Width)
    12. cut_rect.Height = Math.Abs(cut_rect.Height)
    13. End If
    14. If Pt.X < cut_rect.X And Pt.Y > cut_rect.Y Then
    15. cut_rect.Width = Math.Abs(cut_rect.Width)
    16. cut_rect.Height = Math.Abs(cut_rect.Height)
    17. cut_rect.X = cut_rect.X - cut_rect.Width
    18. cut_rect.Y = cut_rect.Y
    19. End If


    @ThuCommix: (Wollte keinen neuen Post) Man muss sehr wohl was daran ändern, austauschen reicht nicht. Hier der Beweis:

    8-) faxe1008 8-)

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „faxe1008“ ()