Jump to content
Xtreme .Net Talk

kanak

Members
  • Posts

    16
  • Joined

  • Last visited

kanak's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I m using the following code ... Public Class Form1 Inherits System.Windows.Forms.Form Shared httpreq As HttpWebRequest Dim res As WebResponse Dim by(10000) As Byte Shared contentlength, i As Integer Dim speed As Integer = 0 Public Sub Download() httpreq = WebRequest.Create(TextBox1.Text) res = httpreq.GetResponse Dim strTemp As String contentlength = res.ContentLength Dim sizeInKB As String = (contentlength / 1024).ToString() Dim fname As String ="hello.dat" Dim sw As FileStream = IO.File.Open(fname, FileMode.OpenOrCreate) Dim f2 As Stream = res.GetResponseStream Dim n, k As Integer Try k = contentlength While k >= 0 'f2.Seek(contentlength - 9999, SeekOrigin.Current) \\The error comes as Seek Operation is not supported on this type of stream n = f2.Read(by, 0, 9999) sw.Write(by, 0, n) Array.Clear(by, 0, 10000) If n = 0 Then Exit While End If k -= n End While Catch ex As Exception MsgBox(ex.Message) Finally f2.Close() sw.Close() End Try End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click download() end sub i m not able to perform seek operation here.. as it throws exception that seek operation can not be performed on this kind of stream..... u can see..i m using a temperory buffer of 10000 bytes ... .. i want to prevent that... is there any solution
  2. hey where the discussion is going ,... I m using download accelerator.. and i m really satisfied with the speed of download as when it connects to all the 10 mirrors .. the speed rises to 40 to 50 Kbps....so please dont discuss about whether its a spyware or not. my question was .. how to write the bytes recieved from the file which i m downloading from the internet directly into a file... i dont want to use any temperory buffer or byte array..so tell me how to do that.... if possible please help me with the code.....
  3. hi all ... i want to know whether anyone has an idea how download accelerator works... I m tryin to implement a downloading tool ... but what i have noticed in all these downloading manager is that they dont store the incoming data in a byte buffer... instead writing it to a temperory file... i want to know how it is possible... the problem i am facing is that .. i get the size of the data i want to download and allocate the buffer according to the size... the thing work quite fine... but the problem comes when the size of the file is large say around 70 to 80 Mb. .. Since i am declaring a byte buffer of 80 mb size... its making me looose my ram memory until the file downloading finishes... that is the problem .....and sometime the computer go low in virtual memory toooo... so if anyone has an idea of how to over come this problem .. and also any idea on how the download manager do so ... please give me suggestions... thanks in advance
  4. hey thanks a lot man ... its workied perfectly fine
  5. hey its not like that.... microsoft remote desktop .. i can tell u how it works... it will interrupt the video signals which are sent to the monitor and convert it in to a video stream and transer it over a network... i dont know how to do it so i gave one suggestion of sending the desktop view of the client in a form of a picture ... tell me if u have some other idea...
  6. i m facing a problem in a rictextbox control.... that is the vertical scroll bar i m developing a chat window where the message recieved is shown in a richtextbox ... Now the problem which i am facing is that when the message content is more than the size of the richtextbox... then the vertical scrollbar is displayed.. but the scroll bar is not getting attached to the bottom position ... whenever a new message comes the scroll bar moves up .. and the message is not visible ... i have to move the scroll bar down to the bottom position to c the message... how to make the vertical scroll bar position to the bottom ... so that the latest message can be seen without scrolling to the bottom... for example u can try this.. create a richtextbox , a textbox, button.. type something in the textbox and click the button on button click richtextbox.text=richtextbox.text + textbox1.text view the result when the messages r more then the size of the richtextbox... i hope u might get the problem i am facing
  7. Hi all .. i m developing a client server application ..and as a module i want to implement desktop monitoring of the client. I mean that from the server , administrator can view the client desktop and also what the client is doin at that time. Those who have worked with windows xp might be knowing something called remote assistance and remote desktop. I just want to view the client desktop. If u know about netmeeting there is also a option available in which one user can actully view and also control the handling of the dessktop of the other user. I m tryin to find out how this concept is used.So if anyone can help me out in the concept how to have a live view of the client desktop from the server. The idea which i can think of is that in the client the application will take the snapshot of the screen every second and then pass the picture to the server. Is this is the only way to do or i m thinking some other way. if anyone knows please help me out.......
  8. hey thanks a lot .. i love these forums for the knowledge upgrade..thanks a lot
  9. hi all i want to know is there a information message box ... which does not block the execution of the program..... i want a message box which does not reqires a user input but just to gives a alert of the information... and destroys itself... i tried creating a window form like message box ... and used a thread to display to form for 5 seconds .. i used to following coding in the button click event dim f2 as new form2 f2.show() f2.textbox1.text="Please wait for 5 seconds" thread.currentthread.sleep(5000) f2.close() but the problem is the form2 is getting hanged .. and is not displayin the information in the text box.. so anyone can help me with a message box which does not have this problem. .... as if i use a messagebox is that till i click the "ok" button in the message box it wont execute the nex step .... so anyone please help
  10. hi all i want when my window form get closed it shud place a icon on the system tray .. can anyone tell me how to do it ... and also how to add the menu when the user right click at the icon ... i dont want it to display on the taskbar but as a icon in the system tray
  11. what do u mean by RTF chars .. how to make only a part of the text bold which is entered in a text box ... if possible help me with code ..thanks
  12. hey thats the code which was used in vb6 .. in vb.net there is inbulti support of copyin and pasting the data.... what all u have to do is suppose u have richtextbox1 in which u have some text richtextbox1.cut richtextbox2.copy richtextbox1.paste
  13. try this out dim str as string str={0,10}{1,4}{2,8} where 0,1,2 are the index and 10,4,8 are the length use listbox1.items.add(string.format(str,"name","age","salary") this will give 3 columns in your lisstbox ... u can have more if u want but instead u can use listview ,.... thats much better and looks much neat try listview ... thats the best option u can get
  14. hi all i m tryin to make a messenger application using vb.net the problem i m facing is ... i have two rich text boxes one i will type the messgae and another one in which i will display the message along with the user name who send the message... i want to make the user name bold ... so is there any rich text box in vb.net which accepts html tags or how to do it ... can i inherit the text area control from asp.net ... i how to do it ... i want the window to be like the yahoo chat window ... with user who is sending the message as bold... anyone help
  15. hey does anyone know how to shutdown a computer using the code of vb.net. can anyone help me with the code thanks in advance
×
×
  • Create New...