Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted
If that is a resizing feature then you should look into Docking and Anchoring, if it isn't then never mind.
.Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...