Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Win API / August 2008



Tip: Looking for answers? Try searching our database.

SetParent Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ferio - 07 Aug 2008 18:38 GMT
I have one vb project and one compiled exe project. I have a problem setting
the parent of the compiled exe program to my vb project. I know my setparent
code works with notepad and other non vb program but it doest work for a
compiled vb project exe. Can someone give me some advice on this ?

Thanks in advance!
KenHalter - 07 Aug 2008 19:06 GMT
>I have one vb project and one compiled exe project. I have a problem setting
>the parent of the compiled exe program to my vb project. I know my setparent
>code works with notepad and other non vb program but it doest work for a
>compiled vb project exe. Can someone give me some advice on this ?
>
>Thanks in advance!

You'll need to define "doesn't work".
Ferio - 07 Aug 2008 19:28 GMT
Is there anyway to work around it?

>>I have one vb project and one compiled exe project. I have a problem setting
>>the parent of the compiled exe program to my vb project. I know my setparent
[quoted text clipped - 4 lines]
>
>You'll need to define "doesn't work".
KenHalter - 07 Aug 2008 20:41 GMT
>Is there anyway to work around it?

Most likely... that is, if you post details that describe what "it" is... you
still haven't mentioned exactly what "doesn't work" means.

*What* doesn't work? *Why* do you think it's not working? *What* results do
you expect?

Can't read minds around here and we can't see your app, code, desktop,
monitor or anything else. All we have to go on at this point is.... "it
doesn't work", which leaves about 2 billion possibilites.
Ferio - 07 Aug 2008 21:22 GMT
Sorry I thought you meant it "doesn't work". What happens is it fails to
change the parent of the .exe vb project. After the exe file executes, it is
still a desktop window. I want to make it part of my vb project(setting the .
exe project's parent to me.hwnd), and I'm able to get notepad.exe to work. My
VB project is a form(non MDI) , the .exe vb project is also a form(non MDI).

>>Is there anyway to work around it?
>
[quoted text clipped - 7 lines]
>monitor or anything else. All we have to go on at this point is.... "it
>doesn't work", which leaves about 2 billion possibilites.
KenHalter - 08 Aug 2008 18:52 GMT
>Sorry I thought you meant it "doesn't work". What happens is it fails to
>change the parent of the .exe vb project. After the exe file executes, it is
>still a desktop window. I want to make it part of my vb project(setting the .
>exe project's parent to me.hwnd), and I'm able to get notepad.exe to work. My
>VB project is a form(non MDI) , the .exe vb project is also a form(non MDI).

It surely sounds like you're getting the wrong value when you attempt to get
that apps hWnd.

Try running and placing a breakpoint near the SetParent call... compare the
hWnd you're using to the one shown by Spy++.
Ferio - 12 Aug 2008 00:52 GMT
I found the problem, it was not getting the correct handle. Thanks for the
Help!

>>Sorry I thought you meant it "doesn't work". What happens is it fails to
>>change the parent of the .exe vb project. After the exe file executes, it is
[quoted text clipped - 7 lines]
>Try running and placing a breakpoint near the SetParent call... compare the
>hWnd you're using to the one shown by Spy++.
MikeD - 08 Aug 2008 00:56 GMT
> Can't read minds around here and we can't see your app, code, desktop,
> monitor or anything else. All we have to go on at this point is.... "it
> doesn't work", which leaves about 2 billion possibilites.

I think you underestimated.  <g>

Signature

Mike
Microsoft MVP Visual Basic

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.