Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB exe will not stay on top of FoxPro application
Message
 
À
25/04/1997 13:13:35
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00029708
Message ID:
00029721
Vues:
26
>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
Fil
Voir

Click here to load this message in the networking platform