Click here to Skip to main content
15,905,427 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionFrom String to Type Pin
Curse4Life6-Jan-07 1:53
Curse4Life6-Jan-07 1:53 
AnswerRe: From String to Type Pin
Colin Angus Mackay6-Jan-07 3:09
Colin Angus Mackay6-Jan-07 3:09 
GeneralRe: From String to Type Pin
Curse4Life6-Jan-07 7:43
Curse4Life6-Jan-07 7:43 
GeneralRe: From String to Type Pin
Colin Angus Mackay6-Jan-07 7:52
Colin Angus Mackay6-Jan-07 7:52 
GeneralRe: From String to Type Pin
Curse4Life6-Jan-07 9:11
Curse4Life6-Jan-07 9:11 
GeneralRe: From String to Type Pin
Colin Angus Mackay6-Jan-07 13:59
Colin Angus Mackay6-Jan-07 13:59 
QuestionAxMsFlexGrid Pin
K edar V6-Jan-07 1:26
K edar V6-Jan-07 1:26 
QuestionCall win32 function from vb.net Pin
shabyb6-Jan-07 0:42
shabyb6-Jan-07 0:42 
I try to call SetParent window api.
I use this code:

Private Declare Function SetParent Lib "user32" _<br />
       (ByVal hWndChild As Long, _<br />
       ByVal hWndNewParent As Long) As Long<br />
 <br />
Private Sub Form1_Load1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
        Dim lngStyle As Long<br />
        Dim c As Object<br />
        'Dim lngStatusBar As Long<br />
<br />
        mobjXL = New Excel.Application<br />
        mobjXL.Caption = "Main"<br />
      <br />
        mlngXLHwnd = FindWindow("XLMAIN", "Main")<br />
        SetParent(mlngXLHwnd, Me.Handle)<br />
<br />
        lngStyle = GetWindowLong(mlngXLHwnd, GWL_STYLE)<br />
<br />
        lngStyle = lngStyle Xor WS_CAPTION<br />
        lngStyle = lngStyle Xor WS_SIZEBOX<br />
<br />
        SetWindowLong(mlngXLHwnd, GWL_STYLE, lngStyle)<br />
End Sub

When I call the function SetParent I got error:
PInvokeStackImBalance was detected

What is wrong in this line?
AnswerRe: Call win32 function from vb.net Pin
Duncan Edwards Jones6-Jan-07 1:40
professionalDuncan Edwards Jones6-Jan-07 1:40 
AnswerRe: Call win32 function from vb.net Pin
shabyb6-Jan-07 4:41
shabyb6-Jan-07 4:41 
GeneralRe: Call win32 function from vb.net Pin
Duncan Edwards Jones6-Jan-07 9:08
professionalDuncan Edwards Jones6-Jan-07 9:08 
AnswerRe: Call win32 function from vb.net Pin
shabyb6-Jan-07 10:56
shabyb6-Jan-07 10:56 
GeneralRe: Call win32 function from vb.net Pin
Duncan Edwards Jones6-Jan-07 11:30
professionalDuncan Edwards Jones6-Jan-07 11:30 
AnswerRe: Call win32 function from vb.net Pin
Thomas Stockwell6-Jan-07 8:21
professionalThomas Stockwell6-Jan-07 8:21 
GeneralRe: Call win32 function from vb.net Pin
shabyb6-Jan-07 11:01
shabyb6-Jan-07 11:01 
GeneralRe: Call win32 function from vb.net Pin
Thomas Stockwell6-Jan-07 13:51
professionalThomas Stockwell6-Jan-07 13:51 
GeneralRe: Call win32 function from vb.net Pin
shabyb7-Jan-07 5:34
shabyb7-Jan-07 5:34 
GeneralRe: Call win32 function from vb.net Pin
Thomas Stockwell7-Jan-07 8:57
professionalThomas Stockwell7-Jan-07 8:57 
GeneralRe: Call win32 function from vb.net Pin
Thomas Stockwell7-Jan-07 12:04
professionalThomas Stockwell7-Jan-07 12:04 
GeneralRe: Call win32 function from vb.net Pin
shabyb8-Jan-07 8:27
shabyb8-Jan-07 8:27 
AnswerRe: Call win32 function from vb.net Pin
Christian Graus6-Jan-07 11:00
protectorChristian Graus6-Jan-07 11:00 
Questionform problem in vb.net 2005 Pin
amaneet6-Jan-07 0:30
amaneet6-Jan-07 0:30 
AnswerRe: form problem in vb.net 2005 Pin
nagendra rao s.v.6-Jan-07 1:05
nagendra rao s.v.6-Jan-07 1:05 
AnswerRe: WYSIWIG PRINTING PROBLEM PLS READ Pin
Duncan Edwards Jones5-Jan-07 23:59
professionalDuncan Edwards Jones5-Jan-07 23:59 
GeneralRe: WYSIWIG PRINTING PROBLEM PLS READ Pin
vbbeg6-Jan-07 0:53
vbbeg6-Jan-07 0:53 

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.