Click here to Skip to main content
15,887,214 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHelp for Packet drop/pass Pin
Sunil KC14-May-07 7:34
Sunil KC14-May-07 7:34 
AnswerRe: Help for Packet drop/pass Pin
Dave Kreskowiak14-May-07 8:38
mveDave Kreskowiak14-May-07 8:38 
QuestionHow to Hide Members of Base Class Pin
Probeer Das14-May-07 7:16
Probeer Das14-May-07 7:16 
AnswerRe: How to Hide Members of Base Class Pin
nlarson1114-May-07 8:30
nlarson1114-May-07 8:30 
GeneralRe: How to Hide Members of Base Class Pin
Probeer Das15-May-07 3:21
Probeer Das15-May-07 3:21 
QuestionSetting value for resources Pin
ctlqt1214-May-07 5:45
ctlqt1214-May-07 5:45 
AnswerRe: Setting value for resources Pin
Dave Kreskowiak14-May-07 8:36
mveDave Kreskowiak14-May-07 8:36 
QuestionStretchBlt to a PictureBox ? Pin
Beginner_HC14-May-07 4:24
Beginner_HC14-May-07 4:24 
Hallo,
I wrote this code, it works and it magnify "MyPicture" 8 times to the Form1.
Now my question:
Is there a possibility to use the bitmap of a PictureBox for the Destination of
StretchBlt, or copy the destination to a PictureBox?
Thanks for answerig, Hans-Christian

Imports System.Runtime.InteropServices<br />
<br />
Public Class Form1<br />
    Dim srcImage As New Bitmap("MyPicture.bmp", True)<br />
    Dim Graph As Graphics = Me.CreateGraphics<br />
    Dim desHdc As IntPtr = Graph.GetHdc()<br />
<br />
    Dim srcHdc As IntPtr = CreateCompatibleDC(IntPtr.Zero)<br />
    Dim hBitmapSrc As IntPtr = srcImage.GetHbitmap()<br />
    <br />
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick<br />
<br />
        SelectObject(srcHdc, hBitmapSrc)<br />
        SetStretchBltMode(desHdc, 13369376)<br />
        StretchBlt(desHdc, 0, 0, 4096, 4096, _<br />
          srcHdc, 0, 0, 512, 512, _<br />
        TernaryRasterOperations.SRCCOPY)<br />
<br />
End Sub

AnswerRe: StretchBlt to a PictureBox ? Pin
Dave Kreskowiak14-May-07 4:43
mveDave Kreskowiak14-May-07 4:43 
GeneralRe: StretchBlt to a PictureBox ? Pin
Beginner_HC14-May-07 5:34
Beginner_HC14-May-07 5:34 
GeneralRe: StretchBlt to a PictureBox ? Pin
Dave Kreskowiak14-May-07 8:34
mveDave Kreskowiak14-May-07 8:34 
GeneralRe: StretchBlt to a PictureBox ? Pin
Beginner_HC15-May-07 8:51
Beginner_HC15-May-07 8:51 
QuestionOOPS Pin
Rafeeque Ahmed14-May-07 4:03
Rafeeque Ahmed14-May-07 4:03 
AnswerRe: OOPS Pin
Dave Kreskowiak14-May-07 4:37
mveDave Kreskowiak14-May-07 4:37 
GeneralRe: OOPS Pin
leckey14-May-07 9:26
leckey14-May-07 9:26 
GeneralRe: OOPS Pin
Dave Kreskowiak14-May-07 9:48
mveDave Kreskowiak14-May-07 9:48 
GeneralRe: OOPS Pin
Paul Conrad14-May-07 9:54
professionalPaul Conrad14-May-07 9:54 
GeneralRe: OOPS Pin
leckey14-May-07 10:32
leckey14-May-07 10:32 
GeneralRe: OOPS Pin
Rafeeque Ahmed14-May-07 19:32
Rafeeque Ahmed14-May-07 19:32 
GeneralRe: OOPS Pin
Dave Kreskowiak15-May-07 12:48
mveDave Kreskowiak15-May-07 12:48 
GeneralRe: OOPS Pin
Rafeeque Ahmed15-May-07 19:59
Rafeeque Ahmed15-May-07 19:59 
GeneralRe: OOPS Pin
Dave Kreskowiak16-May-07 13:24
mveDave Kreskowiak16-May-07 13:24 
Questionapplication slow Pin
Rafeeque Ahmed14-May-07 4:02
Rafeeque Ahmed14-May-07 4:02 
AnswerRe: application slow Pin
Dave Kreskowiak14-May-07 4:35
mveDave Kreskowiak14-May-07 4:35 
AnswerRe: application slow Pin
Paul Conrad14-May-07 6:28
professionalPaul Conrad14-May-07 6:28 

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.