I am facing one problem can anybody help me?
i m working on vb.net2003.basically vb.net GDI+ platform.
problem is:-
when i m running the application ,it will display 4 line and one rectangle in picturebox.
problem is coming ,when i m scrolling the picturebox inthat time rectangle is not visible.
can anybody help me to solve this problem?
Add the Windows Form->addthe control Panel.->on the panel,addthe Picturebox->In panel properties,set the Autoscroll=true.
my code is :-
*************************************************
Public Class Form2 Inherits System.Windows.Forms.Form + Windows Form Designer generated code Dim eGraphics As Graphics Dim xco As Single = 1024 / 2 Dim yco As Single = 130 Dim myco As Single Dim i As Integer Dim br As New SolidBrush(Color.DarkSlateGray) Dim RecyCo, m_yCo As Single Dim RecWidth As Single = 50 Dim RecHeight As Single = 20 Dim m_xCo As Single = 30 Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint Dim blackPen As New Pen(Color.White, 3) Dim blackPen1 As New Pen(Color.Blue, 3) eGraphics = e.Graphics myco = 0 For i = 0 To 3 myco = 50 * 2 + myco eGraphics.DrawLine(blackPen, 0, myco, 1023, myco) Next CreateRec(eGraphics) End Sub Public Sub CreateRec(ByVal eGraphics As Graphics) m_yCo = 130 + m_yCo eGraphics.FillRectangle(br, m_xCo, m_yCo, RecWidth, RecHeight) End Sub
This post has been edited by PsychoCoder: 12 March 2008 - 07:34 AM

New Topic/Question
Reply




MultiQuote




|