SalBringWindowToTop( ... )

forum.advanced.programming (2000-2005)
NewsgroupServer
Robot
Robot
Posts: 115421
Joined: 24 Feb 2017, 12:00
Location: World wide

SalBringWindowToTop( ... )

Post by NewsgroupServer » 10 Mar 2005, 07:55

 Posted by:  Pieter Clicteur 

Hello,

When I want to switch between 2 applications (1 ctd, 1 vb) I use
SalBringWindowToTop( hWndMDI ). The Centura application does not come to
foreground though. Is there an other function to activate my application?

I use CTD 1.5.1

NewsgroupServer
Robot
Robot
Posts: 115421
Joined: 24 Feb 2017, 12:00
Location: World wide

SalBringWindowToTop( ... )

Post by NewsgroupServer » 10 Mar 2005, 08:33

 Posted by:  Mirko BONANNO 

Hi Pietr,

try hWnd = SalAppFind ( strAppName, bActivate )

HTH
Mirko

NewsgroupServer
Robot
Robot
Posts: 115421
Joined: 24 Feb 2017, 12:00
Location: World wide

SalBringWindowToTop( ... )

Post by NewsgroupServer » 10 Mar 2005, 11:03

 Posted by:  Günther Feldzahn 

WindowApi
SetWindowPos()

See Microsoft MSDN SDK description for the function parameters

NewsgroupServer
Robot
Robot
Posts: 115421
Joined: 24 Feb 2017, 12:00
Location: World wide

SalBringWindowToTop( ... )

Post by NewsgroupServer » 10 Mar 2005, 12:39

 Posted by:  Pieter Clicteur 

This is the working solution:

Set hWndTop = SalNumberToWindowHandle( HWND_TOPMOST )
Call SalGetWindowLoc( hWndItem, nX, nY )
Call SalGetWindowSize( hWndItem, nWidth, nHeight )
Set nWidth = SalFormUnitsToPixels( hWndItem, nWidth, FALSE )
Set nHeight = SalFormUnitsToPixels( hWndItem, nHeight, TRUE )
Call SetWindowPos( hWndItem, hWndTop, nX, nY, nWidth, nHeight,
SWP_SHOWWINDOW )

NewsgroupServer
Robot
Robot
Posts: 115421
Joined: 24 Feb 2017, 12:00
Location: World wide

SalBringWindowToTop( ... )

Post by NewsgroupServer » 10 Mar 2005, 13:39

 Posted by:  Christian Schubert 

Pieter,

save some lines of code ;-)

Call SetWindowPos( hWndItem, hWndTop, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
SWP_SHOWWINDOW )

HTH

Christian Schubert

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 0 guests