Click here to Skip to main content
15,914,162 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Sudoku Generator in VB6 Pin
Solid Snake26-Mar-06 17:10
Solid Snake26-Mar-06 17:10 
GeneralRe: Sudoku Generator in VB6 Pin
Christian Graus27-Mar-06 8:33
protectorChristian Graus27-Mar-06 8:33 
AnswerRe: Sudoku Generator in VB6 Pin
Chatura Dilan26-Mar-06 14:19
Chatura Dilan26-Mar-06 14:19 
GeneralRe: Sudoku Generator in VB6 Pin
Solid Snake26-Mar-06 17:09
Solid Snake26-Mar-06 17:09 
GeneralRe: Sudoku Generator in VB6 Pin
Chatura Dilan26-Mar-06 17:52
Chatura Dilan26-Mar-06 17:52 
GeneralRe: Sudoku Generator in VB6 Pin
Steve Pullan26-Mar-06 18:49
Steve Pullan26-Mar-06 18:49 
QuestionOutOfMemory error, how? Pin
NatBest26-Mar-06 7:18
NatBest26-Mar-06 7:18 
AnswerRe: OutOfMemory error, how? Pin
Dave Kreskowiak26-Mar-06 9:23
mveDave Kreskowiak26-Mar-06 9:23 
You're not Diposing your Pen and Graphics objects after you're done using them in your MouseMove event handler. If you skip this step, you'll quite easily run the system out of GDI resources and/or system handles, causing the "Out of Memory" Exception.
.
.
.
Dim g As Graphics = Graphics.FromImage(PictureBox1.Image)
Dim myPen As Pen = New Pen(Color.Blue, myPenWidth)
mousePath.AddLine(e.X, e.Y, e.X, e.Y)
g.DrawPath(myPen, mousePath)
myPen.Dispose()
g.Dispose()
.
.

But, since you'll using this method constantly, you might want to put creating/destroying the Pen objject outside the MouseMove handler. This way you won't be creating a new pen every time the mouse moves at least one pixel!


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

AnswerRe: OutOfMemory error, how? Pin
NatBest26-Mar-06 16:43
NatBest26-Mar-06 16:43 
GeneralRe: OutOfMemory error, how? Pin
Chatura Dilan26-Mar-06 18:41
Chatura Dilan26-Mar-06 18:41 
GeneralRe: OutOfMemory error, how? Pin
Purple Monk27-Mar-06 0:02
Purple Monk27-Mar-06 0:02 
GeneralRe: OutOfMemory error, how? Pin
NatBest28-Mar-06 4:15
NatBest28-Mar-06 4:15 
QuestionComboBox text Pin
jdjd111826-Mar-06 5:50
jdjd111826-Mar-06 5:50 
AnswerRe: ComboBox text Pin
Chatura Dilan26-Mar-06 14:01
Chatura Dilan26-Mar-06 14:01 
AnswerRe: ComboBox text Pin
Vikrant Badhai26-Mar-06 19:30
Vikrant Badhai26-Mar-06 19:30 
QuestionSQL Staement problem help!!! Pin
LeRoiScorpion26-Mar-06 3:51
LeRoiScorpion26-Mar-06 3:51 
GeneralRe: SQL Staement problem help!!! Pin
Guffa26-Mar-06 3:58
Guffa26-Mar-06 3:58 
AnswerRe: SQL Staement problem help!!! Pin
Steve Pullan26-Mar-06 16:18
Steve Pullan26-Mar-06 16:18 
Questionhow can i make a form to take the shape of a certain bmp Pin
scorp_scorp26-Mar-06 0:50
scorp_scorp26-Mar-06 0:50 
AnswerRe: how can i make a form to take the shape of a certain bmp Pin
Chatura Dilan26-Mar-06 14:02
Chatura Dilan26-Mar-06 14:02 
GeneralRe: how can i make a form to take the shape of a certain bmp Pin
Rey999927-Mar-06 3:36
Rey999927-Mar-06 3:36 
GeneralRe: how can i make a form to take the shape of a certain bmp Pin
scorp_scorp27-Mar-06 3:40
scorp_scorp27-Mar-06 3:40 
Questionhow to open doc or txt file Pin
scorp_scorp25-Mar-06 22:53
scorp_scorp25-Mar-06 22:53 
AnswerRe: how to open doc or txt file Pin
Chatura Dilan25-Mar-06 23:35
Chatura Dilan25-Mar-06 23:35 
QuestionHelp with vbscript and Windows NT Pin
Its due when25-Mar-06 19:10
Its due when25-Mar-06 19:10 

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.