Click here to Skip to main content
15,909,445 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Append ALL Textfiles within a folder to a Single Textfile Pin
Dave Kreskowiak4-May-09 4:07
mveDave Kreskowiak4-May-09 4:07 
QuestionCOM port Pin
Subjugate3-May-09 21:07
Subjugate3-May-09 21:07 
AnswerRe: COM port [modified] Pin
Wankel Maggot3-May-09 21:48
Wankel Maggot3-May-09 21:48 
AnswerRe: COM port Pin
Bharat Jain3-May-09 21:50
Bharat Jain3-May-09 21:50 
GeneralRe: COM port Pin
Subjugate4-May-09 15:00
Subjugate4-May-09 15:00 
QuestionVisual Data Manager Pin
KULKING3-May-09 21:03
KULKING3-May-09 21:03 
AnswerRe: Visual Data Manager Pin
Henry Minute4-May-09 2:45
Henry Minute4-May-09 2:45 
Questioncan picture boxes be mathmatically different then they appear Pin
Wankel Maggot3-May-09 20:34
Wankel Maggot3-May-09 20:34 
hello i am new to code project and new to visual basic so please be patient with what im sure is a pretty tedious question
I have searched high and low to find an answer to this but figuring out what to type into MSDN or Google to get relevant answers is tying my head in knots
I am trying to write a graphing component but the grid never lines up with the picture box i am trying to draw it in, and i have distilled the problem down to this

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

PictureBox1.BorderStyle = BorderStyle.FixedSingle
PictureBox1.BackColor = Color.White
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim line As System.Drawing.Graphics
Dim pen As System.Drawing.Pen = Pens.Black
line = PictureBox1.CreateGraphics
line.DrawLine(pen, PictureBox1.Left, PictureBox1.Bottom, PictureBox1.Right, PictureBox1.Top)

End Sub
End Class

but when i run this code the line does not start in the bottom left and stop at the top right of the picture box
so how do i fix this and how do i make the solution resolution and maximize\minimize safe

thanks

modified on Monday, May 4, 2009 3:41 AM

AnswerRe: can picture boxes be mathmatically different then they appear Pin
Christian Graus3-May-09 22:19
protectorChristian Graus3-May-09 22:19 
GeneralRe: can picture boxes be mathmatically different then they appear Pin
Wankel Maggot3-May-09 22:30
Wankel Maggot3-May-09 22:30 
GeneralRe: can picture boxes be mathmatically different then they appear Pin
Christian Graus3-May-09 22:48
protectorChristian Graus3-May-09 22:48 
AnswerRe: can picture boxes be mathmatically different then they appear Pin
Luc Pattyn3-May-09 23:05
sitebuilderLuc Pattyn3-May-09 23:05 
GeneralRe: can picture boxes be mathmatically different then they appear Pin
Wankel Maggot3-May-09 23:33
Wankel Maggot3-May-09 23:33 
GeneralRe: can picture boxes be mathmatically different then they appear Pin
Luc Pattyn3-May-09 23:48
sitebuilderLuc Pattyn3-May-09 23:48 
GeneralRe: can picture boxes be mathmatically different then they appear Pin
Christian Graus4-May-09 0:04
protectorChristian Graus4-May-09 0:04 
GeneralRe: can picture boxes be mathmatically different then they appear [modified] Pin
Wankel Maggot4-May-09 0:18
Wankel Maggot4-May-09 0:18 
GeneralRe: can picture boxes be mathmatically different then they appear Pin
Dave Kreskowiak4-May-09 2:03
mveDave Kreskowiak4-May-09 2:03 
QuestionWhich libray will be used in Visual Basic 6 [modified] Pin
M Riaz Bashir3-May-09 20:11
M Riaz Bashir3-May-09 20:11 
AnswerRe: Which libray will be used in Visual Basic 6 Pin
Christian Graus3-May-09 22:20
protectorChristian Graus3-May-09 22:20 
AnswerRe: Which libray will be used in Visual Basic 6 Pin
Tiyani Miyambo4-May-09 0:27
Tiyani Miyambo4-May-09 0:27 
AnswerRe: Which libray will be used in Visual Basic 6 Pin
Johan Hakkesteegt4-May-09 1:24
Johan Hakkesteegt4-May-09 1:24 
AnswerRe: Which libray will be used in Visual Basic 6 Pin
Baran M4-May-09 1:25
Baran M4-May-09 1:25 
AnswerRe: Which libray will be used in Visual Basic 6 Pin
Dave Kreskowiak4-May-09 2:00
mveDave Kreskowiak4-May-09 2:00 
Questionurgent help required .. How to remove XMLNS namespace in child nodes (urgent) Pin
Member 61613673-May-09 19:53
Member 61613673-May-09 19:53 
AnswerRe: urgent help required .. How to remove XMLNS namespace in child nodes (urgent) Pin
Christian Graus3-May-09 22:21
protectorChristian Graus3-May-09 22:21 

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.