vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
SEPA-Dateien erstellen inkl. IBAN-, BLZ-/Kontonummernprüfung  
 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: Manfred X
Datum: 25.03.18 12:48

Hallo!

Dein Befund ist völlig korrekt.
Ein derartiges Seitenverhältnis führt zu einem Randstreifen.
Der Zoomfaktor ist ist in dem Fall übrigens ein periodischer
Dezimalbruch: 4,459459459459459 ....

Die Borderstyle-Eigenschaft der Picturebox spielt z.B. auch
eine Rolle bei der Darstellung.

Public Class frmTestPicBox
 
    Dim pb As New PictureBox With 
        {.Parent = Me, .SizeMode = PictureBoxSizeMode.Zoom,
        .Location = New Point(10, 10), .Size = New Drawing.Size(592, 333)}
 
    Dim bmp As New Bitmap(2640, 1485)
 
 
    Private Sub frmTestPicBox_Load(sender As Object, 
        e As EventArgs) Handles MyBase.Load
 
        Me.Size = New Size(600, 400)
        Me.BackColor = Color.Yellow
        pb.BackColor = Color.Red
 
        Using g As Graphics = Graphics.FromImage(bmp)
            g.Clear(Color.Green)
        End Using
 
        pb.Image = bmp
 
    End Sub
End Class
Vielleicht so etwas ....
Public Class frmTestPicBox
 
    Dim pb As New PictureBox With {.Parent = Me, .SizeMode = _
      PictureBoxSizeMode.Zoom,
        .Location = New Point(10, 10), .Size = New Drawing.Size(592, 333), 
        .BorderStyle = BorderStyle.None}
 
    Dim bmp As New Bitmap(2640, 1485)
 
 
    Private Sub frmTestPicBox_Load(sender As Object, 
        e As EventArgs) Handles MyBase.Load
 
        Me.Size = New Size(600, 400)
        Me.BackColor = Color.Yellow
        pb.BackColor = Color.Red
 
        Dim bmp_out As New Bitmap(pb.Width, pb.Height)
        Using g As Graphics = System.Drawing.Graphics.FromImage(bmp_out)
            g.DrawImage(bmp, New Rectangle(0, 0, bmp_out.Width, bmp_out.Height))
        End Using
 
        pb.Image = bmp_out
    End Sub
 
 
End Class


Beitrag wurde zuletzt am 25.03.18 um 12:59:31 editiert.
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.114Manfred X23.03.18 20:15
Re: Problem mit Ausgabe in PictureBox2.069Kuno6023.03.18 20:44
Re: Problem mit Ausgabe in PictureBox2.032Dikn25.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.087Kuno6027.03.18 16:29
Re: Problem mit Ausgabe in PictureBox2.023Dikn26.03.18 09:58
Re: Problem mit Ausgabe in PictureBox2.041Manfred 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.988Dikn28.03.18 12:03
Re: Problem mit Ausgabe in PictureBox2.007Kuno6028.03.18 15:17
Re: Problem mit Ausgabe in PictureBox2.056Dikn28.03.18 18:01
Re: Problem mit Ausgabe in PictureBox1.978Kuno6004.04.18 07:06
Re: Problem mit Ausgabe in PictureBox1.929Manfred X04.04.18 13:37
Re: Problem mit Ausgabe in PictureBox1.870Kuno6004.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.866Manfred 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