473,378 Members | 1,156 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,378 software developers and data experts.

Controls Flash Out Of Place On Form Resize

Hi all.

I'm designing a program that has to run on multiple resolutions and I'm
having trouble with moving contols on the form.

The way I have it now, the form is maximized on load, and the following
code is run when the form is resized (incl. on load of course):

Public Sub CenterControls(ByVal Form As Form)
Dim intFrameLeft As Integer
Dim Control As Control
intFrameLeft = Form.fraPositionControl.Left
If Form.InsideWidth < Form.fraPositionControl.Width Then
Form.InsideWidth = Form.fraPositionControl.Width
End If
Form.fraPositionControl.Left = (Form.InsideWidth -
Form.fraPositionControl.Width) / 2
For Each Control In Form.Controls
If Control.Name <> "fraPositionControl" Then
Control.Left = Form.fraPositionControl.Left + (Control.Left
- intFrameLeft)
End If
Next Control
Form.Visible = True
End Sub

This centers the controls without issue, but there is a brief flash
where the controls can be seen in their original position and then
reappear centered. I made a temporary fix of this by making controls
invisible in design and making them visible again on load. This works
beautifully, if kinda sloppy.

The problem is when I return to a form having already left it, the
flash returns.

Any suggestions on what i could do / what I'm missing?

Tia

Nov 13 '05 #1
0 1346

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

Similar topics

5
by: Ben | last post by:
Hi, I'm having trouble with the CSS apparently not working fully on the form input fields when inside an iFRAME. The problem is that if I resize the text size on the test.html page(see below)...
1
by: Yongseung Kim | last post by:
Hi, I would like to describe as clear as I can(sorry my english is quite limited) 1. I made a project with vb.net on english XP Pro (The project has a winform with several general controls...
7
by: lauren quantrell | last post by:
A while back I got a requirement for the client to be able to adjust the relative heights of two subforms by click-dragging the mouse and I came up with a kludge solution using a border control...
5
by: Gordon | last post by:
Something strange going on at my place. The ability to move controls or resize them using CTRL,ALT,SHIFT etc does not work any longer. Anyone else seen this? Do I have to re-install...
2
by: james | last post by:
As part of my app I am programatically adding some Label controls to a form at runtime. The code for these is part of a function that is overrriding the Paint event of the form. The other stuff...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
3
by: WPeterson | last post by:
Converting PowerPoint to Flash would absolutely be a good choice to distribute your bulky PowerPoint presentations. You can do the whole PowerPoint to Flash conversion manually or with...
14
by: zubair1 | last post by:
Hello, I am want to Resize my form and form controls based on the users resolution. For example :- i am making this application in 1024x768. it obviously works and looks well too me but when my...
10
by: =?Utf-8?B?UmljaA==?= | last post by:
A lot of users at my workplace use different screen resolutions, and I build apps to use 1680 x 1050 pixels res by default. But some users are using 800 x 600, and the apps are too large for their...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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?
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...

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.