Can someone help me re-write VB4 to VB.NET?

  • Thread starter Thread starter kurt
  • Start date Start date
K

kurt

I have a program I’ve written in VB-4 and am now trying to re-write in VB..NET 2005
Some of what I can’t seem to figure out is how do I transcribe the following VB-4 code to run in my VB.NET program, any and all help is appreciated.Thank you.
'*************************************************
' Keep within screen viewing
Dim maxNormalWidth As Long, maxNormalHeight As Long
Dim deskArea As RECT
Call SystemParametersInfo(SPI_GETWORKAREA, 0&, deskArea, 0&)
deskArea.Left = ScaleX(deskArea.Left, vbPixels, vbTwips)
deskArea.Top = ScaleY(deskArea.Top, vbPixels, vbTwips)
deskArea.Right = ScaleX(deskArea.Right, vbPixels, vbTwips)
deskArea.Bottom = ScaleY(deskArea.Bottom, vbPixels, vbTwips)
maxNormalWidth = (deskArea.Right - deskArea.Left)
maxNormalHeight = (deskArea.Bottom - deskArea.Top)
If Me.Width > maxNormalWidth Then
Me.Width = maxNormalWidth
End If
If Me.Height > maxNormalHeight Then
Me.Height = maxNormalHeight
End If
Me.Left = deskArea.Left + (deskArea.Right - deskArea.Left - Me.Width) /2
Me.Top = deskArea.Top + (deskArea.Bottom - deskArea.Top - Me.Height) / 2
'**************************************************
 
Can someone help me by telling me where I can find the MSINET.OCX file that I have added to my re-work but now don't know where to get it within the VB.NET program?

I added it to the program, but now don't know how to get it to apply it to the form within VB.NET.
Any and all help is appreciated. Thank you.
 
Can someone please help me out here, I’ve got this VB4 code I’m trying to re-do in VB.NET and find that the following VB4,6 code does not work,

Drive = App.Path & "\User_Files\profile.bda"
Open Drive For Input As #1
Input #1, dat4, Abackup, TimeHide, WhatRunmin, autorun, cleanwhen, ClockC1, Sbillboard, monthly1, monthly2, monthly3, monthly4, showmonthlies, past1, past2, past3, past4, different_day, Blink, unused3, unused4
Close #1

I’ve tried to rewrite it but not getting to far, here is what I’ve got but don’t know if it’s right either.

Drive = Application.StartupPath & "\User_Files\profile.bda"
Drive.OpenFile(Drive)
Input #1, dat4, Abackup, TimeHide, WhatRunmin, autorun, cleanwhen, ClockC1, Sbillboard, monthly1, monthly2, monthly3, monthly4, showmonthlies, past1, past2, past3, past4, different_day, Blink, unused3, unused4
Close #1
 
Back
Top