Click here to Skip to main content
16,005,037 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: IRDA Pin
monn27-Apr-04 14:34
monn27-Apr-04 14:34 
GeneralRe: IRDA Pin
Dave Kreskowiak27-Apr-04 16:48
mveDave Kreskowiak27-Apr-04 16:48 
GeneralClosing All Child Forms Pin
LaptopBoy31126-Apr-04 12:33
LaptopBoy31126-Apr-04 12:33 
GeneralRe: Closing All Child Forms Pin
Dave Kreskowiak26-Apr-04 14:52
mveDave Kreskowiak26-Apr-04 14:52 
GeneralType casting in VB Pin
lnong26-Apr-04 11:19
lnong26-Apr-04 11:19 
GeneralRe: Type casting in VB Pin
Dave Kreskowiak26-Apr-04 11:45
mveDave Kreskowiak26-Apr-04 11:45 
GeneralVB.net App on absolute top Pin
QazYseult26-Apr-04 8:23
QazYseult26-Apr-04 8:23 
GeneralRe: VB.net App on absolute top Pin
Dave Kreskowiak26-Apr-04 12:00
mveDave Kreskowiak26-Apr-04 12:00 
If it's a DirectX app that runs full screen, your out of luck.

But if it's running in a window, then, in VB.NET, you can set your form to be on top of all other windows by setting its TopMost property to True. If you're using VB6, then you'll have to call into the Windows API to make your window the topmost. Something like this:
Option Explicit

' Declare function calls into the Win32 API.
Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

' Define the constants used by SetWindowPos.
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const SWP_NOSIZE = &H1
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOZORDER = &H4
Public Const SWP_NOREDRAW = &H8
Public Const SWP_NOACTIVATE = &H10
Public Const SWP_SHOWWINDOW = &H40
Public Const SWP_HIDEWINDOW = &H80


'
'  Make our window the topmost window on the screen.
'
Public Sub MakeTopMostWindow(frmForm As Form)
    With frmForm
        ' Tag our window as as TopMost and not to swap its position
        ' in the Z-Order with any other window
        SetWindowPos frmForm.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOSIZE Or SWP_NOMOVE
    End With
End Sub



RageInTheMachine9532
GeneralRe: VB.net App on absolute top Pin
QazYseult26-Apr-04 18:57
QazYseult26-Apr-04 18:57 
GeneralProperty page Pin
I_Need_ Help26-Apr-04 5:59
sussI_Need_ Help26-Apr-04 5:59 
GeneralVB.NET Standard Pin
Richard Day26-Apr-04 5:15
Richard Day26-Apr-04 5:15 
GeneralRe: VB.NET Standard Pin
Dave Kreskowiak26-Apr-04 6:28
mveDave Kreskowiak26-Apr-04 6:28 
Generalprocesses and windows services Pin
stuartco00726-Apr-04 1:45
stuartco00726-Apr-04 1:45 
GeneralRe: processes and windows services Pin
Dave Kreskowiak26-Apr-04 4:00
mveDave Kreskowiak26-Apr-04 4:00 
Generalcheck and vote !! Pin
Hesham Amin26-Apr-04 1:02
Hesham Amin26-Apr-04 1:02 
GeneralYour .NET Add-In Wishes Pin
cnurse25-Apr-04 21:13
cnurse25-Apr-04 21:13 
GeneralI'm Running Out of Memory (Beginner) Pin
qwerty111025-Apr-04 17:29
qwerty111025-Apr-04 17:29 
GeneralRe: I'm Running Out of Memory (Beginner) Pin
Dave Kreskowiak26-Apr-04 3:56
mveDave Kreskowiak26-Apr-04 3:56 
GeneralDefining a start page for WebBrowser control Pin
preid125-Apr-04 13:07
preid125-Apr-04 13:07 
GeneralRe: Defining a start page for WebBrowser control Pin
preid125-Apr-04 13:22
preid125-Apr-04 13:22 
GeneralDesperately need help making a transport event sink !! Pin
ingerXP25-Apr-04 10:03
ingerXP25-Apr-04 10:03 
GeneralMIDI and VB.net Pin
Nadroj25-Apr-04 9:54
Nadroj25-Apr-04 9:54 
GeneralProblem with flickering when loading images. Pin
coopsqc25-Apr-04 8:33
coopsqc25-Apr-04 8:33 
GeneralUserControl in vb 6.0 and UserControl in vb.net Pin
god4k25-Apr-04 5:03
god4k25-Apr-04 5:03 
QuestionDataView Vs DataTable in vb.net - what to choose ? Pin
Mohan G25-Apr-04 0:59
Mohan G25-Apr-04 0:59 

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.