• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 427
  • Last Modified:

How to use System.IntPtr

Hi, can anyone demostrate the use of system.intptr..thanks
0
jaxrpc
Asked:
jaxrpc
1 Solution
 
jesusafloresCommented:
Exactly that you desire to do?  
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
This will change the caption on your form via the forms handle and the SetWindowText() API:

    Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" _
        (ByVal hWnd As IntPtr, ByVal lpString As String) As Integer

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim hWnd As IntPtr = Me.Handle
        SetWindowText(hWnd, "Hello World!")
    End Sub
0
 
PockyMasterCommented:
It's just what a long was in the old VB API times, but now clearer that its a pointer.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now