
NK2000
Avatar/Signature-
Posts
166 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by NK2000
-
Thread th =new Thread(new ThreadStart(this.RunBlinking)); where is your th.Start() ?
-
i know, i just saw it at someone's code and thought it could be a help for people who dont know this fact..
-
i think you can learn the most in forums like these.. just dont only care about your own posts, so also answer posts of other users, there are often some missunderstandings which will be cleared here :) i am now for 4 days here and i really enjoy these forums. i wanted to register in the past but always got error and i didnt get any replying email by an admin as i asked for help, but as already said i dont want to criticize them, they are also quite busy persons but there is also a .net show, havent you check it out yet? http://msdn.microsoft.com/theshow/
-
it would be helpful if you tell us the line where the exception is thrown, btw how do you get "Microsoft Certified Application Developer .NET" - just wondering? StackOverflowException normally happens at infinite Recursion where do you start that thread?
-
you should disable smileys if it is in a <code> bracket because if not then you could get (;;) which means ( ; ; )
-
so you should use a bool and set it to true if it finds something if the bool is after the for each still false then you can open your window :)
-
in the msdn you got a menu and below that menu you have a navigation bar there is a textinput where you can type this url :)
-
enter it in your msdn: Imports System Imports System.Net Imports System.Net.Sockets Imports System.Threading Imports System.Text ' State object for receiving data from remote device. Public Class StateObject Public workSocket As Socket = Nothing ' Client socket. Public BufferSize As Integer = 256 ' Size of receive buffer. Public buffer(256) As Byte ' Receive buffer. Public sb As New StringBuilder() ' Received data string. End Class 'StateObject Public Class AsynchronousClient ' The port number for the remote device. Private Shared port As Integer = 11000 ' ManualResetEvent instances signal completion. Private Shared connectDone As New ManualResetEvent(False) Private Shared sendDone As New ManualResetEvent(False) Private Shared receiveDone As New ManualResetEvent(False) ' The response from the remote device. Private Shared response As [string] = [string].Empty Private Shared Sub StartClient() ' Connect to a remote device. Try ' Establish the remote endpoint for the socket. ' The name of the ' remote device is "host.contoso.com". Dim ipHostInfo As IPHostEntry = Dns.Resolve("host.contoso.com") Dim ipAddress As IPAddress = ipHostInfo.AddressList(0) Dim remoteEP As New IPEndPoint(ipAddress, port) ' Create a TCP/IP socket. Dim client As New Socket(AddressFamily.InterNetwork, _ SocketType.Stream, ProtocolType.Tcp) ' Connect to the remote endpoint. client.BeginConnect(remoteEP, AddressOf ConnectCallback, client) connectDone.WaitOne() ' Send test data to the remote device. Send(client, "This is a test<EOF>") sendDone.WaitOne() ' Receive the response from the remote device. Receive(client) receiveDone.WaitOne() ' Write the response to the console. Console.WriteLine("Response received : {0}", response) ' Release the socket. client.Shutdown(SocketShutdown.Both) client.Close() Catch e As Exception Console.WriteLine(e.ToString()) End Try End Sub 'StartClient Private Shared Sub ConnectCallback(ar As IAsyncResult) Try ' Retrieve the socket from the state object. Dim client As Socket = CType(ar.AsyncState, Socket) ' Complete the connection. client.EndConnect(ar) Console.WriteLine("Socket connected to {0}", _ client.RemoteEndPoint.ToString()) ' Signal that the connection has been made. connectDone.Set() Catch e As Exception Console.WriteLine(e.ToString()) End Try End Sub 'ConnectCallback Private Shared Sub Receive(client As Socket) Try ' Create the state object. Dim state As New StateObject() state.workSocket = client ' Begin receiving the data from the remote device. client.BeginReceive(state.buffer, 0, state.BufferSize, 0, _ AddressOf ReceiveCallback, state) Catch e As Exception Console.WriteLine(e.ToString()) End Try End Sub 'Receive Private Shared Sub ReceiveCallback(ar As IAsyncResult) Try ' Retrieve the state object and client socket ' from the async state object. Dim state As StateObject = CType(ar.AsyncState, StateObject) Dim client As Socket = state.workSocket ' Read data from the remote device. Dim bytesRead As Integer = client.EndReceive(ar) If bytesRead > 0 Then ' There might be more data, so store the data received so far. state.sb.Append(Encoding.ASCII.GetString(state.buffer, 0, _ bytesRead)) ' Get the rest of the data. client.BeginReceive(state.buffer, 0, state.BufferSize, 0, _ AddressOf ReceiveCallback, state) Else ' All the data has arrived; put it in response. If state.sb.Length > 1 Then response = state.sb.ToString() End If ' Signal that all bytes have been received. receiveDone.Set() End If Catch e As Exception Console.WriteLine(e.ToString()) End Try End Sub 'ReceiveCallback Private Shared Sub Send(client As Socket, data As [string]) ' Convert the string data to byte data using ASCII encoding. Dim byteData As Byte() = Encoding.ASCII.GetBytes(data) ' Begin sending the data to the remote device. client.BeginSend(byteData, 0, byteData.Length, 0, _ AddressOf SendCallback, client) End Sub 'Send Private Shared Sub SendCallback(ar As IAsyncResult) Try ' Retrieve the socket from the state object. Dim client As Socket = CType(ar.AsyncState, Socket) ' Complete sending the data to the remote device. Dim bytesSent As Integer = client.EndSend(ar) Console.WriteLine("Sent {0} bytes to server.", bytesSent) ' Signal that all bytes have been sent. sendDone.Set() Catch e As Exception Console.WriteLine(e.ToString()) End Try End Sub 'SendCallback 'Entry point that delegates to C-style main Private Function. Public Overloads Shared Sub Main() System.Environment.ExitCode = _ Main(System.Environment.GetCommandLineArgs()) End Sub Overloads Public Shared Function Main(args() As [string]) As Integer StartClient() Return 0 End Function 'Main End Class 'AsynchronousClient
-
you can do it in every control :)
-
http://ms-help://MS.VSCC/MS.MSDNVS.1031/cpguide/html/cpconnon-blockingclientsocketexample.htm
-
look for the example for asynchronous client socket in your msdn :)
-
heh, as legal as you can be today :)
-
MapPanel_Paint there you see it is the Paint override of the MapPanel you can override every other class too but here it is the MapPanel, so e.ClipRectangle belongs to MapPanel :) hm why dont use picturebox if you just want to draw..
-
cliprectangle is the part of the panel you see..everything outside of it wont be painted..
-
uhm i would put the picturebox in a scrollable panel
-
ah omg that hurts i spend about 2-3 hours to write a tutorial, but now i see that DrawPie Method at the Graphics object, which is the solution for your Problem ... Nevertheless i give you now the order to look at it :) TUTORIAL: Welcome to my little math lesson :) http://www.dotlike.com/tempweb/circle.jpg This is a circle, you see the Y line, X line, R (radius) line and the angle Phi (greek symbol) First you have to know that we normally use radian angles that mean 360° = 2PI, so 90° would be PI/2. You can get PI by using Math.PI First of all you learn converting radian to degree angle: DegreeAngle is a normal degree angle ( 0 � 360° ) Angle = DegreeAngle/360 * 2 * Math.PI; Normally we count the angly in a counter-clockwise way, so we start at the purple line which is heading to left. Now we do just a simple example: Let�s say the DegreeAngle is smaller than 90°, so maybe 45° (note if a angle is 45° then x = y :) ) Angle = 45/360*2*PI = PI/4 = 0.785� If radius = 1 then there is a spezial case: X = cos(Angle) Y = sin(Angle) Now you may think how i come to this, it is quite easy cos(0)=1 and sin(0)=0 (Just check your calculator! ) So what is if radius != 1 ? X = cos(Angle) * r Y = sin(Angle) * r ============== Now i am going to cry because of the loss of time...
-
uhm it would be an easy way just to ask some people on that page for a scan of some sites just to look in and so but perhaps also ask the editor of that magazine if you can get one for free and tell him that you cant buy it at your place, i dont think they will say just no, there is for sure a possibility to sneak in yeah i really can understand you :D
-
yes i also know some people who get provided with this software by their university/academy (like me in some months :) ) but do you see the smiley? i am person who is quite often joking around at topics like these.. i am not intersted at all if anybody has got its software legally or illegally, because it is the decission of the particular person himself so dont take that to serious :)
-
oh *bow* i am sorry, so i wonder why it doesnt work at his project..
-
i also looked at some other posts about this topic but i found the answer that everything works well with richtextbox but textbox wont work, but there must be a solution maybe you have to do an win32 call
-
yes there are times without pc but at those times i normally read something which i have to learn or a book coding, so there is enough for off-pc reading :) i dont think they will publish all their articles, because why should anybody buy it if everything is available for free :), but you normally can find the other things on other sites.. but as i said it is more a thing for people with more time, since searching needs time too
-
you missunderstood me, i said i am going to help you at the cos and sin math, this is also a good training for me, i try to create an image which will show you how you can implement it yourself, it isnt that difficult, but i can tell you that you get the x coords with sin and the y coords with cos, it is like a circle, just wait for my image, will take some time to do that :)
-
maybe DNS.GetHostByName
-
hm if you use an rtf doc then you see the format symbols, this is just like html or xml you have to set the formatting characters if you want to do it faster another way is that you create your own textbox
-
you can set your buffer big enough so you dont need a while or you can check the bytes and determine if thats all or if there is something missing..