|
BGearig wrote: I want to be able to retrieve data from a Windows form in the same manner as using "Console.OpenStandardInput". Is there a way to do this!?
Your post doesn't make sense. The example for Consol.OpenStandardInput has the application reading the keyboard input from the console window. You state you want to retrieve data from the application not read it into the application.
I think you need to clarify your requirements if we have any chance of helping you. Also before doing that perhaps you might read this[^] as it might help your messaging attempts.
|
|
|
|
|
I will be giving a colleague training in C#, and would like to offer it in the form of a series of one day courses. I would like to cover beginners and intermediate level practical, real world, programming in, say, four courses, and I would like some input on my syllabus. So far I see language basics, and common tasks, e.g. basic data access, in course #1; collections and .NET classes, and Windows Forms essentials in course #2; component design and implementation, interfaces, inheritance, generics, reflection etc. in course #3; and course #4 as a guided practical project, of nature still to be determined.
Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.
|
|
|
|
|
Walk him through C# Step-by-Step by Microsoft press. You'll want to change some details on the way but it covers everything for the basics.
|
|
|
|
|
Have you tried just doing a ping on all the client instances, you know, just to see if they are running?
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
yeah... i tried
actually i tested like braodcasting 1-100 numbers
@ client side i receives like Client A receives -> 1 3 4 5 10 11 12 (missing ...)
Client B receives -> 1 2 3 4 7 8 15 16 (missing ...)
Client C receives -> 4 5 6 10 11 12 15 (missing ...)
so thats what im wondering if sockets are useless though connection is "TCP"
Determination and faith are the only keys !
|
|
|
|
|
Hi everyone
My apologies if this has been asked before, I suspect it may have but does anyone know of any tutorials for C# ListBox drag and drop in which you are simply dragging FROM a ListBox to an external program such as simply Windows Explorer?
All the tutorials I seem to find are regarding making controls accept drag events.
Regards and thanks in advance.
|
|
|
|
|
You should be able to do the following:
...
using System.Windows.Forms;
...
private ListBox lb;
...
private void SomeEvent(object sender, EventArgs e) {
object data = ...; // set this to be the data you want to be dragged
// note that the data MUST be a type recognized by the system
// for it to be able to be dropped onto the desktop (like a file)
DragDropEffects result = lb.DoDragDrop(data, DragDropEffects.All);
// Do some stuff based on whether the result is move, copy, etc.
}
Hope this helps!
Jeff
|
|
|
|
|
Hi
The ListBox I am using contains a list of FileInfo objects.
Are these translatable to the desktop or external application?
Regards
|
|
|
|
|
Oh and If so how do you perform the actual act of copying?
|
|
|
|
|
|
Hi
The first link you posted I had found today and I've managed to get the code working! Meant to post up here a link but thank you for this.
The second is very useful and great thanks to you for this. My aim for the application is to drag from my application to an external application and such I can imagine the file descriptor being a problem. The tutorial on this section may be able to help with some of the problems that might arise!
Thanks again Jeff
|
|
|
|
|
Hi experts,
I wanted to create a multi threaded windows service, can anyone reply me with the code, i will appreciate it.
The scenario is, i have multiple databases, and i have to connect to each database and do some work after each interval using windows service.
I could not able to find a simple multi threaded windows service code sample anywhere
Help needed, thanks,
Vijay
Vijay
|
|
|
|
|
I would be surprised if anyone would be able to post code for this type of request. I have written a few multithreaded services and can give you some pointers.
1. I usually put all of the code used by the thread in its own DLL, that way you can basically insantiate an instance of you class for each thread and limit the race conditions which can occur between threads.
2. Create a single public method in your class which can be the starting point for your thread, populate class properties with initial values in the Service code then use the ThreadStart or ParameterizedThreadStart methods to start the thread. Once the Thread has started (you can use ManualResetEvents to monitor this) add the Thread instance to an array in the Service code so all of the running threads canbe managed from the service. Doing so will allow you to stop the threads in the event that the service must stop.
3. I've found that .NET remoting is especiall handy with M-threaded Windows Services for sending control / command requests to the threads.
Here is an example of starting a thread:
try
{
m_ThreadStarted.Reset();
Thread ADTThread = new Thread(new ParameterizedThreadStart(ProcessADTThread));
ADTThread.IsBackground = true;
m_MasterThreadList.Add(ADTThread);
ADTThread.Start(DR);
m_ThreadStarted.WaitOne(-1, false);
Lines.Append(DR["ClientName"].ToString() + " Started\r\n");
}
catch (Exception Err)
{
m_ServiceLog.WriteEntry("Start Service WaitEvent Exception: " + Err.Message, EventLogEntryType.Error);
}
|
|
|
|
|
hi all,
is there a limitation of client-server .net socket application that when we broadcast message from server to all connected clients, not all the clients receive it. The condition is we are receiving real time data .
is it a limitation or i'm doing something wrong... any idea?
thanks
Determination and faith are the only keys !
|
|
|
|
|
Do all of the clients have the same firewall and configuration running?
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
yup.
actually all the client's instances are on same machine while server is on other machine
Determination and faith are the only keys !
|
|
|
|
|
Most routers kill network broadcasts. For guaranteed receipt use TCP/IP and send to each client individually.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
i m using tcp connection
thats why confused of not get messages.
it might be a router problem, but what if i run server and 4 clients on the same machine. i 've tested that way too but unsuccessful in receiving 100% messages.
Determination and faith are the only keys !
|
|
|
|
|
Broadcasts are a "best efforts" communication method, you should plan on messages NOT making it to a client if your using UDP broadcast messages.
|
|
|
|
|
the problem is m working on critical real time application in which the scnerio is like i must have to send message to all connected clients. if im using tcp then why there is a message loss, thats amazing to me atleast and wondering if i've done something wrong or that theory fails of reliable tcp connection
thanks
Determination and faith are the only keys !
|
|
|
|
|
Can anyone give me (rookie C# programmer) an idea how to use standard controls that can be dragged to a new location by the user during program execution. I would like to use various controls (TextBox, Button) to graphically represent a continuous beam (structural engineering) containing the member information (length, moment of intertia, cross sectional area, joint details, loads, etc).
Thanks in advance
Ron Modesitt
|
|
|
|
|
This is probably not a rookie task
Just as a starting point I would begin by monitoring the Mouse Button Click events as follows:
In the Mouse Button Down event I would record the coordinates of the mouse pointer and the control being clicked. Then in the button Up event I would check the coordinates of the mouse again. If the delta between the starting and new locations are greater than, say, the size of the control oringall clicked (or some other specific value) then set the Location property of the control to the new coordinates. This approach will not create the dragging effect visually but it should move the controls for you.
Good Luck.
|
|
|
|
|
Many thanks. I agree this is not a rookie task, however, your suggestion is a good idea and one that this rookie understands.
Ron Modesitt
|
|
|
|
|
i want to create left panel like that we used in c# 2005 that i can fix it or hide and visible during mouse move
plz i need this answer today immeditaly
thanks alot
md_refay
|
|
|
|
|
DockPanelSuite on SourceForge is what you are looking for
xacc.ideIronScheme a R5RS-compliant Scheme on the DLR
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|