VB6 Code

jamesanthony

Freshman
Joined
Jun 9, 2003
Messages
25
Hi
Probably being lazy but some things can be so easy when you know how.
Can you maybe help with this. It works in VB6 but does'nt in .NET
It basically resizes all forms opened to the same height etc.

Sub BuildMenu(ByRef CurrForm As Windows.Forms.Form)
Dim KilBackGnd As Object
On Error Resume Next
With CurrForm
.Left = VB6.TwipsToPixelsX(0) : .Top = VB6.TwipsToPixelsY(-260) : .Width = VB6.TwipsToPixelsX(18000) : .Height = VB6.TwipsToPixelsY(14500) : .Show()
End With
With CurrForm.Picture1
.Left = VB6.TwipsToPixelsX(120)
.Top = VB6.TwipsToPixelsY(120)
.Height = VB6.TwipsToPixelsY(900)
.Width = VB6.TwipsToPixelsX(950)
End With
With CurrForm.Picture2
.Left = VB6.TwipsToPixelsX(12570)
.Top = VB6.TwipsToPixelsY(120)
.Height = VB6.TwipsToPixelsY(900)
.Width = VB6.TwipsToPixelsX(950) : End With
CurrForm.Picture1.Visible = True
CurrForm.Picture2.Visible = True
With CurrForm.cmdClose
.Left = VB6.TwipsToPixelsX(7000)
.Top = VB6.TwipsToPixelsY(9000)
.Height = VB6.TwipsToPixelsY(615)
.Width = VB6.TwipsToPixelsX(615) : End With
With CurrForm.Label1
.height = 1000
.Width = 12000
.Label1.Font = "Tahoma"
.Alignment = vbCenter
.Left = 1200
.ForeColor = 777 : End With
CurrForm.Label1.Caption = GlobalCompanyName CurrForm.Label1.Caption
End Sub
 
If that is a resizing feature then you should look into Docking and Anchoring, if it isn't then never mind.
 
Back
Top