I would like to know that how can I get a form on top of all other windows in such a manner that no new window can appear over it using visual basic
1 1096
Hi there,
Kindly refer to below code segment, hope it helps. Good luck & Take care. -
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
-
-
-
-
-
-
-
-
-
Global Const SWP_NOMOVE = 2
-
-
-
Global Const SWP_NOSIZE = 1
-
-
-
Global Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
-
-
-
Global Const HWND_TOPMOST = -1
-
-
-
Global Const HWND_NOTOPMOST = -2
-
-
-
-
-
-
-
-
-
Public Sub MakeTopMost(f As Form, v As Boolean)
-
-
-
Dim success As Long
-
-
-
-
-
-
If v Then
-
-
-
success = SetWindowPos(f.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
-
-
-
Else
-
-
-
success = SetWindowPos(f.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS)
-
-
-
End If
-
-
End Sub
-
I would like to know that how can I get a form on top of all other windows in such a manner that no new window can appear over it using visual basic
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Chris |
last post by:
Hi,
I'm trying to append text from another class to a generic richTextBox that
I've added to a Windows form. I can't seem to figure out how to expose the
richTextBox to append text to it.
...
|
by: RAJ |
last post by:
hi
plz tell me how to know "how window is going to close"...
i have to right code for X button of forms...
plz telll me
thanks
bye
|
by: Johnny |
last post by:
I'm a rookie at C# and OO so please don't laugh! I have a form
(fclsTaxCalculator) that contains a text box (tboxZipCode) containing a zip
code. The user can enter a zip code in the text box and...
|
by: Özden Irmak |
last post by:
Hello,
In my VB.Net application I create a new instance of my form like :
NewForm = new MyNewForm()
But with this line, this new form is automatically shown. I want it to be
hidden at the...
|
by: Amiram Korach |
last post by:
When you create a MDI form, you can attach a main menu to the parent and to
the child. When a child form is active, its menu is merged with the parent
menu.
The problem is: when the forms are...
|
by: Rod Gill |
last post by:
Hi,
I have a form that when opened in the designer appears of the screen. The
form selector can't be dragged (or resized) and if I scroll right and down
to centralise it the form simply jumps...
|
by: Philip Wagenaar |
last post by:
I have made a form with a tab that containts groupboxes and those contain
checkboxes.
When I run the application sometimes the outlining for some groupboxes are
not shown, if I switch tabs and...
|
by: Terry |
last post by:
I have a Mainform with a Statusbar. When opening another form or doing some
processing I want to display info in the Statusbar of the Mainform. I have
read a lot of articles on this & have come up...
|
by: dbuchanan |
last post by:
VS2005
I've been reading all the help I can on the topic (MSDN, other) but I
can't make sense of this.
Desired behavior;
The user is to choose from the displayed list of the databound combobox...
|
by: Ryan |
last post by:
Ok.. I have a form with lots of stuff on it; a tool strip panel, menu strip,
data binding elements (dataset, binding source, table adapter), tab control
with 7 tab pages, each page contains a...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |