Results 1 to 17 of 17

Thread: afawfaf

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2013
    Posts
    12

    afawfaf

    dawd awdaw awd wad
    Last edited by kris914g; Jul 1st, 2013 at 01:42 PM.

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

    Re: how can i make 2 webclients in same form?

    Maybe you could explain what you expect to happen and what actually does happen, rather than expecting us to work it out from code that, by your own admission, doesn't actually do what it's supposed to.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2013
    Posts
    12

    Re: how can i make 2 webclients in same form?

    i have 3 checkboxes so iim trying to do if you select 1 and click on at button it will download it but i cant do it with 2 checkboxes pls help me

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

    Re: how can i make 2 webclients in same form?

    Yeah, yeah, we know you can't do it. If you could then you wouldn't be posting. Now maybe you could actually read the words I posted and do as I asked. If you can't be bothered to provide an explanation of what you expect to happen and what actually happens then I can't be bothered to read your code. What you're saying is:
    It's too much like hard work for me to take the time to explain anything to you so I'd rather that you, someone whom I've never met, spent your time to read my code and first of all work out where the issue is without any guidance from me, then work out how to fix it and tell me while I just take it easy here. I'm sure that you don't have anything better to do.
    I'm more than happy to help; otherwise I wouldn't be posting. What I'm not prepared to do is waste my time trying to work things out that you already know and could explain if you were prepared to spend a couple of minutes to help us help you.

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2013
    Posts
    12

    Re: how can i make 2 webclients in same form?

    if wi say there are 3 checkboxes i want i you select all 3 checkboxes there come 3 downloads if you select 2 checkboxes there come 2 downloads and i you select 1 there come 1 download and a progressbar
    and setstatus enabled for all downloads

  6. #6
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: how can i make 2 webclients in same form?

    After having the same issue of understanding Kris914g lack of explaining John i provided him/her with a working example that can be found Here. Do not post repeated threads Kris. Especially as the question has already been answered. If you struggled to adapt my post then after for further assistance. I am not going to completely write this out for you. Help your self by trying.

  7. #7

    Thread Starter
    New Member
    Join Date
    Jun 2013
    Posts
    12

    Re: how can i make 2 webclients in same form?

    im not undstand the code pls can you edit inside my code in the checkboxes

  8. #8
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: how can i make 2 webclients in same form?

    Why are you using this silly little NextCheck variable? Both your downloads would if called update the same controls so how would you know which webclient it is.

    Take the time and effort to explain in full and clear.

  9. #9
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: how can i make 2 webclients in same form?

    DownLoadFileAsync is on a threaded pool. It sounds like to me you wish to download each file individual and update the progress while not blocking the calling thread.

  10. #10

    Thread Starter
    New Member
    Join Date
    Jun 2013
    Posts
    12

    Re: how can i make 2 webclients in same form?

    yes is that im trying to do

  11. #11
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: how can i make 2 webclients in same form?

    I just took a closer look and tested the suspiciously named Crack Manager.exe executable and it did return Detection ratio:1 / 47 Trojan.DownLoader9.38064 i am a little suspect of helping you now.

  12. #12
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: how can i make 2 webclients in same form?

    Oh i see now. You are making a program that downloads dreamweaver along side a patched exe. Sorry you are on your own

    Original cod before editing

    vb Code:
    1. Imports System.Net
    2. Imports System.IO
    3. Imports System.Diagnostics
    4. Public Class Form1
    5.  
    6.     Private WithEvents WC2 As WebClient
    7.     Private WithEvents WC As WebClient
    8.  
    9. #Region "Download RateVariables"
    10.     Private ChangeInAmount As Integer
    11.     Private PreviousAmount As Integer
    12.     Private NextCheck As DateTime
    13. #End Region
    14.  
    15.  
    16.     Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
    17.         setstatus("0 kb", "0kb", "0%", "0kb/s")
    18.         WC = New WebClient
    19.         WC2 = New WebClient
    20.     End Sub
    21.     Private Sub setstatus(ByVal CurDownload As String, ByVal TotalDownload As String, ByVal Percentage As String, ByVal Rate As String)
    22.         Label1.Text = "Downloaded : " & CurDownload
    23.         Label2.Text = "Download Size : " & TotalDownload
    24.         Label3.Text = "Rate : " & Rate
    25.         Label4.Text = "Percentage : " & Percentage
    26.     End Sub
    27.  
    28.     Public Function CalculateRate(ByVal Input As Integer) As String
    29.         Return Processbytes(Input) & "/s"
    30.     End Function
    31.  
    32.     Public Function Processbytes(ByVal Input As Integer) As String
    33.  
    34.         'Check if the file is 1GB or more
    35.         If Input >= 1073741824 Then
    36.             Return Math.Round(CDbl(Input / 1073741824), 2) & " GB"
    37.         Else
    38.             'Check for MB
    39.             If Input >= 1048576 Then
    40.                 Return Math.Round(CDbl(Input / 1048576), 2) & " MB"
    41.             Else
    42.                 'Can only be in KB
    43.                 Return Math.Round(CDbl(Input / 1024), 2) & " KB"
    44.             End If
    45.  
    46.         End If
    47.  
    48.     End Function
    49.  
    50.     Private Function CDb1(ByVal p1 As Double) As Double
    51.         Throw New NotImplementedException
    52.     End Function
    53.  
    54.     Private Sub WC_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles WC.DownloadFileCompleted
    55.         ProgressBar1.Value = 0
    56.         ProgressBar1.Maximum = 0
    57.         ChangeInAmount = 0
    58.         PreviousAmount = 0
    59.         NextCheck = Now.AddSeconds(1)
    60.     End Sub
    61.  
    62.     Private Sub WC2_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles WC.DownloadFileCompleted
    63.         ProgressBar1.Value = 0
    64.         ProgressBar1.Maximum = 0
    65.         ChangeInAmount = 0
    66.         PreviousAmount = 0
    67.         NextCheck = Now.AddSeconds(1)
    68.     End Sub
    69.  
    70.     Private Sub WC_DownloadProgressChanged(ByVal sender As Object, ByVal e As DownloadProgressChangedEventArgs) Handles WC.DownloadProgressChanged
    71.         Try
    72.             If Now > NextCheck Then
    73.                 ChangeInAmount = e.BytesReceived - PreviousAmount
    74.                 PreviousAmount = e.BytesReceived
    75.                 NextCheck.AddSeconds(1)
    76.             End If
    77.             Dim Rate As String = CalculateRate(ChangeInAmount)
    78.             ProgressBar1.Maximum = e.TotalBytesToReceive
    79.             ProgressBar1.Value = e.BytesReceived
    80.             setstatus(Processbytes(e.BytesReceived), Processbytes(e.TotalBytesToReceive), e.ProgressPercentage, Rate)
    81.         Catch
    82.         End Try
    83.     End Sub
    84.  
    85.  
    86.     Private Sub WC2_DownloadProgressChanged(ByVal sender As Object, ByVal e As DownloadProgressChangedEventArgs) Handles WC.DownloadProgressChanged
    87.         Try
    88.             If Now > NextCheck Then
    89.                 ChangeInAmount = e.BytesReceived - PreviousAmount
    90.                 PreviousAmount = e.BytesReceived
    91.                 NextCheck.AddSeconds(1)
    92.             End If
    93.             Dim Rate As String = CalculateRate(ChangeInAmount)
    94.             ProgressBar1.Maximum = e.TotalBytesToReceive
    95.             ProgressBar1.Value = e.BytesReceived
    96.             setstatus(Processbytes(e.BytesReceived), Processbytes(e.TotalBytesToReceive), e.ProgressPercentage, Rate)
    97.         Catch
    98.         End Try
    99.     End Sub
    100.  
    101.     Private Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click
    102.  
    103.         Dim webAddress As String = "https://dl.dropboxusercontent.com/u/45798270/download%20Manager/Adobe/Dreamweaver%20CS6%20Setup.exe"
    104.         Dim SFD As New SaveFileDialog
    105.         If SFD.ShowDialog() = DialogResult.OK Then
    106.             WC.DownloadFileAsync(New Uri("https://dl.dropboxusercontent.com/u/45798270/download%20Manager/Adobe/Dreamweaver%20CS6%20Setup.exe"), SFD.FileName)
    107.         End If
    108.     End Sub
    109.  
    110.  
    111.     Private Sub SearchForUpdateToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles SearchForUpdateToolStripMenuItem.Click
    112.         CheckForUpdates()
    113.     End Sub
    114.  
    115.     Public Sub CheckForUpdates()
    116.  
    117.         Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("https://dl.dropboxusercontent.com/u/45798270/download%20Manager/Update/Tool%20update.txt")
    118.         Dim response As System.Net.HttpWebResponse = request.GetResponse()
    119.  
    120.         Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
    121.  
    122.         Dim newestversion As String = sr.ReadToEnd()
    123.         Dim currentversion As String = Application.ProductVersion
    124.  
    125.         If newestversion.Contains(currentversion) Then
    126.             msgbox("You are up todate :D")
    127.  
    128.         Else
    129.  
    130.             msgbox("There is a new update we will download it now for you.")
    131.             System.Diagnostics.Process.Start("https://dl.dropboxusercontent.com/u/45798270/download%20Manager/Update/Crack%20Manager.exe")
    132.         End If
    133.  
    134.     End Sub
    135.  
    136.  
    137.     Private Sub Button3_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button3.Click
    138.  
    139.         If CheckBox1.Checked = True Then
    140.  
    141.             Dim webAddress As String = "https://dl.dropboxusercontent.com/u/185853590/download%20Manager/Update/Tool%20update.txt"
    142.             Dim SFD As New SaveFileDialog
    143.             If SFD.ShowDialog() = DialogResult.OK Then
    144.                 WC.DownloadFileAsync(New Uri("https://dl.dropboxusercontent.com/u/185853590/download%20Manager/Update/Tool%20update.txt"), SFD.FileName)
    145.             End If
    146.  
    147.         End If
    148.  
    149.         If CheckBox2.Checked = True Then
    150.  
    151.             Dim webAddress2 As String = "https://dl.dropboxusercontent.com/u/185853590/download%20Manager/Update/Tool%20update.txt"
    152.             Dim SFD As New SaveFileDialog
    153.             If SFD.ShowDialog() = DialogResult.OK Then
    154.                 WC2.DownloadFileAsync(New Uri("https://dl.dropboxusercontent.com/u/185853590/download%20Manager/Update/Tool%20update.txt"), SFD.FileName)
    155.             End If
    156.  
    157.         End If
    158.  
    159.     End Sub
    160. End Class

  13. #13
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: afawfaf

    Original cod before editing
    A little fishy, huh?
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  14. #14
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: afawfaf

    You do make me chuckle pouncing on the Typo's . Need new batteries in keyboard.

  15. #15
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: afawfaf

    Is there a reason why the original thread post was edited out here? Sort of makes this thread useless.

  16. #16
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: afawfaf

    The question was regarding making a down-loader of cracked application's. The OP forgot to edit his url links out that contained infected cracks.

  17. #17
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: afawfaf

    so in other words, this thread can be locked and sink to the bottom of the forum ocean...

Tags for this Thread

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