how can I fix two child windows in a mdi form in vb 4

Reply

Join Date: Feb 2007
Posts: 8
Reputation: ruichenma is an unknown quantity at this point 
Solved Threads: 0
ruichenma ruichenma is offline Offline
Newbie Poster

how can I fix two child windows in a mdi form in vb 4

 
0
  #1
Feb 7th, 2007
Hi,
I would like to have two child windows within one mdi form side by side, and I would like be able to control the size and not the user, how do I do this?
Last edited by ruichenma; Feb 7th, 2007 at 7:30 pm.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 185
Reputation: aparnesh is an unknown quantity at this point 
Solved Threads: 10
aparnesh's Avatar
aparnesh aparnesh is offline Offline
Junior Poster

Re: how can I fix two child windows in a mdi form in vb 4

 
0
  #2
Feb 8th, 2007
Does the MDI have any other child ? If not, you can use
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. MDIForm1.Arrange vbTileVert
to place the two childs side by side. If you need to specify the size, use the child forms' width, height, left and top properties before arranging them.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 8
Reputation: ruichenma is an unknown quantity at this point 
Solved Threads: 0
ruichenma ruichenma is offline Offline
Newbie Poster

Re: how can I fix two child windows in a mdi form in vb 4

 
0
  #3
Feb 8th, 2007
Hi thanks for the help, now I would like to display a pdf file, do you know how?
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 185
Reputation: aparnesh is an unknown quantity at this point 
Solved Threads: 10
aparnesh's Avatar
aparnesh aparnesh is offline Offline
Junior Poster

Re: how can I fix two child windows in a mdi form in vb 4

 
0
  #4
Feb 9th, 2007
To open a pdf file, or any other file which has a program associated with it, from VB, use the ShellExecute API Function.

If you want to display the pdf within your form, you either have to use an ActiveX control that can do it for you, or write the code to decipher and display the pdf file urself
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 8
Reputation: ruichenma is an unknown quantity at this point 
Solved Threads: 0
ruichenma ruichenma is offline Offline
Newbie Poster

Re: how can I fix two child windows in a mdi form in vb 4

 
0
  #5
Feb 9th, 2007
Hi thanks for the help.the ShellExecute is work fine.
but the window is floating outside the mdi,

since I use
lRet = ShellExecute(Me.hwnd, vbNullString, "c:\AN-H02.pdf", vbNullString, "c:\", 1)
can I pointing Me.hwnd to a mid child form? and how?
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 185
Reputation: aparnesh is an unknown quantity at this point 
Solved Threads: 10
aparnesh's Avatar
aparnesh aparnesh is offline Offline
Junior Poster

Re: how can I fix two child windows in a mdi form in vb 4

 
0
  #6
Feb 13th, 2007
As far as I know, you cannot use a child window hwnd for opening a separate program. ShellExecute will launch the associated program with the file specified (Adobe Acrobat usually for pdf files). You cannot open a separate application in a child form
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC