Jump to content
Xtreme .Net Talk

coldfusion244

Avatar/Signature
  • Posts

    269
  • Joined

  • Last visited

Everything posted by coldfusion244

  1. Richard, The way you put it did the trick. My problem was I wasn't checking for a non-numeric character before the IP's. :o Sometimes I wonder if parts of my brain shut down. Thank you very much!
  2. The exception occurs when I ask it to download the source to a webpage, here is the exception text (I am unsure of which line as it does not error on my SP1 machine[development machine]) System.Net.WebException: The underlying connection was closed: The server committed an HTTP protocol violation. at System.Net.HttpWebRequest.CheckFinalStatus() at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.HttpWebRequest.GetResponse() at webdownload.CSDownloadURL.DownloadURL(String& strContents) at webdownload.Form1.button1_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Any ideas? I am definately going to check out firewall issue in SP2 though, great idea!
  3. I found some code for downloading the contents of a webpage, and it works great...in everything but XP SP2. For some reason it always throws an exception. [CS] public class CSDownloadURL { private string m_strURL; public void setURL1( string strURL ) { m_strURL = strURL; } public void DownloadURL(out string strContents) { WebRequest req = WebRequest.Create(m_strURL); WebResponse res = req.GetResponse(); int iTotalBuff = 0; Byte[] Buffer = new Byte[128]; Stream stream = res.GetResponseStream(); iTotalBuff = stream.Read(Buffer, 0, 128); StringBuilder strRes = new StringBuilder(""); while(iTotalBuff != 0) { strRes.Append(Encoding.ASCII.GetString(Buffer, 0, iTotalBuff)); iTotalBuff = stream.Read(Buffer, 0, 128); } strContents = strRes.ToString(); } } [/CS] Why would it work fine in everything but XP SP2 and windows 2003 server?
  4. If you could send the links of those to me that'd be great diesel!
  5. I kinda figured it out the long drawn out way. Yes richard, I want the playername, which then is followed by the IP and always has the port number. I used a regex to split the font color which is exactly the save before every name, then i looped until i found the end of the font, did some subtraction and substringed the player name out. To get the IP (I don't care about getting the port) i then used string.split to split the already split regex strings and got my IP that way. I didn't notice before how much repition there was that I could go by. I much easier approach with a normal Regex string would be appreciated ;)
  6. It happens when I stay logged in too :confused:
  7. I've noticed that after reading new posts, the icon changes and I know I have read them. If I logout and log back in say 30 minutes later, all the recent posts that I have read are still highlighted like they were new posts. This doesn't happen if I wait about 2 hours. Should I not log out, or is it just me?
  8. I have the source to a webpage, in the webpage contains information about what players are in our game server, as well as their IP's. I am making a tool to get this information and somehow extract it from this source then display it. I'm not sure if 1 regular expression or a combination of them will work, i'm very new to Regex. So any help is appreciated. If Regex won't do, maybe some hints in the right direction toawrds parsing it out :) Thanks guys source.txt
  9. I know it's in the registry, where in it though I am unsure of.
  10. I guess you could use a panel, scrollbar and then a collection of labels to make the interface... then to generate the characters you could use my code... But to make it look identical, you're going to have to put more work in it that that...
  11. To get the characters from whichever encoding type you are using, you could do something like... [CS] int i = 0; for (i = 0;i<256;i++) { texbox1.text += (char)i; }[/CS] I'm not entirely sure what you want here... Did you want the interface or the code?
  12. ok, I am not good with regular expressions, so here is the code I came up with... [CS] string[] a; string b; t1.Text = string.Empty; t2.Text = string.Empty; t1.Text = "<NAMES <NAMES Chan:#Aeonofstrife.net> change_this_to_your_nick +DarkSt0rm +lor00 @Sephiroth @Aos-Bot> change_this_to_your_nick>"; b = t1.Text; a = b.Split(' '); a[a.Length-2] = a[a.Length-2].Substring(0,a[a.Length-2].Length - 1); for (int i = 3; i<a.Length-1; i++) { t2.Text += a.ToString() + "|"; } [/CS] a in the for statement will give you each user that is connected.
  13. lol not quite on the subject but thanks for takin my avatar off me hardocde :mad:
  14. Alternatively, the use of a regular expression could do that for you.
  15. You could probably use a regular expression to parse it for you. why don't you put up a sample userlist in raw form for us.
  16. Use this, [CS] textbox.SelectionStart = textbox.Text.Length; textbox.ScrollToCaret(); [/CS]
  17. ROFL! I am going to say that next time someone asks me obvious questions :D :p
  18. Thanks guys!
  19. Thanks! For some reason, .NET is seeing my SQL server... I tried to ODBC it, and it still kept giving me errors... hmm.. any thoughts?
  20. I would suggest using DirectSound. You can fade channels, pan left/right/front/back/etc. It's part of the directx SDK i believe.
  21. You can also do it through code...
  22. You can use GetForeGroundWindow...http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getforegroundwindow.asp and compare the HWND's... I'm sure there is a .NET way how to do it too, I just don't know it :(
  23. I am having a heck of a time finding good resources for using MySQL in ASP.NET, if anyone has some good resources or some source code laying around, it would be greatly appreciated :D
  24. What's wrong with pointers, they are nice and fast :D .NET programs are quite slow I have found...
×
×
  • Create New...