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

  • Thread starter Thread starter Carlos
  • Start date Start date
C

Carlos

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_Resize(ByVal sender As Object, ByVal e As
System.EventArgs) 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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top