Print Page | Close Window

Form on top

Printed From: Mirage Source
Category: Tutorials
Forum Name: Submitted Tutorials
Forum Discription: Tutorial submissions for MSE are posted here, waiting for approval
URL: http://ms.shannaracorp.com/backup-forums/forum_posts.asp?TID=30
Printed Date: 20 December 2006 at 6:02pm
Software Version: Web Wiz Forums 8.01 - http://www.webwizforums.com


Topic: Form on top
Posted By: Sync
Subject: Form on top
Date Posted: 07 February 2006 at 5:28pm
Originally posted by Jourdan

add this to that form

Public Sub alwaysontop(Form1 As Form, SetOnTop As Boolean)
If SetOnTop Then
    lFlag = HWND_TOPMOST
Else
    lFlag = HWND_NOTOPMOST
End If

    SetWindowPos Me.hwnd, lFlag, Me.Left / Screen.TwipsPerPixelX, _
    Me.Top / Screen.TwipsPerPixelY, Me.Width / Screen.TwipsPerPixelX, _
    Me.Height / Screen.TwipsPerPixelY, SWP_NOACTIVATE Or SWP_SHOWWINDOW
End Sub


form_load :

alwaysontop me, true






Replies:
Posted By: Sync
Date Posted: 07 February 2006 at 5:29pm
I think this is missing an API declare somewhere ...



Print Page | Close Window

Bulletin Board Software by Web Wiz Forums version 8.01 - http://www.webwizforums.com
Copyright ©2001-2006 Web Wiz Guide - http://www.webwizguide.info