473,800 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.fraPositio nControl.Left
If Form.InsideWidt h < Form.fraPositio nControl.Width Then
Form.InsideWidt h = Form.fraPositio nControl.Width
End If
Form.fraPositio nControl.Left = (Form.InsideWid th -
Form.fraPositio nControl.Width) / 2
For Each Control In Form.Controls
If Control.Name <> "fraPositionCon trol" Then
Control.Left = Form.fraPositio nControl.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 1380

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

Similar topics

5
5199
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) the controls inside the iframe do not resize. However, if I view the source.html by itself I'm able to resize both text and input box size. I'm using IE 6.0, but this is also broken on Netscape 7.0 as well. Can anyone think of work arounds...
1
2393
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 such as Textbox, label, groupbox) 2. I copied the project to a PC installed with korean XP Pro.
7
2334
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 between the two subforms. But I put my mind to this again recently and came up with a solution (code below) that works well with multiple subforms to size both the heights and widths of the sunforms relative to each other, and it uses no additional...
5
1022
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 VB?(NOOOOOOOOOOOOO) Thanks Gordon
2
1840
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 that is drawn in the same function works fine when I resize the screen (some lines and so on) but the labels remain. I tried deleting them by putting the following in the forms' resize event (the labels are the only "controls" on the form): for...
15
6523
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 accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then i added this line "" before my custom control class (i dont know what this line does). Now
3
8117
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 professional applications. First, you'll need to prepare the PowerPoint files. Make sure you are not using any complicated gradients or animations. These will be interpreted poorly when they are brought into Flash. Also, make sure there are no objects that...
14
2362
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 user runs this application on his pc it looks horrible and wierd because his Resolution is 800x600. I found a snippet on this forum to resize the window but that just isn't what i'm looking for - i want the controls and form both to resize...
10
44089
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 screen. I used to write code in Java a few years ago (2005), and you could stretch a form with the mouse and all the controls and fonts would resize to larger or smaller size. Does .Net framework 3.5 support this kind of functionality? Or -...
0
9690
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10274
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10251
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10033
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.