Click here to Skip to main content
15,924,039 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: waveOutGetDevCaps Pin
Anonymous17-Aug-04 6:53
Anonymous17-Aug-04 6:53 
GeneralRe: waveOutGetDevCaps Pin
mivey417-Aug-04 9:11
mivey417-Aug-04 9:11 
GeneralRe: waveOutGetDevCaps Pin
Anonymous17-Aug-04 9:34
Anonymous17-Aug-04 9:34 
GeneralRe: waveOutGetDevCaps Pin
Anonymous17-Aug-04 9:59
Anonymous17-Aug-04 9:59 
GeneralRe: waveOutGetDevCaps Pin
Anonymous17-Aug-04 10:24
Anonymous17-Aug-04 10:24 
GeneralRe: waveOutGetDevCaps Pin
mivey418-Aug-04 6:25
mivey418-Aug-04 6:25 
GeneralNeed to switch between Applications Pin
awhucks17-Aug-04 4:49
awhucks17-Aug-04 4:49 
GeneralRe: Need to switch between Applications Pin
Pablo.ar17-Aug-04 6:48
Pablo.ar17-Aug-04 6:48 
Try this API code:


-------- 8< paste on a module 8< ------------------------------------------
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, y, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Const TOPMOST_FLAGS = SWP_NOMOVE Or SWP_NOSIZE

Public Sub MakeNormal(hwnd As Long)
SetWindowPos hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub
Public Sub MakeTopMost(hwnd As Long)
SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub
-------- 8< paste on a module 8< ------------------------------------------

now, whenever you need it, call MakeTopMost(frmMain.hWnd), and if you need to 'free' the window, not being 'Always on top' anymore, call
MakeNormal(frmMain.hWnd), that´s it!
btw, if you close the app, and you never free-ed the window, nothing happens, in case you are wondering... Poke tongue | ;-P
Pablo.Ar
PS: I got this code from someone else, of course. Glad to have a chance to pass it along.
GeneralRe: Need to switch between Applications Pin
awhucks17-Aug-04 7:36
awhucks17-Aug-04 7:36 
GeneralRe: Need to switch between Applications Pin
awhucks17-Aug-04 7:51
awhucks17-Aug-04 7:51 
GeneralRe: Need to switch between Applications Pin
Pablo.ar17-Aug-04 16:16
Pablo.ar17-Aug-04 16:16 
Generaltransactions causing exceptions Pin
kowplunk17-Aug-04 4:45
kowplunk17-Aug-04 4:45 
GeneralRe: transactions causing exceptions Pin
Dave Kreskowiak17-Aug-04 5:29
mveDave Kreskowiak17-Aug-04 5:29 
GeneralRe: transactions causing exceptions Pin
kowplunk17-Aug-04 10:23
kowplunk17-Aug-04 10:23 
Questionreload datagrid? Pin
Lisana17-Aug-04 4:40
Lisana17-Aug-04 4:40 
Questionrecieving data in a network stream?? Pin
ineedhelp17-Aug-04 0:04
ineedhelp17-Aug-04 0:04 
AnswerRe: recieving data in a network stream?? Pin
Dave Kreskowiak17-Aug-04 4:16
mveDave Kreskowiak17-Aug-04 4:16 
QuestionSlow retrieval of records??? Pin
pry50416-Aug-04 22:07
pry50416-Aug-04 22:07 
GeneralConvert Hex to Decimal Pin
sumiko16-Aug-04 22:02
sumiko16-Aug-04 22:02 
GeneralRe: Convert Hex to Decimal Pin
Dave Kreskowiak17-Aug-04 4:02
mveDave Kreskowiak17-Aug-04 4:02 
GeneralRe: Convert Hex to Decimal Pin
sumiko31-Aug-04 21:15
sumiko31-Aug-04 21:15 
QuestionHow to make a service Pin
Murtuza Husain Miyan Patel16-Aug-04 20:27
professionalMurtuza Husain Miyan Patel16-Aug-04 20:27 
AnswerRe: How to make a service Pin
Dave Kreskowiak17-Aug-04 3:42
mveDave Kreskowiak17-Aug-04 3:42 
GeneralRe: How to make a service Pin
Murtuza Husain Miyan Patel17-Aug-04 6:16
professionalMurtuza Husain Miyan Patel17-Aug-04 6:16 
GeneralRe: How to run Vb app as a service Pin
Murtuza Husain Miyan Patel17-Aug-04 6:18
professionalMurtuza Husain Miyan Patel17-Aug-04 6:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.