473,386 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Preventing Repaint/One Form from moving over another

Here is what I am trying to accomplish. I have an MDI application on the
left side of the client area I have a borderless form that holds a treeveiw
for navigation. When an item is selected from the treeview it opens a
seperate form. Similar to an MDI Windows Explorer. Now, I want to prevent
any for form from being moved into the area occupied by the navigation form.
I used the following code do do that...

Private Sub mdiChartDisplay_Move(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Move
If g_frmChartDisplay.Left < g_mdiNavigation.Right Then
g_frmChartDisplay.Left = g_mdiNavigation.Width
End If
End Sub

....this works however a side effect is that when moving the form over the
navigation pane you see a the flicker/ghost image of the form over the
navigation pane while moving the form. I tried using WM_SETREDRAW to stop
repainting but this had a worse effect.

So my questions...

1) Is there a better way to prevent a form from moving into the area
occupied by another form?

2) Is there a way to prevent the flicker by suspending redraw or paint?

Thanks,

Jeff
May 5 '06 #1
0 1391

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joe A | last post by:
I'm using Access 2002 on Windows XP PC, 500 megs ram, Front end/back end app. I have a simple form that draws a thermometer to indicate progress of code that is running. The thermometer form...
4
by: Bob | last post by:
Trying to repaint a form named fcon using a new filter: 'Repaint the form with the new data Forms!fcon.FilterOn = False Forms!fcon.Filter = "RecNo = " & currecno & " AND Currentvalue = -1"...
2
by: Randy | last post by:
Hello, I've got a form which has a Print button on it. When clicked, this Print button invokes the Print Priview dialog. All this works fine. The problem I'm having is that on some computers,...
4
by: MLH | last post by:
Setting form's Picture property to another file from within VBA doesn't repaint the form with new bitmap - for instance... Me.Picture = "c:\pics\MyNewPic.jpg" I tried Me.Repaint afterward,...
2
by: aaron.kempf | last post by:
hey guys i have an ETL winform in VB 2005 and it's like-- off in la-la land. i know it's doing things-- it's happily crunching away. but i'm confused about what i need to do to make the main...
7
by: Paul | last post by:
I have a VB.NET form with a DataGrid. When I toggle to Excel (for example) and then back to my application the repaint of the DataGrid is really slow. You can see the repainting happening. When...
3
by: linuxadmin | last post by:
hello! i want to be able to repaint a class, derived from a form, by myself. it works automatically, when i do: protected override void OnPaint(PaintEventArgs e){ base.OnPaint(e); Graphics...
0
by: =?Utf-8?B?RWl0YW4=?= | last post by:
Hello, I created a Modal form (WinForm). I would like to prevent the user from moving the form around on the screen. How would I do that? Thanks, EitanB
4
by: drexlin | last post by:
Hi, I hope this is the correct place to post questions about visual c++ 6.0. If not, sorry. Anyway, the program I am working on takes messages from another computer and prints them on the screen....
0
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.