Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

How to place the Form at Top of all Windows

Author: DevASP
Download Source Code : 331_Top_most_form.zip

In this sample application you will learn how to make your form the top most form like Windows Task Manager.

Create a vb.net windows application then place a button having text “Top most” and place another button having text “Not top most”

 

  • Now just write code on button1 click event

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Me.TopMost = True

        Button1.Enabled = False

        Button2.Enabled = True

End Sub

  • Now write code on button2 click event 

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        Me.TopMost = False

        Button1.Enabled = True

        Button2.Enabled = False

End Sub

  • Now write code on form1 load event

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Button2.Enabled = False

End Sub

 

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< How to modify the Shape of Windows Form Using Visual Basic.Net

Disclaimer - Privacy
© 2002-2017 DevASP.net