Click here to Skip to main content
15,921,622 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to see CPU use (%) Pin
Paul Conrad14-May-07 8:53
professionalPaul Conrad14-May-07 8:53 
GeneralRe: How to see CPU use (%) Pin
Zaegra15-May-07 3:14
Zaegra15-May-07 3:14 
AnswerRe: How to see CPU use (%) Pin
Dave Kreskowiak14-May-07 8:44
mveDave Kreskowiak14-May-07 8:44 
QuestionTimer control running in the background Pin
steve_rm14-May-07 8:05
steve_rm14-May-07 8:05 
AnswerRe: Timer control running in the background Pin
SimulationofSai14-May-07 9:36
SimulationofSai14-May-07 9:36 
GeneralRe: Timer control running in the background Pin
steve_rm14-May-07 15:52
steve_rm14-May-07 15:52 
GeneralRe: Timer control running in the background Pin
Dave Kreskowiak14-May-07 16:36
mveDave Kreskowiak14-May-07 16:36 
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 

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.