Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How can make the window(vbform) unmovable using API?

Posted on 2002-03-08
5
Medium Priority
?
234 Views
Last Modified: 2012-06-27
How can make the window(vbform) unmovable using API?
0
Comment
Question by:kkps_s
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Expert Comment

by:Madmarlin
ID: 6850309

.Moveable property

Form1.Moveable = false.
0
 
LVL 1

Expert Comment

by:Madmarlin
ID: 6850310
Ah sorry didnt read it all..
0
 
LVL 4

Expert Comment

by:WolfgangKoenig
ID: 6850483
I have tested it and figured out, that you can't reset the
windows WS_EX_NODRAG flag during runtime. I think you can only set this attribute during a CreateWindowEx Api call which creates the window ... Resetting the attribute with this code bring no results because my explanations above:

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_NODRAG = &H40000000

Private Sub Form_Activate()
 Call SetWindowLong(Me.hwnd, GWL_EXSTYLE, WS_EX_NODRAG)
End Sub


;)
WoK
0
 
LVL 5

Expert Comment

by:kcm76
ID: 6851333
try other ways. like
u can always disable/hide the move menuitem in the system menu of the dialog box. also the hide the mousecursor in the dialog bar.

KCM
0
 
LVL 8

Accepted Solution

by:
glass_cookie earned 225 total points
ID: 6852225
Hi!

Here's a file for you over the net:

Download...
http://www.vb-helper.com/HowTo/nomove.zip
Description: Prevent a form from moving (3K)

That's it!

glass cookie : )
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question