Click here to Skip to main content
15,896,557 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Set Wallpaper Pin
0x3c031-Mar-09 6:39
0x3c031-Mar-09 6:39 
QuestionOn Error GoTo in VBScript Pin
ATM_Guy31-Mar-09 4:59
ATM_Guy31-Mar-09 4:59 
AnswerRe: On Error GoTo in VBScript Pin
riced31-Mar-09 5:26
riced31-Mar-09 5:26 
GeneralRe: On Error GoTo in VBScript Pin
Uros Calakovic31-Mar-09 6:57
Uros Calakovic31-Mar-09 6:57 
QuestionProblem with movetoroot from the opc da automation wrapper Pin
dadio2531-Mar-09 3:53
dadio2531-Mar-09 3:53 
AnswerRe: Problem with movetoroot from the opc da automation wrapper Pin
dadio251-Apr-09 20:47
dadio251-Apr-09 20:47 
GeneralDisplay External Window in vb Form Pin
Samir Ibrahim31-Mar-09 2:48
Samir Ibrahim31-Mar-09 2:48 
GeneralRe: Display External Window in vb Form Pin
Dave Kreskowiak31-Mar-09 3:23
mveDave Kreskowiak31-Mar-09 3:23 
First, scrap all of this. You don't need most of it. Your biggest problem is that you're using VB.NET and using VB6 code in it. You declared a bunch of stuff as Long, which under VB6, was a 32-bit signed integer and, under VB.NET, is a 64-bit signed integer. You cannot use the two types interchangably.

You can use this instead:
Private Declare Auto Function SetParent Lib "user32" (ByVal hwndChild As IntPtr, ByVal hwndParent As IntPtr) As IntPtr
...
    ' Launch a Notepad process and wait for it's window to be created.
    Dim p As Process = Process.Start("Notepad.exe")
    p.WaitForInputIdle()

    ' Then set it's parent window to a panel on our form.
    SetParent(p.MainWindowHandle, Panel1.Handle)



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: Display External Window in vb Form Pin
Samir Ibrahim31-Mar-09 4:05
Samir Ibrahim31-Mar-09 4:05 
GeneralRe: Display External Window in vb Form Pin
0x3c031-Mar-09 6:55
0x3c031-Mar-09 6:55 
GeneralRe: Display External Window in vb Form Pin
Dave Kreskowiak31-Mar-09 7:26
mveDave Kreskowiak31-Mar-09 7:26 
GeneralRe: Display External Window in vb Form Pin
Samir Ibrahim1-Apr-09 5:07
Samir Ibrahim1-Apr-09 5:07 
QuestionFind Window Pin
Prasadsm31-Mar-09 1:38
Prasadsm31-Mar-09 1:38 
AnswerRe: Find Window Pin
Eddy Vluggen31-Mar-09 1:56
professionalEddy Vluggen31-Mar-09 1:56 
GeneralRe: Find Window Pin
Prasadsm31-Mar-09 2:01
Prasadsm31-Mar-09 2:01 
GeneralRe: Find Window Pin
Eddy Vluggen31-Mar-09 2:35
professionalEddy Vluggen31-Mar-09 2:35 
QuestionDelete Lines in Text File Pin
vijay248230-Mar-09 23:37
vijay248230-Mar-09 23:37 
AnswerRe: Delete Lines in Text File Pin
Prasadsm31-Mar-09 2:15
Prasadsm31-Mar-09 2:15 
AnswerRe: Delete Lines in Text File Pin
riced31-Mar-09 5:21
riced31-Mar-09 5:21 
QuestionI created a superscript in a rich text box but neeed to convert the same to caret sign in a text box Pin
gautamrajsaxena30-Mar-09 22:18
gautamrajsaxena30-Mar-09 22:18 
Questionplz help me to jump the return code to pass program check Pin
wgarnett30-Mar-09 21:37
wgarnett30-Mar-09 21:37 
AnswerRe: plz help me to jump the return code to pass program check Pin
Eddy Vluggen30-Mar-09 22:58
professionalEddy Vluggen30-Mar-09 22:58 
QuestionHow to configure ms access to allow lan connection in vb.net ???? Pin
JC.KaNNaN30-Mar-09 18:43
JC.KaNNaN30-Mar-09 18:43 
AnswerRe: How to configure ms access to allow lan connection in vb.net ???? Pin
_Damian S_30-Mar-09 19:12
professional_Damian S_30-Mar-09 19:12 
AnswerRe: How to configure ms access to allow lan connection in vb.net ???? Pin
Anubhava Dimri30-Mar-09 23:48
Anubhava Dimri30-Mar-09 23:48 

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.