jamesanthony Posted November 7, 2003 Posted November 7, 2003 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 Quote
Moderators Robby Posted November 7, 2003 Moderators Posted November 7, 2003 just get rid of all the VB6.TwipsToPixelsX() and replace them with some new integers Quote Visit...Bassic Software
AndreRyan Posted November 7, 2003 Posted November 7, 2003 If that is a resizing feature then you should look into Docking and Anchoring, if it isn't then never mind. Quote .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?
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.