>I wrote a program in VB that has a form to select a com port, but when I try to run it from FoxPro it drops behind the FoxPro Application Window.
>
>This is the command I use to call the VB program
>
>RUN /N wincomm.exe
>
I don't think that is much you can do in Foxpro to accomplish that. However, making the VB form stay "Always on Top" will do it.
This is the code that I use in VB3:
In the general/declarations section of your project:
Declare Sub SetWindowPos Lib "User" (ByVal hWnd As Integer, ByVal hWndInsertAfter As Integer, ByVal x As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer)
*On Form.Activate:
If Not Formx.Visible Then Formx.Show 0
ihWnd% = Formx.hWnd
'Set Formx always on top
Call SetWindowPos(ihWnd, -1, 0, 0, 0, 0, 27)
,where Formx is your VB main form.
HTH
Sorin
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement