vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
sevAniGif - als kostenlose Vollversion auf unserer vb@rchiv CD Vol.5  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2024
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Fortgeschrittene
Re: Problem mit Ausgabe in PictureBox 
Autor: Dikn
Datum: 28.03.18 12:03

Vielen, vielen, vielen Dank !!!

Ich habe [Class MeinePictureBox] eingefügt --> ich verstehe nicht warum… aber funktioniert einwandfrei!!!
Aber: Paint-Ereignis funktioniert nicht mehr. Wie kann ich auf das Paint-Ereignis zugreifen?


Private Sub myPb1_Paint _
  (sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles pb1.Paint
 
If out_rect.Width = 0 Then Exit Sub ' nach Load -> Exit Sub
 
Dim pbRectOut As Rectangle     
 
'*** Ausgabe-Rechteck 
' **************************************************************
  pbRectOut.X = CInt((myPb1.Width - out_rect.Width / decZoom) / 2) 
  pbRectOut.Y = CInt((myPb1.Height - out_rect.Height / decZoom) / 2
  pbRectOut.Width = CInt(out_rect.Width / decZoom
  pbRectOut.Height = CInt(out_rect.Height / decZoom
 
  If chbVollbild.Checked = False And HScrollBar1.Value <> 0 Then
    e.Graphics.DrawRectangle(Pens.White, pbRectOut)
  End If
 
'*** Diagonalen 
' ********************************************************************
  If chbDiagonalen.Checked = True And HScrollBar1.Value <> 0 And _
    chbVollbild.Checked = False Then
    Dim PenDiag As Pen = New Pen(Color.White)
    PenDiag.DashStyle = DashStyle.DashDotDot
    Dim pntD(3) As Point
 
    pntD(0).X = CInt((myPb1.Width - bmp_In.Width / decZoom) / 2)
    pntD(0).Y = CInt((myPb1.Height - bmp_In.Height / decZoom) / 2)
    pntD(1).X = CInt(pntD(0).X + bmp_In.Width / decZoom)
    pntD(1).Y = pntD(0).Y
    pntD(2).X = pntD(0).X
    pntD(2).Y = CInt(pntD(0).Y + bmp_In.Height / decZoom)
    pntD(3).X = pntD(1).X
    pntD(3).Y = pntD(2).Y
    e.Graphics.DrawLine(PenDiag, pntD(0), pntD(3))
    e.Graphics.DrawLine(PenDiag, pntD(1), pntD(2))
 
    e.Graphics.DrawLine(PenDiag, pntD(0), pntD(1))
    e.Graphics.DrawLine(PenDiag, pntD(1), pntD(3))
    e.Graphics.DrawLine(PenDiag, pntD(3), pntD(2))
    e.Graphics.DrawLine(PenDiag, pntD(2), pntD(0))
  End If
 
'*** Raster 
' ************************************************************************
  If chbRaster.Checked = True Then
    . . .
  End If
  End Sub
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Problem mit Ausgabe in PictureBox2.959Dikn23.03.18 18:29
Re: Problem mit Ausgabe in PictureBox2.115Manfred X23.03.18 20:15
Re: Problem mit Ausgabe in PictureBox2.069Kuno6023.03.18 20:44
Re: Problem mit Ausgabe in PictureBox2.033Dikn25.03.18 10:10
Re: Problem mit Ausgabe in PictureBox2.077Manfred X25.03.18 12:48
Re: Problem mit Ausgabe in PictureBox2.057Dikn26.03.18 08:36
Re: Problem mit Ausgabe in PictureBox2.088Kuno6027.03.18 16:29
Re: Problem mit Ausgabe in PictureBox2.023Dikn26.03.18 09:58
Re: Problem mit Ausgabe in PictureBox2.042Manfred X26.03.18 11:26
Re: Problem mit Ausgabe in PictureBox2.035Dikn26.03.18 17:44
Re: Problem mit Ausgabe in PictureBox2.170Manfred X26.03.18 18:32
Re: Problem mit Ausgabe in PictureBox2.005Dikn27.03.18 09:22
Re: Problem mit Ausgabe in PictureBox2.154Manfred X27.03.18 09:33
Re: Problem mit Ausgabe in PictureBox1.989Dikn28.03.18 12:03
Re: Problem mit Ausgabe in PictureBox2.007Kuno6028.03.18 15:17
Re: Problem mit Ausgabe in PictureBox2.057Dikn28.03.18 18:01
Re: Problem mit Ausgabe in PictureBox1.979Kuno6004.04.18 07:06
Re: Problem mit Ausgabe in PictureBox1.929Manfred X04.04.18 13:37
Re: Problem mit Ausgabe in PictureBox1.871Kuno6004.04.18 20:18
Re: Problem mit Ausgabe in PictureBox1.841Manfred X04.04.18 20:51
Re: Problem mit Ausgabe in PictureBox1.902Kuno6004.04.18 21:10
Re: Problem mit Ausgabe in PictureBox1.903Manfred X04.04.18 21:40
Re: Problem mit Ausgabe in PictureBox1.822Kuno6004.04.18 22:52
Re: Problem mit Ausgabe in PictureBox1.867Manfred X04.04.18 23:02
Re: Problem mit Ausgabe in PictureBox1.854Kuno6004.04.18 23:20
Re: Problem mit Ausgabe in PictureBox1.895Manfred X04.04.18 23:33

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2024 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel