Click here to Skip to main content
15,915,019 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Issue with Export To Excel Pin
mayhem_rules23-Mar-06 22:36
mayhem_rules23-Mar-06 22:36 
GeneralRe: Issue with Export To Excel Pin
Gary Noble24-Mar-06 5:13
Gary Noble24-Mar-06 5:13 
Questiongetting value of specific XML start element Pin
Divya Rathi22-Mar-06 22:10
Divya Rathi22-Mar-06 22:10 
AnswerRe: getting value of specific XML start element Pin
naveenieus22-Mar-06 23:51
naveenieus22-Mar-06 23:51 
QuestionQuery parameters Pin
Danilo Corallo22-Mar-06 22:05
Danilo Corallo22-Mar-06 22:05 
AnswerRe: Query parameters Pin
Purple Monk23-Mar-06 4:16
Purple Monk23-Mar-06 4:16 
QuestionDraw a rectange with the mouse - how? Pin
nzmike22-Mar-06 20:37
nzmike22-Mar-06 20:37 
AnswerRe: Draw a rectange with the mouse - how? Pin
H@is@here22-Mar-06 23:02
H@is@here22-Mar-06 23:02 
Hello

Here is the code how to draw a rectangle on a picture box named picmain:

Dim startX As Integer<br />
    Dim StartY As Integer<br />
<br />
Private Sub picmain_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picmain.MouseMove<br />
        If e.Button = MouseButtons.Left Then<br />
            picmain.Refresh()<br />
            Dim g As Graphics = Graphics.FromHwnd(picmain.Handle)<br />
            Dim myPen As Pen = New Pen(Color.Red)<br />
            myPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash<br />
            g.DrawRectangle(myPen, startX, StartY, Math.Abs(startX - e.X), Math.Abs(StartY - e.Y))<br />
        End If<br />
    End Sub<br />
<br />
Private Sub picmain_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picmain.MouseDown<br />
        startX = e.X<br />
        StartY = e.Y<br />
    End Sub


The resizing will be up to you.

Hope it helps
AnswerRe: Draw a rectange with the mouse - how? Pin
Purple Monk23-Mar-06 4:24
Purple Monk23-Mar-06 4:24 
GeneralRe: Draw a rectange with the mouse - how? Pin
nzmike23-Mar-06 9:15
nzmike23-Mar-06 9:15 
QuestionImage in datagrid Pin
naveenieus22-Mar-06 17:16
naveenieus22-Mar-06 17:16 
AnswerRe: Image in datagrid Pin
Vasudevan Deepak Kumar22-Mar-06 19:00
Vasudevan Deepak Kumar22-Mar-06 19:00 
GeneralRe: Image in datagrid Pin
naveenieus22-Mar-06 19:17
naveenieus22-Mar-06 19:17 
Questionregartding chart Pin
maytel22-Mar-06 16:32
maytel22-Mar-06 16:32 
AnswerRe: regartding chart Pin
Chatura Dilan22-Mar-06 18:28
Chatura Dilan22-Mar-06 18:28 
AnswerRe: regartding chart Pin
Vasudevan Deepak Kumar22-Mar-06 19:04
Vasudevan Deepak Kumar22-Mar-06 19:04 
GeneralRe: regartding chart Pin
maytel22-Mar-06 19:32
maytel22-Mar-06 19:32 
AnswerRe: regartding chart Pin
Joshua Quick23-Mar-06 7:31
Joshua Quick23-Mar-06 7:31 
Questionplease help with charting Pin
uglyeyes22-Mar-06 12:27
uglyeyes22-Mar-06 12:27 
QuestionHow to convert an aspx file into PDF and open it in browser? Pin
Julianne_juju22-Mar-06 8:27
Julianne_juju22-Mar-06 8:27 
AnswerRe: How to convert an aspx file into PDF and open it in browser? Pin
Christian Graus22-Mar-06 11:41
protectorChristian Graus22-Mar-06 11:41 
GeneralRe: How to convert an aspx file into PDF and open it in browser? Pin
Julianne_juju22-Mar-06 12:06
Julianne_juju22-Mar-06 12:06 
GeneralRe: How to convert an aspx file into PDF and open it in browser? Pin
Christian Graus22-Mar-06 12:39
protectorChristian Graus22-Mar-06 12:39 
GeneralRe: How to convert an aspx file into PDF and open it in browser? Pin
Julianne_juju23-Mar-06 6:31
Julianne_juju23-Mar-06 6:31 
GeneralRe: How to convert an aspx file into PDF and open it in browser? Pin
Christian Graus23-Mar-06 11:30
protectorChristian Graus23-Mar-06 11:30 

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.