Click here to Skip to main content
16,008,750 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: subject:programming with .NET Framework to browsing my bank account, buy and sell stock shares Pin
Close Network1-Feb-05 23:22
Close Network1-Feb-05 23:22 
Questionhow to save the image of a hidden form Pin
tendlya1-Feb-05 3:36
tendlya1-Feb-05 3:36 
AnswerRe: how to save the image of a hidden form Pin
Charlie Williams1-Feb-05 5:04
Charlie Williams1-Feb-05 5:04 
Questionhow to capture image of a hidden form Pin
tendlya1-Feb-05 3:30
tendlya1-Feb-05 3:30 
GeneralReading form names from the proj in vb.net Pin
Thirumalaraj1-Feb-05 1:56
Thirumalaraj1-Feb-05 1:56 
GeneralRe: Reading form names from the proj in vb.net Pin
Christian Graus1-Feb-05 17:12
protectorChristian Graus1-Feb-05 17:12 
GeneralCut PNG file or any image Pin
Just Greeky Creek1-Feb-05 0:25
Just Greeky Creek1-Feb-05 0:25 
GeneralRe: Cut PNG file or any image Pin
Robert Rohde1-Feb-05 8:55
Robert Rohde1-Feb-05 8:55 
Your GetImage function could look like the following:

Public Function Getimage(ByVal sourceImage As Image, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer) As Image
    Dim result As Bitmap = New Bitmap(width, height)
    Dim g As Graphics
    Try
        g = Graphics.FromImage(result)
        g.DrawImageUnscaled(sourceImage, -x, -y)
    Finally
        If Not g Is Nothing Then
            g.Dispose()
        End If
    End Try
    Return result
End Function


Havent tested the code but I think it should work. In general it just generates an empty Bitmap, creates a Graphics object and draws the original image at a location so that only the needed part is drawn.
There are probably more efficient ways out there, but it should do fine this way for smaller images.
QuestionHow to get hDC of a picturebox? Pin
rushing31-Jan-05 23:01
rushing31-Jan-05 23:01 
Generaltextboxes Pin
fo0lish31-Jan-05 22:54
fo0lish31-Jan-05 22:54 
GeneralRe: textboxes Pin
Just Greeky Creek1-Feb-05 1:39
Just Greeky Creek1-Feb-05 1:39 
GeneralRe: textboxes Pin
Dave Kreskowiak1-Feb-05 3:54
mveDave Kreskowiak1-Feb-05 3:54 
GeneralRe: textboxes Pin
fo0lish1-Feb-05 12:40
fo0lish1-Feb-05 12:40 
GeneralRe: textboxes Pin
Dave Kreskowiak1-Feb-05 17:28
mveDave Kreskowiak1-Feb-05 17:28 
QuestionHow to capture screen in VB.net? Pin
rushing31-Jan-05 21:01
rushing31-Jan-05 21:01 
AnswerRe: How to capture screen in VB.net? Pin
Dave Kreskowiak1-Feb-05 3:52
mveDave Kreskowiak1-Feb-05 3:52 
GeneralRe: How to capture screen in VB.net? Pin
rushing1-Feb-05 14:46
rushing1-Feb-05 14:46 
GeneralThe whole source code . Pin
rushing1-Feb-05 14:51
rushing1-Feb-05 14:51 
GeneralRe: The whole source code . Pin
Dave Kreskowiak1-Feb-05 17:59
mveDave Kreskowiak1-Feb-05 17:59 
GeneralSynchronize two databases Pin
Aman Ullah Principal Software Engineer31-Jan-05 21:00
Aman Ullah Principal Software Engineer31-Jan-05 21:00 
GeneralRe: Synchronize two databases Pin
Dave Kreskowiak1-Feb-05 3:43
mveDave Kreskowiak1-Feb-05 3:43 
GeneralSynchronize two database Pin
Aman Ullah Principal Software Engineer31-Jan-05 20:58
Aman Ullah Principal Software Engineer31-Jan-05 20:58 
GeneralPrinting in VB.net (Please Please help me) Pin
Aman Ullah Principal Software Engineer31-Jan-05 18:31
Aman Ullah Principal Software Engineer31-Jan-05 18:31 
GeneralRe: Printing in VB.net (Please Please help me) Pin
Dave Kreskowiak1-Feb-05 3:39
mveDave Kreskowiak1-Feb-05 3:39 
GeneralVB.Net and Access Stored Procedures Pin
BlueMurderJay31-Jan-05 16:44
BlueMurderJay31-Jan-05 16:44 

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.