Jump to content
Xtreme .Net Talk

jorge

Avatar/Signature
  • Posts

    240
  • Joined

  • Last visited

Everything posted by jorge

  1. jorge

    thread's?

    ok, got it to work, but one problem... I made a thread for the server, but i want to kill the tread when it's not needed anymore, how? don't seen thread.stop() :(
  2. http://www.syncfusion.com/FAQ/WinForms/FAQ_c40c.asp#q655q Have a look at this
  3. jep, alslong as you don't need/uses the asp.net server plugin for IIS, But you can't even pick the uptions to update windows and all?
  4. jorge

    thread's?

    thread? help? Ok, i have some code that wait for a connection, But i'd like to do other stuff, at the same time, So i thing thread will help me there, tell me if i'm wrong. And thread would also make it posible to pause the funtion? and restart later? and if it is the bets way, how do i creat, stop and start a thread? Thanx in advance
  5. What your problem? What msg does it give you?
  6. sry, could not find it, But... maybe you canr ead the ou put of ipconfig?
  7. so you need to send your local ip to your website?
  8. try no-ip, a nice tool and bin it to somthing.no-ip.net/org/com... http://www.no-ip.com
  9. problem with tcplisten Ok here is what wrong, I can send 1 command, But when it is done processing it, the server termniates, But i'd want it to keep listening for more commands Thanx in advance Public Sub remote() ' Buffer for reading data Dim bytes(1024) As [byte] Dim data As [string] = Nothing 'set up server Dim port As Int32 = 99 Dim server As New TcpListener(port) server.Start() While True 'Wait for a connection... Dim client As TcpClient = server.AcceptTcpClient() 'Connection is made data = Nothing Dim stream As NetworkStream = client.GetStream() Dim i As Int32 i = stream.Read(bytes, 0, bytes.Length) While (i <> 0) Dim sRetdate As String data = System.Text.Encoding.ASCII.GetString(bytes, 0, i) If ([string].Format(data)).ToLower = "start" Then Retval = Shell(sApache_dir + "/bin/apache.exe -k start -n """ & sApache_service & """ ", AppWinStyle.Hide) sRetdate = "[" & Date.Now.Hour & ":" & Date.Now.Minute & ":" & Date.Now.Second & "]The remote Apache server has started." ElseIf ([string].Format(data)).ToLower = "restart" Then Retval = Shell(sApache_dir + "/bin/apache.exe -k restart -n """ & sApache_service & """ ", AppWinStyle.Hide) sRetdate = "[" & Date.Now.Hour & ":" & Date.Now.Minute & ":" & Date.Now.Second & "]The remote Apache server has restarted." ElseIf ([string].Format(data)).ToLower = "stop" Then Retval = Shell(sApache_dir + "/bin/apache.exe -k stop -n """ & sApache_service & """ ", AppWinStyle.Hide) sRetdate = "[" & Date.Now.Hour & ":" & Date.Now.Minute & ":" & Date.Now.Second & "]The remote Apache server has stopped." Else sRetdate = "error" End If Dim msg As [byte]() = System.Text.Encoding.ASCII.GetBytes(sRetdate) stream.Write(msg, 0, msg.Length) client.Close() Call remote() Exit Sub End While End While End Sub
  10. ok, found it, i used () instead of (1) :eek:
  11. it gives: index out of reange as error
  12. Dim sCommand As String = System.Environment.CommandLine sCommand = sCommand.ToLower() If sCommand = "-server" Then Call remote() Exit Sub End If that my code, but it does nothing, it doe not go to remote!
  13. so: Dim server As New TcpListener("0.0.0.0:999") server.start() 'will start the to listen on port 999 on all IP's on this computer? That avout i'll i can figure out :mad:
  14. ok, My startup object is sub main, here is what i want, if my.exe -server is started it would display a msg box, if my.exe is started it schould continue loading. buti t says command() is private so i can't use it? whats wrong? thanx in advance Jorge
  15. hey sry, back from vacation so thats why the late reply :o ok can't find info on TcpListener, is it in msdn lib? look but got nothing. thanx in advance
  16. Well, What i wond to do is make a application that listens on port 999 and when: 127.0.0.1:999/user:pass-start is requested that it would load a program on the server's computer?? so is it posible? if yes how? thanx in advance
  17. and if you add the project file, You will have only myprj.exe, no dlls
  18. hehe lol, now you mention it, Are there any useful thing i neet to import(using)???
  19. k thanx, Can i hit you with some more questions? i'm goint to port some vb.net program to c#(atleast i hope) 1. How do i make it start from somting simular to sub main? and then load a form or a trayicon? 2.I presume textstreams work the same? 3.Is controling the gui the smae like cmd1.hide()? but with a ending ;?? Thanx agen
  20. Ya, But in vc#.net in IDE it say console is not a valid member, but if i compile form cmd it works ?? Small question, -> how do i do process.stary("my.exe")?? in c# greets
  21. Maby related problem: When i try to compile a simple hallo word app i get: See atache for file that gives error NeverMinde, Seems c# is case sensitive :( ai.cs
  22. Ok, thall keep me busy for a wile :p Thanx agen
  23. Cool, Thanx VolteFace, work like a cham :D Btw you know any good very noob tuto's for vc#.net, So i have some reading when i'm on vacation :p
  24. Only c# dat doen't work, Verion is: VS.net pro 2002
  25. Don't know sinds when, I tested all the aps about 2 weeks ago when i installed vs.net, Only used vb.net sinds then, but i'd like to lear some c# so i tryed t ostart it agen 2 dags ago but sinds then it give that error.
×
×
  • Create New...