473,670 Members | 2,331 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

redimensionar (resize) controles en vb.net en tiempo de ejecucion

Me pasa lo siguiente:
Instancio un formulario
y cuando se dispara el evento resize redimensiono mis controles
pero no se porque se me desplazan un poco abajo
despues cuando redimensiono el formulario con el mouse ya se me
posicionan bien solo se colocan mal la primera vez
alguien sabe porque pasa

el codigo es:

Private Sub fmIngresos_Resi ze(ByVal sender As Object, ByVal e As
System.EventArg s) Handles MyBase.Resize
With gbTop
.Top = 45
.Left = 5
.Width = Me.Width - 17
End With
With oGrid
.Top = gbTop.Top + gbTop.Height + 3
.Left = gbTop.Left
.Width = gbTop.Width
.Height = Me.Height - .Top - 40
End With
End Sub
Gracias
Nov 21 '05 #1
2 10281
Carlos,

Este grupo es en inglés. Pregunta en los grupos en español que tienen ".es"
en el nombre.

(This is an English group. Ask in the Spanish groups with ".es" inside the
name.)

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com

"Carlos" <ca******@hotma il.com> escribió en el mensaje
news:52******** *************** ***@posting.goo gle.com...
Me pasa lo siguiente:
Instancio un formulario
y cuando se dispara el evento resize redimensiono mis controles
pero no se porque se me desplazan un poco abajo
despues cuando redimensiono el formulario con el mouse ya se me
posicionan bien solo se colocan mal la primera vez
alguien sabe porque pasa

el codigo es:

Private Sub fmIngresos_Resi ze(ByVal sender As Object, ByVal e As
System.EventArg s) Handles MyBase.Resize
With gbTop
.Top = 45
.Left = 5
.Width = Me.Width - 17
End With
With oGrid
.Top = gbTop.Top + gbTop.Height + 3
.Left = gbTop.Left
.Width = gbTop.Width
.Height = Me.Height - .Top - 40
End With
End Sub
Gracias

Nov 21 '05 #2
primaramente, Carlos, estoy pensando esto.
Porque no solo fijas el grid usando Anchor y Dock properties?

Asi se redimensionara solo, y este codigo no sera necesario, verdad?

espero que le ayude,

Shane

"Carlos" <ca******@hotma il.com> wrote in message
news:52******** *************** ***@posting.goo gle.com...
Me pasa lo siguiente:
Instancio un formulario
y cuando se dispara el evento resize redimensiono mis controles
pero no se porque se me desplazan un poco abajo
despues cuando redimensiono el formulario con el mouse ya se me
posicionan bien solo se colocan mal la primera vez
alguien sabe porque pasa

el codigo es:

Private Sub fmIngresos_Resi ze(ByVal sender As Object, ByVal e As
System.EventArg s) Handles MyBase.Resize
With gbTop
.Top = 45
.Left = 5
.Width = Me.Width - 17
End With
With oGrid
.Top = gbTop.Top + gbTop.Height + 3
.Left = gbTop.Left
.Width = gbTop.Width
.Height = Me.Height - .Top - 40
End With
End Sub
Gracias

Nov 21 '05 #3

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

Similar topics

4
3398
by: Peter Mrosek | last post by:
Hello, I have the following declaration in an header file (abbreviated version): typedef struct { unsigned char rgbBlue; unsigned char rgbGreen; unsigned char rgbRed; unsigned char rgbReserved;
3
3260
by: Z D | last post by:
Hello, BACKGROUND: ============== I've created a Windows User Control that contains an Image Control (among other controls). The user control handles the picture resize event. Whenever the parent that holds my user control is resized, I resize my image so that it uses the maximum available space. Note: It takes about 2 seconds to regenerate the
4
3480
by: Rob Richardson | last post by:
Greetings! I have a form with a listview, a menu, and a few text boxes, labels and command buttons. I want to resize the listview when the form is resized to that the widths of the spaces between the borders of the listview and the borders of the form remain constant. I am finding this to be unexpectedly hard. For one thing, I initialized some values in the form's Load event, and I'm doing the control resizing in the form's Resize...
15
5337
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run from the upload function: A generic error occurred in GDI+. Not sure what exactly that means. From what...
12
14437
by: Maxwell2006 | last post by:
Hi, I declared an array like this: string scriptArgs = new string; Can I resize the array later in the code? Thank you, Max
2
2654
by: mrbrightsidestolemymoney | last post by:
Hi, I'm having a problem resizing a (very big) nested vector. It's not the most streamlined piece of code ever but I need this array to avoid having to recalculate the same quantity millions of times! The (relevant) snippets of code are below : since it's relevant though L=28,T=96 (so TasteProps weighs in at a hefty 8*96*28*28*28*96=1,618,477,056 doubles )
3
2473
by: Jim Langston | last post by:
I really am not sure if this question belongs in this newsgroup, but not sure where else to ask it. There is someone working on a game that I tested, and it was taking >30 seconds to load. He stated that everyone else was taking 2 or 3 seconds. Then he found one other person taking >30 seconds, and it turns out the common denominator was both of us have Intel chips (Celeron) where the other people have AMD. I had him send me his code...
0
973
by: Paya | last post by:
Hi, I am developing web application for our firm. I am using VS 2005 (ASP.NET and C#). For some reasons I have problem when I am launching application from IE 7. Basically Panels (which have bunch of other controles) and Drop Down list Hight are messed up. They are shirnk to minimum size so the User Interface is ugly and not usable. I tried same application on IE 6.0 and it is fine. Does anyone have the same problem? I checked these user...
1
2037
by: | last post by:
I'm creating a user control where the size always needs to be divisible by three. In the resize event within the custom control I'm having no problem maintaining the height to be the same as the width, but as soon as I try to add some code to make sure that the width is always divisible by three, VS crashes. How can I force the width 9and height) to always be a factor of three? Thanks. J
0
8471
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
8388
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
8907
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8817
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...
0
7423
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4215
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...
0
4396
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2804
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
1799
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.