Click here to Skip to main content
15,894,825 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Reports and Non-database data sources? Pin
Sam Marrocco8-Jan-06 11:03
Sam Marrocco8-Jan-06 11:03 
GeneralRe: Reports and Non-database data sources? Pin
Duncan Edwards Jones8-Jan-06 11:27
professionalDuncan Edwards Jones8-Jan-06 11:27 
GeneralRe: Reports and Non-database data sources? Pin
Sam Marrocco8-Jan-06 13:43
Sam Marrocco8-Jan-06 13:43 
GeneralRe: Reports and Non-database data sources? Pin
Duncan Edwards Jones24-Jan-06 6:00
professionalDuncan Edwards Jones24-Jan-06 6:00 
QuestionVB.NET, GDI+, Out of memory? Pin
cknipe8-Jan-06 5:46
cknipe8-Jan-06 5:46 
AnswerRe: VB.NET, GDI+, Out of memory? Pin
Daniel Grunwald8-Jan-06 7:07
Daniel Grunwald8-Jan-06 7:07 
AnswerRe: VB.NET, GDI+, Out of memory? Pin
Dave Kreskowiak8-Jan-06 7:50
mveDave Kreskowiak8-Jan-06 7:50 
GeneralRe: VB.NET, GDI+, Out of memory? Pin
cknipe8-Jan-06 10:17
cknipe8-Jan-06 10:17 
Hmm, then I have a problem.

I do already dispose of everything... It's really a matter of setup a pen, setup a brush, draw the line, and dispose of both the objects - through the entire drawing....

<br />
        Dim Brush27 As New LinearGradientBrush(New Point(212, 267), New Point(212, 297), Color.Black, Color.Black)<br />
        Dim BrushPen27 As New Pen(Color.Black, 5)<br />
        BrushPen27.Brush = Brush27<br />
        PCRT.DrawLine(BrushPen27, New Point(212, 267), New Point(212, 297))<br />
        BrushPen27.Dispose()<br />
        Brush27.Dispose()<br />


That's how every single line is drawn. Brush1 through to Brush27, and BrushPen1 through to BrushPen27. For interest sakes, do I need both????

The moment I Dim brush28, memory error... Confused | :confused: I do really have a crapload of things still to draw, and they need to move arround aswell (animation)... Please tell me there is a solution?

<br />
    Private Function GetGraphicsObject(ByVal bp As PictureBox) As Graphics<br />
        Dim bmp As New Bitmap(bp.Width, bp.Height)<br />
        Dim Grph As Graphics<br />
        Dim sm As SmoothingMode<br />
<br />
        bp.Image = bmp<br />
        Grph = Graphics.FromImage(bmp)<br />
        Grph.InterpolationMode = InterpolationMode.HighQualityBicubic<br />
        Grph.SmoothingMode = SmoothingMode.HighQuality<br />
        Return Grph<br />
    End Function<br />
<br />
    Private Sub DrawPCRT()<br />
        ' Top two nodges<br />
        Dim Brush1 As New LinearGradientBrush(New Point(210, 20), New Point(210, 48), Color.FromArgb(255, 255, 255), Color.FromArgb(255, 255, 255))<br />
        Dim BrushPen1 As New Pen(Color.FromArgb(255, 255, 255), 4)<br />
        BrushPen1.Brush = Brush1<br />
        PCRT.DrawLine(BrushPen1, New Point(210, 20), New Point(210, 48))<br />
        Brush1.Dispose()<br />
        BrushPen1.Dispose()<br />
<br />
* Allot of code removed, all drawing different lines *<br />


The above is drawn from my Form1_Load routine, drawn on a PictureBox.

form_load
<br />
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
        PCRT = GetGraphicsObject(PictureBox1)<br />
        DrawPCRT()<br />
        If PFD.Initialize = True Then<br />
            RemoteClassMainThread.Start()<br />
        End If<br />
    End Sub<br />


Thanks guys,

--
Chris.

-- modified at 16:26 Sunday 8th January, 2006
GeneralRe: VB.NET, GDI+, Out of memory? Pin
cknipe8-Jan-06 11:05
cknipe8-Jan-06 11:05 
GeneralRe: VB.NET, GDI+, Out of memory? Pin
Christian Graus8-Jan-06 11:32
protectorChristian Graus8-Jan-06 11:32 
GeneralRe: VB.NET, GDI+, Out of memory? Pin
cknipe8-Jan-06 11:44
cknipe8-Jan-06 11:44 
QuestionPossible Flaw in Visual Basic 6.0? Pin
Quecumber2568-Jan-06 4:46
Quecumber2568-Jan-06 4:46 
AnswerRe: Possible Flaw in Visual Basic 6.0? Pin
Dave Kreskowiak8-Jan-06 7:47
mveDave Kreskowiak8-Jan-06 7:47 
GeneralRe: Possible Flaw in Visual Basic 6.0? Pin
Quecumber2568-Jan-06 8:40
Quecumber2568-Jan-06 8:40 
AnswerRe: Possible Flaw in Visual Basic 6.0? Pin
Christian Graus8-Jan-06 10:09
protectorChristian Graus8-Jan-06 10:09 
GeneralRe: Possible Flaw in Visual Basic 6.0? Pin
Quecumber2568-Jan-06 11:59
Quecumber2568-Jan-06 11:59 
Questioncompine a program with picture Pin
DreamzxxxGuy8-Jan-06 4:10
DreamzxxxGuy8-Jan-06 4:10 
AnswerRe: compine a program with picture Pin
Dave Kreskowiak8-Jan-06 7:44
mveDave Kreskowiak8-Jan-06 7:44 
GeneralRe: compine a program with picture Pin
DreamzxxxGuy8-Jan-06 9:26
DreamzxxxGuy8-Jan-06 9:26 
GeneralRe: compine a program with picture Pin
Dave Kreskowiak8-Jan-06 15:38
mveDave Kreskowiak8-Jan-06 15:38 
GeneralRe: compine a program with picture Pin
DreamzxxxGuy9-Jan-06 2:09
DreamzxxxGuy9-Jan-06 2:09 
GeneralRe: compine a program with picture Pin
Dave Kreskowiak9-Jan-06 2:16
mveDave Kreskowiak9-Jan-06 2:16 
GeneralRe: compine a program with picture Pin
DreamzxxxGuy9-Jan-06 2:30
DreamzxxxGuy9-Jan-06 2:30 
GeneralRe: compine a program with picture Pin
Dave Kreskowiak9-Jan-06 3:18
mveDave Kreskowiak9-Jan-06 3:18 
Questionsetting the tabcontrol tab to focus Pin
~san~8-Jan-06 3:58
~san~8-Jan-06 3:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.