Results 1 to 8 of 8

Thread: [RESOLVED] Converted project from VB6 to Visual Basic.NET

  1. #1

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Resolved [RESOLVED] Converted project from VB6 to Visual Basic.NET

    Hi,

    I converted one of my projects from Visual Basic 6.0 to Visual Basic.NET and noticed stuff such as:

    'UPGRADE_WARNING: Structure PROCESS_INFORMATION may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="C429C3A5-5D47-4CD9-8F51-74A1616405DC"'
    'UPGRADE_WARNING: Structure STARTUPINFO may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="C429C3A5-5D47-4CD9-8F51-74A1616405DC"'
    Clicking on the link it talking about Imports System.Runtime.InteropServices. Which, I am guessing means the project a mixture of both .NET and .COM. How would I rewrite to be totally .Net compatible instead of relying on .COM?

    Also where would I put code in VB.NET if it was in the Form_Initialize() sub in VB6.0?

    Thanks,


    Nightwalker
    Last edited by Nightwalker83; Aug 25th, 2011 at 02:56 AM.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Converted project from VB6 to Visual Basic.NET

    I t doesn't sound like it's COM-related. It's talking about Declare statements, so that means unmanaged code but PInvoke, not COM. If you need to call Windows API functions, or unmanaged code from some other API, then you have no choice but to do so. The preferred .NET way to declare an unmanaged function is to use the DllImport attribute rather than the Declare statement, hence importing the System.Runtime.InteropServices namespace.

    It might help if you showed us the declarations of your unmanaged types and functions and also told us where they are declared and showed us the original unmanaged signatures.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Converted project from VB6 to Visual Basic.NET

    Here is the code:

    vb Code:
    1. Option Strict Off
    2. Option Explicit On
    3. Module BasMain
    4.     'Description: checks the system for the default GTA IV settings files
    5.     'and deletes them so you can play the game using the controls you define.
    6.     'Date: 04/05/2011
    7.     'Update 07/05/2011 Refined the code to remove unnecessary code.
    8.     '                  Also, remove the need for a form the code only requires a module to run.
    9.     'Update:  16/05/2011 Modified the code to use dynamic paths instead of hard coded paths.
    10.     'Update:  18/05/2011 Added a function to copy the source files to a new directory if the user is using xliveless.
    11.     'Update: 20/05/2011 Added function to retrieve the folder name of the folder containing the save files
    12.     'Update: 26/05/2011 Added command-line functions
    13.     'Update: 16/07/2011 Added code to adjust the default frame rate
    14.     'Update: 30/07/2011 The code now includes a sub to detect if the target program is still responding
    15.     '                   Added GTA IV icon
    16.     'Author: Aaron Spehr
    17.     'Alias: Nightwalker83
    18.     'Website: http://aaronspehr.net/
    19.    
    20.     Private source, destination As String
    21.     Private c, sNextFile, MyName As String
    22.     Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" (ByVal hwndOwner As Integer, ByVal nFolder As Integer, ByRef ppidl As Integer) As Integer
    23.     Private Declare Function SHGetPathFromIDList Lib "Shell32" (ByVal pidList As Integer, ByVal lpBuffer As String) As Integer
    24.     Private Declare Sub CoTaskMemFree Lib "ole32" (ByVal hMem As Integer)
    25.    
    26.     Const CSIDL_PERSONAL As Integer = &H5 '(user)\My Documents
    27.     Const CSIDL_LOCAL_APPDATA As Integer = &H1C '(user)\Local Settings\Application Data
    28.     Private Structure STARTUPINFO
    29.         Dim cb As Integer
    30.         Dim lpReserved As String
    31.         Dim lpDesktop As String
    32.         Dim lpTitle As String
    33.         Dim dwX As Integer
    34.         Dim dwY As Integer
    35.         Dim dwXSize As Integer
    36.         Dim dwYSize As Integer
    37.         Dim dwXCountChars As Integer
    38.         Dim dwYCountChars As Integer
    39.         Dim dwFillAttribute As Integer
    40.         Dim dwFlags As Integer
    41.         Dim wShowWindow As Short
    42.         Dim cbReserved2 As Short
    43.         Dim lpReserved2 As Integer
    44.         Dim hStdInput As Integer
    45.         Dim hStdOutput As Integer
    46.         Dim hStdError As Integer
    47.     End Structure
    48.    
    49.     Public Structure PROCESS_INFORMATION
    50.         Dim hProcess As Integer
    51.         Dim hThread As Integer
    52.         Dim dwProcessId As Integer
    53.         Dim dwThreadID As Integer
    54.     End Structure
    55.    
    56.     Public Declare Function WaitForSingleObject Lib "Kernel32" (ByVal hHandle As Integer, ByVal dwMilliseconds As Integer) As Integer
    57.     'API Constants
    58.     Const SMTO_BLOCK As Integer = &H1
    59.     Const SMTO_ABORTIFHUNG As Integer = &H2
    60.     Const WM_NULL As Integer = &H0
    61.     Const WM_CLOSE As Integer = &H10
    62.     Const PROCESS_ALL_ACCESS As Integer = &H1F0FFF
    63.     'API functions
    64.    
    65.     Private Declare Function SendMessageTimeout Lib "user32"  Alias "SendMessageTimeoutA"(ByVal hWnd As Integer, ByVal msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer, ByVal fuFlags As Integer, ByVal uTimeout As Integer, ByRef lpdwResult As Integer) As Integer
    66.    
    67.     'UPGRADE_WARNING: Structure PROCESS_INFORMATION may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="C429C3A5-5D47-4CD9-8F51-74A1616405DC"'
    68.     'UPGRADE_WARNING: Structure STARTUPINFO may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="C429C3A5-5D47-4CD9-8F51-74A1616405DC"'
    69.     Private Declare Function CreateProcessA Lib "Kernel32" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, ByVal lpProcessAttributes As Integer, ByVal lpThreadAttributes As Integer, ByVal bInheritHandles As Integer, ByVal dwCreationFlags As Integer, ByVal lpEnvironment As Integer, ByVal lpCurrentDirectory As String, ByRef lpStartupInfo As STARTUPINFO, ByRef lpProcessInformation As PROCESS_INFORMATION) As Integer
    70.    
    71.     Public Declare Function CloseHandle Lib "Kernel32" (ByVal hObject As Integer) As Integer
    72.    
    73.     Private Declare Function GetExitCodeProcess Lib "Kernel32" (ByVal hProcess As Integer, ByRef lpExitCode As Integer) As Integer
    74.    
    75.     Private Const NORMAL_PRIORITY_CLASS As Integer = &H20
    76.     Private Const INFINITE As Short = -1
    77.     Dim proc As PROCESS_INFORMATION
    78.     Dim start As STARTUPINFO
    79.     Dim ret As Integer
    80.     Private Structure OSVERSIONINFO
    81.         Dim dwOSVersionInfoSize As Integer
    82.         Dim dwMajorVersion As Integer
    83.         Dim dwMinorVersion As Integer
    84.         Dim dwBuildNumber As Integer
    85.         Dim dwPlatformId As Integer
    86.         'UPGRADE_WARNING: Fixed-length string size must fit in the buffer. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="3C1E4426-0B80-443E-B943-0627CD55D48B"'
    87.         <VBFixedString(128),System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray,SizeConst:=128)> Public szCSDVersion() As Char
    88.     End Structure
    89.    
    90.     Private Const OF_EXIST As Integer = &H4000
    91.     Private Const OFS_MAXPATHNAME As Integer = 128
    92.     Private Const HFILE_ERROR As Integer = -1
    93.    
    94.     Private Structure OFSTRUCT
    95.         Dim cBytes As Byte
    96.         Dim fFixedDisk As Byte
    97.         Dim nErrCode As Short
    98.         Dim Reserved1 As Short
    99.         Dim Reserved2 As Short
    100.         <VBFixedArray(OFS_MAXPATHNAME)> Dim szPathName() As Byte
    101.        
    102.         'UPGRADE_TODO: "Initialize" must be called to initialize instances of this structure. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="B4BFF9E0-8631-45CF-910E-62AB3970F27B"'
    103.         Public Sub Initialize()
    104.             ReDim szPathName(OFS_MAXPATHNAME)
    105.         End Sub
    106.     End Structure
    107.    
    108.     'UPGRADE_WARNING: Structure OFSTRUCT may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="C429C3A5-5D47-4CD9-8F51-74A1616405DC"'
    109.     Private Declare Function OpenFile Lib "Kernel32" (ByVal lpFileName As String, ByRef lpReOpenBuff As OFSTRUCT, ByVal wStyle As Integer) As Integer
    110.    
    111.     Private Function FileExists(ByVal Fname As String) As Boolean
    112.         'http://www.vbforums.com/showthread.php?t=349990
    113.         Dim lRetVal As Integer
    114.         'UPGRADE_WARNING: Arrays in structure OfSt may need to be initialized before they can be used. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="814DF224-76BD-4BB4-BFFB-EA359CB9FC48"'
    115.         Dim OfSt As OFSTRUCT
    116.        
    117.         lRetVal = OpenFile(Fname, OfSt, OF_EXIST)
    118.         If lRetVal <> HFILE_ERROR Then
    119.             FileExists = True
    120.         Else
    121.             FileExists = False
    122.         End If
    123.        
    124.     End Function
    125.    
    126.     Private Function ExecCmd(ByRef cmdline As String) As Object
    127.        
    128.         ' Initialize the STARTUPINFO structure:
    129.         start.cb = Len(start)
    130.        
    131.         ' Start the shelled application:
    132.         ret = CreateProcessA(vbNullString, cmdline, 0, 0, 1, NORMAL_PRIORITY_CLASS, 0, vbNullString, start, proc)
    133.        
    134.         ' Wait for the shelled application to finish:
    135.         ret = WaitForSingleObject(proc.hProcess, INFINITE)
    136.         Call GetExitCodeProcess(proc.hProcess, ret)
    137.         Call CloseHandle(proc.hThread)
    138.         Call CloseHandle(proc.hProcess)
    139.         'UPGRADE_WARNING: Couldn't resolve default property of object ExecCmd. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
    140.         ExecCmd = ret
    141.     End Function
    142.    
    143.     Public Sub MainLoader()
    144.        
    145.         Dim retval As Integer
    146.         Dim lngResult As Integer
    147.         Dim lngReturnValue As Integer
    148.         'Replace the path and app.name.type with that of the application you want to use
    149.         'UPGRADE_WARNING: Couldn't resolve default property of object ExecCmd(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
    150.         retval = ExecCmd("LaunchGTAIV.exe")
    151.         lngReturnValue = SendMessageTimeout(0, WM_NULL, 0, 0, SMTO_ABORTIFHUNG And SMTO_BLOCK, 1000, lngResult)
    152.         System.Windows.Forms.Application.DoEvents()
    153.         If lngReturnValue Then
    154.             Call GetPath()
    155.             Call command_Renamed()
    156.             Game_Loop()
    157.         Else
    158.             'Close the host and the client if the client does not respond
    159.             System.Windows.Forms.Application.DoEvents()
    160.             Running = False
    161.             Call GetExitCodeProcess(proc.hProcess, ret)
    162.             Call CloseHandle(proc.hThread)
    163.             Call CloseHandle(proc.hProcess)
    164.             frmAbout.Close()
    165.         End If
    166.     End Sub
    167.    
    168.     Private Function GetSpecialFolder(ByVal lCSIDL As Integer) As String
    169.         Const S_OK As Integer = 0
    170.         Const MAX_PATH As Integer = 260
    171.        
    172.         Dim sPath As String
    173.         Dim lIdl As Integer
    174.        
    175.         If SHGetSpecialFolderLocation(0, lCSIDL, lIdl) = S_OK Then
    176.             sPath = Space(MAX_PATH)
    177.             If SHGetPathFromIDList(lIdl, sPath) Then
    178.                 CoTaskMemFree(lIdl)
    179.                 GetSpecialFolder = Left(sPath, InStr(sPath, vbNullChar) - 1)
    180.             End If
    181.         End If
    182.     End Function
    183.    
    184.     Private Function GetPath() As Object
    185.         'UPGRADE_WARNING: Dir has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
    186.         If Dir(My.Application.Info.DirectoryPath & "\dsound.dll") <> "" Then
    187.             source = GetSpecialFolder(CSIDL_LOCAL_APPDATA) & "\Rockstar Games\GTA IV\"
    188.             destination = GetSpecialFolder(CSIDL_PERSONAL) & "\Rockstar Games\GTA IV\"
    189.         Else
    190.             source = GetSpecialFolder(CSIDL_LOCAL_APPDATA) & "\Rockstar Games\GTA IV\"
    191.             destination = GetSpecialFolder(CSIDL_LOCAL_APPDATA) & "\Rockstar Games\GTA IV\"
    192.         End If
    193.        
    194.         Call Delete(source)
    195.         If Not source = destination Then Call Copy(source)
    196.     End Function
    197.    
    198.    
    199.     Private Sub Delete(ByRef source As Object)
    200.         'Deletes the default settings files
    201.         Dim d As String
    202.         'UPGRADE_WARNING: Couldn't resolve default property of object source. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
    203.         d = source & "Settings\"
    204.         'UPGRADE_WARNING: Dir has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
    205.         sNextFile = Dir(d & "*.*", FileAttribute.Normal + FileAttribute.Hidden + FileAttribute.ReadOnly)
    206.         Do While sNextFile <> ""
    207.             SetAttr(d & sNextFile, FileAttribute.Normal)
    208.             Kill((d & sNextFile))
    209.             'UPGRADE_WARNING: Dir has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
    210.             sNextFile = Dir()
    211.         Loop
    212.     End Sub
    213.    
    214.     Private Sub Copy(ByRef source As Object)
    215.         'UPGRADE_WARNING: Couldn't resolve default property of object source. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
    216.         c = source & "savegames\"
    217.         destination = destination & "savegames\"
    218.         Call lastFolder(c)
    219.     End Sub
    220.    
    221.     Private Sub lastFolder(ByRef c As Object)
    222.         Dim Mypath, e As String
    223.         Dim iCount As Short
    224.         iCount = 0
    225.         MyName = ""
    226.         'UPGRADE_WARNING: Couldn't resolve default property of object c. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
    227.         Mypath = c ' Set the path.
    228.         'UPGRADE_WARNING: Dir has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
    229.         MyName = Dir(Mypath, FileAttribute.Directory) ' Retrieve the first entry.
    230.         Do While MyName <> "" ' Start the loop.
    231.             ' Ignore the current directory and the encompassing directory.
    232.             If MyName <> "." And MyName <> ".." And Not MyName = "user_invalid" Then
    233.                 ' Use bitwise comparison to make sure MyName is a directory.
    234.                 If (GetAttr(Mypath & MyName) And FileAttribute.Directory) = FileAttribute.Directory Then
    235.                     iCount = iCount + 1
    236.                     'UPGRADE_WARNING: Couldn't resolve default property of object c. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
    237.                     e = c & MyName
    238.                     Call VBCopyFolder(e, destination) ' it represents a directory.
    239.                 End If
    240.             End If
    241.             'UPGRADE_WARNING: Dir has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
    242.             MyName = Dir() ' Get next entry.
    243.         Loop
    244.     End Sub
    245.    
    246.     'UPGRADE_NOTE: command was upgraded to command_Renamed. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
    247.     Private Sub command_Renamed()
    248.         'Paste commandline.txt in the same directory as GTAIV
    249.         Dim ff As Short
    250.         ff = FreeFile
    251.         FileOpen(ff, My.Application.Info.DirectoryPath & "\" & "commandline.txt", OpenMode.Output)
    252.         PrintLine(ff, "-Width 1280" & vbCrLf & "-Height 720" & vbCrLf & "-texturequality 1" & vbCrLf & "-shadowdensity 3" & vbCrLf & "-viewdistance 25" & vbCrLf & "-detailquality 30" & vbCrLf & "-norestrictions" & vbCrLf & "-novblank" & vbCrLf & "- safemode" & vbCrLf & "-fullscreen" & vbCrLf & "-windowed" & vbCrLf & "-availablevidmem 1.5" & vbCrLf & "-percentvidmem 0.5" & vbCrLf & "-frameLimit 1" & vbCrLf & "-refreshrate 60" & vbCrLf & "-fullspecaudio" & vbCrLf & "-minspecaudio" & vbCrLf & "-noprecache" & vbCrLf & "- nomemrestrict" & vbCrLf & "- benchmark" & vbCrLf & "- help")
    253.         FileClose(ff)
    254.     End Sub
    255.    
    256.     Public Sub response()
    257.         Dim ret As Integer
    258.         ret = WaitForSingleObject(proc.hProcess, 500)
    259.         If ret = 0 Then
    260.             Call CloseHandle(proc.hThread)
    261.             Call CloseHandle(proc.hProcess)
    262.             Call GetExitCodeProcess(proc.hProcess, ret)
    263.         End If
    264.     End Sub
    265. End Module
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Converted project from VB6 to Visual Basic.NET

    You should rewrite that code from scratch in VB.NET. Surely you know how to get a special folder path and start a process in VB.NET. That code is basically cr*p from a VB.NET perspective, so much of it can be done so much more simply. Surely you know how to do things like get a special folder path and start a process in VB.NET.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Converted project from VB6 to Visual Basic.NET

    No, I haven't been taught vb.net and I am only a VB6.0 hobbyist.

    Edit:

    Where on the internet would I find the information I require, what should I start?
    Last edited by Nightwalker83; Aug 25th, 2011 at 02:27 AM. Reason: Adding more!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Converted project from VB6 to Visual Basic.NET

    Hmmm... I've seen your name a reasonable amount and I guess I must have assumed that I'd seen it more in the VB.NET forum than I actually have. Sorry about that.

    Anyway, if you want to learn VB.NET from the ground up then this would be a good place to start:

    http://www.homeandlearn.co.uk/net/vbnet.html

    That said, it is a beginners tutorial so it can feel a bit condescending if you already have programming experience in another language.

    If you want to be able to do what that code does in VB6 but with the best VB.NET code possible then you should write out exactly what you want the code to do and then break that down into smaller tasks. Once you have it broken down sufficiently, you can perform useful web searches to find specific information.

    For instance, you have a function in there that tells you whether a file exists. In VB.NET, the System.IO.File class already has an Exists function, so you can do away with your own function and just call that. Starting processes and finding special folders are also one-line operations in VB.NET and file I/O has changed considerably.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Converted project from VB6 to Visual Basic.NET

    I have done a bit of searching on the forum and have found the start process code you mentioned for VS2010 I just need to recreate the project in VB2010 rather than VB2008 which is how I converted the above code.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Converted project from VB6 to Visual Basic.NET

    Quote Originally Posted by Nightwalker83 View Post
    I have done a bit of searching on the forum and have found the start process code you mentioned for VS2010 I just need to recreate the project in VB2010 rather than VB2008 which is how I converted the above code.
    The Process.Start method has been around since .NET 1.0/VB.NET 2002. I would recommend using the most recent version that you can but I don't see anything in that code (at a glance) that will be significantly changed in VB 2010 from earlier versions.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width