Click here to Skip to main content
15,909,530 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Visual Basic Pin
Bernhard Hiller27-Oct-13 23:19
Bernhard Hiller27-Oct-13 23:19 
AnswerRe: Visual Basic Pin
thatraja28-Oct-13 0:59
professionalthatraja28-Oct-13 0:59 
Questionproblems with setparent in vb .net 2008 Pin
larry11824-Oct-13 4:39
larry11824-Oct-13 4:39 
AnswerRe: problems with setparent in vb .net 2008 Pin
Eddy Vluggen24-Oct-13 8:34
professionalEddy Vluggen24-Oct-13 8:34 
GeneralRe: problems with setparent in vb .net 2008 Pin
larry11824-Oct-13 8:46
larry11824-Oct-13 8:46 
GeneralRe: problems with setparent in vb .net 2008 Pin
Eddy Vluggen25-Oct-13 12:30
professionalEddy Vluggen25-Oct-13 12:30 
GeneralRe: problems with setparent in vb .net 2008 Pin
Mycroft Holmes27-Oct-13 14:29
professionalMycroft Holmes27-Oct-13 14:29 
GeneralRe: problems with setparent in vb .net 2008 Pin
larry11828-Oct-13 5:10
larry11828-Oct-13 5:10 
These are really good people. I like them and don't mind being responsible for converting the code. I have made some progress on this issue. The setparent now seems to be working. The vb6 form is now appearing in the .net container. The problem was passing the parent from vb6 and that is now handled.

So setparent works now but it's followed by a send message, setforegroundwindow and lockwindowupdate which appear not to be working. My declarations are as follows:

<system.runtime.interopservices.dllimport("user32.dll")> _
Private Shared Function SetParent(ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As Int32
End Function

Public Declare Auto Function SendMessage Lib "user32.dll" ( _
ByVal hWnd As IntPtr, _
ByVal wMsg As Int32, _
ByVal wParam As Int32, _
ByVal s As String _
) As Int32

<system.runtime.interopservices.dllimport("user32.dll")> _
Private Shared Function SetForegroundWindow(ByVal hwnd As IntPtr) As IntPtr
End Function

<system.runtime.interopservices.dllimport("user32.dll")> _
Private Shared Function LockWindowUpdate(ByVal hwndLock As IntPtr) As Boolean
End Function

and the code is:

SetParent(mintFormHandle, Me.Handle.ToInt32)
SendMessage(mintFormHandle, WM_ACTIVATE, 1, IntPtr.Zero)
SetForegroundWindow(mintFormHandle)
LockWindowUpdate(0)
Me.Refresh()

Any suggestions?
Such a Larry

AnswerRe: problems with setparent in vb .net 2008 Pin
Eddy Vluggen28-Oct-13 8:40
professionalEddy Vluggen28-Oct-13 8:40 
GeneralRe: problems with setparent in vb .net 2008 Pin
larry11828-Oct-13 9:01
larry11828-Oct-13 9:01 
GeneralRe: problems with setparent in vb .net 2008 Pin
Eddy Vluggen29-Oct-13 8:42
professionalEddy Vluggen29-Oct-13 8:42 
GeneralRe: problems with setparent in vb .net 2008 Pin
larry11829-Oct-13 9:09
larry11829-Oct-13 9:09 
QuestionHOW TO READ DATA FROM BCP BARCODE SCANNER Pin
Member 1035533223-Oct-13 6:30
Member 1035533223-Oct-13 6:30 
AnswerRe: HOW TO READ DATA FROM BCP BARCODE SCANNER Pin
Eddy Vluggen23-Oct-13 7:08
professionalEddy Vluggen23-Oct-13 7:08 
GeneralAdvanced Email in VB.NET Pin
Dhanish Balloo22-Oct-13 19:42
Dhanish Balloo22-Oct-13 19:42 
AnswerRe: Advanced Email in VB.NET Pin
Eddy Vluggen23-Oct-13 7:00
professionalEddy Vluggen23-Oct-13 7:00 
GeneralRe: Advanced Email in VB.NET Pin
Dhanish Balloo24-Oct-13 0:33
Dhanish Balloo24-Oct-13 0:33 
GeneralRe: Advanced Email in VB.NET Pin
Chris Quinn24-Oct-13 1:42
Chris Quinn24-Oct-13 1:42 
GeneralRe: Advanced Email in VB.NET Pin
Dhanish Balloo24-Oct-13 1:49
Dhanish Balloo24-Oct-13 1:49 
GeneralRe: Advanced Email in VB.NET Pin
Kenneth Haugland24-Oct-13 2:04
mvaKenneth Haugland24-Oct-13 2:04 
AnswerRe: Advanced Email in VB.NET Pin
Eddy Vluggen24-Oct-13 8:25
professionalEddy Vluggen24-Oct-13 8:25 
GeneralRe: Advanced Email in VB.NET Pin
Dhanish Balloo24-Oct-13 19:02
Dhanish Balloo24-Oct-13 19:02 
GeneralRe: Advanced Email in VB.NET Pin
Eddy Vluggen25-Oct-13 12:31
professionalEddy Vluggen25-Oct-13 12:31 
QuestionError displayed when trying to load Dictionary.com in my application Pin
Bitan Galactico Basak22-Oct-13 8:53
Bitan Galactico Basak22-Oct-13 8:53 
AnswerRe: Error displayed when trying to load Dictionary.com in my application Pin
scottgp22-Oct-13 9:15
professionalscottgp22-Oct-13 9:15 

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.