473,394 Members | 2,052 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,394 software developers and data experts.

Set Form Location Causes Resize

Ok, I have kind of a weird issue I haven't seen before.
I am attempting to set the location of a new form to pop up in the same location as another.
I have code similar to the following:

Dim nextForm as New frmWizard2
nextForm.Location = lastFormLocation '<- Problem line
nextForm.ShowDialog()

Ok, everything seems hooked up properly, and this is not the first time i have done this, just the first time it hasn't worked.
When I set the location of the new form, it appears in the correct location, but it's size has changed (gotten smaller).
If I remove that line, the size is correct, but of course the form pops up wherever it wants.
I've tried SetDesktopLocation, and other various methods. Whatever I do, if I change the location of the form it changes size (clips bottom).

Anyone else ever seen anything like this?
General stuff:
VS.Net 2003
Form.FormBorderStyle=FixedSingle
Form.StartPosition = Manual
I have no code in the form that could change it's size.
I have no auto-sizers or anything else that could explain this.

Thanks.
Nov 20 '05 #1
2 1155
I guess lastFormLocation is used by other object.
try this:
nextForm.Location = New Point(lastFormLocation.x, lastFormLocation.y)
Nov 20 '05 #2
Thanks for the response.
But sadly, it is not anything like this.
The lastFormLocation is created and retrieved just prior to use.
Besides...
1. it is a Value type and wouldn't be changable outside my function anyway.
2. even if it could, that might only change the Location of the form (which is correct), but NOT the size.

"Rulin Hong" wrote:
I guess lastFormLocation is used by other object.
try this:
nextForm.Location = New Point(lastFormLocation.x, lastFormLocation.y)

Nov 20 '05 #3

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

Similar topics

2
by: honeybee | last post by:
How can I splite the form into four parts? I have already tryed to use the Splitter Component,but it doesn't works.
2
by: Jaikumar | last post by:
Hi, 1) I have created one windows application, In the main form ( form1) i have added one usercontrol (usercontrol1), In that user control i am drawing one image. 2) In the UserControl1 i am...
1
by: Andrew Venmore | last post by:
Hello, I have a base dialog form with a panel docked to the bottom with an OK and a Cancel button in it (all Modifiers=Protected, buttons' Anchor=Top,Right). At design time the size of the base...
0
by: Peter | last post by:
When my form loads I have 3 items perfectly aligned: '________________________________________________________ (Width, Height) Startup form name is "strForm" (w800, h570) Location(0, 0)...
2
by: Jason | last post by:
Hello I've created a form that serves as a front end for a DB. My question is how to resize the form, and have the control on the form resize themselves as i drag the form. I've got a status...
6
by: Rob | last post by:
I need to create a form that will resize only the verticle size of the Form and not the width. So far I'm partial to the following code. Can someone please elaborate the ??? . . . . Const...
4
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...
4
by: Rob | last post by:
I want to resize the height of a form without resizing the width, therefore I tried: Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize ...
0
by: Peter Anthony | last post by:
It seems kind of strange that if a Form is just moved that Resize events fire. This makes it hard to tell the difference betweeen resizing and moving a Form. I can understand why resizing might...
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: 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: 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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
jinu1996
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.