Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Handling IntPtr

Handling IntPtr

Scheduled Pinned Locked Moved Visual Basic
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nanda1605
    wrote on last edited by
    #1

    Hi, Am handling the text in textbox for the below code, it works fine, I like to handle the text presents in the word document or a string value for the below code instead of Textbox1.Handle, is there any way to pass the string value as IntPtr. Private Sub Button48_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button48.Click messge(Textbox1.Handle) End Sub Private Sub messge(ByVal value As IntPtr) ' ' ' End Sub Kindly suggest me

    Thanks, Nanda

    D 1 Reply Last reply
    0
    • N Nanda1605

      Hi, Am handling the text in textbox for the below code, it works fine, I like to handle the text presents in the word document or a string value for the below code instead of Textbox1.Handle, is there any way to pass the string value as IntPtr. Private Sub Button48_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button48.Click messge(Textbox1.Handle) End Sub Private Sub messge(ByVal value As IntPtr) ' ' ' End Sub Kindly suggest me

      Thanks, Nanda

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Are you passing this String to another application or inside your own? Passing by IntPtr is hardly efficient, so I don't see why you would do this. What's the point?

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      N 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Are you passing this String to another application or inside your own? Passing by IntPtr is hardly efficient, so I don't see why you would do this. What's the point?

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        N Offline
        N Offline
        Nanda1605
        wrote on last edited by
        #3

        Hi Dave, This is the code given in SDK, SSCEVB_CheckCtrlDlg(Me.Handle, TextBox1.Handle, False) Function SSCEVB_CheckCtrlDlg(ByVal parent As IntPtr, ByVal ctrlWin As IntPtr, _ ByVal selTextOnly As Short) As Short End Function Here I would like to pass the Msword Document as IntPtr instead of TextBox1.Handle as below but it doesnt support. Dim docPointer As IntPtr = Runtime.InteropServices.Marshal.GetIUnknownForObject(Word.Application) SSCEVB_CheckCtrlDlg(Me.Handle, docPointer, False) Kindly Suggest Me

        Thanks, Nanda

        D 1 Reply Last reply
        0
        • N Nanda1605

          Hi Dave, This is the code given in SDK, SSCEVB_CheckCtrlDlg(Me.Handle, TextBox1.Handle, False) Function SSCEVB_CheckCtrlDlg(ByVal parent As IntPtr, ByVal ctrlWin As IntPtr, _ ByVal selTextOnly As Short) As Short End Function Here I would like to pass the Msword Document as IntPtr instead of TextBox1.Handle as below but it doesnt support. Dim docPointer As IntPtr = Runtime.InteropServices.Marshal.GetIUnknownForObject(Word.Application) SSCEVB_CheckCtrlDlg(Me.Handle, docPointer, False) Kindly Suggest Me

          Thanks, Nanda

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          What SDK? What does this function do?

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups