O problema la un program
Last Updated: Jul 08 2009 17:01, Started by
Shmecheru
, Jul 08 2009 01:25
·
0
#1
Posted 08 July 2009 - 01:25
Salut.
De curand am gasit un cod sursa pentru un program pe care doresc sa il creez in visual basic 2008 express editon,dar acest cod este scris in vb6. Codul sursa gasit de mine al programului: Private Sub Command1_Click() Label1 = "Status: Locking 0%" Dim StrPage As String StrPage = Inet1.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 5%" StrPage = Inet1.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet2.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 10%" StrPage = Inet2.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet3.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 15 %" StrPage = Inet3.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet4.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 20%" StrPage = Inet4.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet2.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 25%" StrPage = Inet2.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet3.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 30%" StrPage = Inet3.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet4.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 35%" StrPage = Inet4.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet2.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 40%" StrPage = Inet2.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet3.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 45%" StrPage = Inet3.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet4.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 50%" StrPage = Inet4.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet2.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 55%" StrPage = Inet2.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet3.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 60%" StrPage = Inet3.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet4.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 65%" StrPage = Inet4.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet2.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 70%" StrPage = Inet2.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet3.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 75%" StrPage = Inet3.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet4.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 80%" StrPage = Inet4.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet2.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 85%" StrPage = Inet2.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet3.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 90%" StrPage = Inet3.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet4.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 95%" StrPage = Inet4.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") StrPage = "" StrPage = Inet2.OpenURL("http://login.yahoo.com/config?login=" & Text1.Text & "&passwd=" & Text1.Text & "&.done=http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Locking 100%" StrPage = Inet2.OpenURL("http://edit.yahoo.com/config/change_pw?.src=&.opw=" & Text1.Text & "&.pw1=" & Text1.Text & "&.pw2=" & Text1.Text & "&.commit=Save") Label1 = "Status: Account Locked." StrPage = "" End Sub Mentionez ca doresc urmatoarele (daca se poate desigur): "traducerea" codul din vb6 in visual basic 2008 , in loc de acel Label un ProgressBar . Mersi. |
#2
Posted 08 July 2009 - 04:19
Doar un sfat: pentru ce face programul ala, mai bine inchizi threadul si pleci acasa.
|
#3
Posted 08 July 2009 - 11:06
Stai putin, programul nu mai face nimic acum din cate stiu eu,pentru ca faza cu logarile nu mai merge decat de pe mess nu si de pe yahoo... eu il vreau doar asa ca sa fac si ceva de genul asta.
Edited by Shmecheru, 08 July 2009 - 11:10. |
#4
Posted 08 July 2009 - 11:33
no, daca vrei cu progressBar, nu trebuie sa faci altceva decat sa declari o componenta de tipul asta, sau s-o pui pur si simplu in modul Design.
apoi pBar1.Minimum = 0; // de unde incepe pBar1.Maximum = 100; // si cat are maxim pBar1.Value = 0; // asta afiseaza la inceput pBar1.Step = 5; // pasul la o incrementarebagi partea cu StrPage intr-un for si faci pBar1.PerformStep() la fiecare iteratie; acelasi lucru trebuia sa-l faci si cu celalalt cod, sa ai un for si apoi statements de forma Label1 = "Status: Locking " + i + "%"; cod imprumutat de la smft, sa nu zica ciuly iar ca dau mura in gura: http://msdn.microsof...ar.minimum.aspx Edited by daimon', 08 July 2009 - 11:34. |
#5
Posted 08 July 2009 - 15:37
Mesi pentru raspuns. In legatura cu codul (care nu merge asa cum e in visual basic 2008) cum ar trebui sa il scriu? sau ce modificari sa fac la el?
|
#6
Posted 08 July 2009 - 17:01
Shmecheru, on 8th July 2009, 16:37, said: Mesi pentru raspuns. In legatura cu codul (care nu merge asa cum e in visual basic 2008) cum ar trebui sa il scriu? sau ce modificari sa fac la el? Sintaxa e aproape identica cu VB6. VB.NET a fost upgradat la limbaj OOP + se pot folosi toate clasele din .NET. Studiaza Visual Basic Reference si .NET Framework Class Library Reamintesc regulamentul ariei Programare: Quote Pe forum nu se fac temele de casa, exercitiile de laborator, lucrari, referate si in nici un caz nu se da ajutor in timpul examenului. Stiu ca tu student puturos mai avand poate 1 ora din examen nu vei citit asta din timp, dar poate o vei face dupa ce expira suspenul de 3-7-14 zile primit in incercarea de a intelege ce ai facut gresit. |
Anunturi
Bun venit pe Forumul Softpedia!
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users