|
|
i have a toolstrip container which contains some toolstrips. I want toolstrips's order to be reverse displayed at runtime.Means the order i added the controls to be reversed. how can i make it?
|
|
|
|
|
|
can u please tell it with an example prgm
|
|
|
|
|
Hi all, I just listen a socket for permanent data and want to save it in a file. Can anybody help me?
//Socket socket = ...
NetworkStream ns = new NetworkStream(socket);
Int32 i = ns.Read(bytes, 0, bytes.Length);
while (i != 0)
{
//Code here
}
|
|
|
|
|
You can save the data like this
using System.IO;
...
NetworkStream ns = new NetworkStream( socket );
byte[] bytes = null;
Int32 reveivedDataLenght = ns.Read( bytes, 0, bytes.Length );
FileInfo receivedDataFile = new FileInfo( @"C:\receivedDataFile.bin" );
FileStream fs = receivedDataFile.Open( FileMode.Append, FileAccess.Write, FileShare.Read );
fs.Write( bytes, 0, reveivedDataLenght );
|
|
|
|
|
|
Hello everyone,
How can I check if the mouse is inside or outside the client area.. To be more specific I have tried to make a calculation for inner controls but this do not work for the Form.
I am doing a drag-drop operation and I need to know when the user tries to drag something outside the main form. Is there a way to achieve ?
Thanks in advance and best regards !
.:: Something is Wrong ::.
|
|
|
|
|
Hello,
You could set a flag at the MouseLeave event of the Form.
Hope that helps!
All the best,
Martin
|
|
|
|
|
Thanks for your reply but it doesn't work.. I add a MouseLeave event which set the mouseInside booleand to false and a MouseEnter event which set the same boolean to true..
But interestingly when my mouse is over a control inside the Form the MouseLeave event is fired..
.:: Something is Wrong ::.
|
|
|
|
|
for which controls are you useing MouseLeave and MouseEnter events?
I think you should specify those two events for every control in you form.
Hope it helps
|
|
|
|
|
I use them hust for the main form, but definin those events for every control won't either work
.:: Something is Wrong ::.
|
|
|
|
|
Ohh,
sorry!
How are you draging a control of your mainform outside the mainform?
Martin
|
|
|
|
|
Well the exact problem is this. When the user drags a control the control moves with the mouse. When the user drops the control, the program makes some calculations and decide what to do with the control (return it to its original point, leave it where it is dropped, dispose the control etc.).
The user is expected to drag-drop inside the main form but as everyone know the user is the one who do not use the program as expected
So when the user tries to drag the control outside the main form (sure the control stays inside the form but the mouse is outside and the left button is released outside) no calculations which are done in the drop event are made.
.:: Something is Wrong ::.
|
|
|
|
|
Hello,
So you have the possibilty to add the MouseLeave event additionaly to the controls.
Then you could set a flag if it is dragged and reset it if it was dropped.
If the mouse leave event is fired and the flag is still set, you have the possibility to validate whatever you whant!
Hope to help you now!
All the best,
Martin
|
|
|
|
|
I have similar problem. Don't we have any other solution other than adding MouseLeave and MouseEnter to inside controls.
Thanks
Muthu.
|
|
|
|
|
Hello,
Sorry, but I have no other solution for you!
All the best,
Martin
|
|
|
|
|
Hi
I have a C# Windows Application that copies a lot of data between different databases. All the copying is being controlled by a method in a helper class and this method is being called when the user clicks a button on the Windows form. Is there a way of showing the progress of this copying in a progress bar in the Windows form?
Thanks.
Kobus
|
|
|
|
|
You could add an event to your helper class that provides some progress information and is triggered by the copy method. Before calling thios method, register to the event and adjust the progressbar according to the information provided by the event.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
You stole my signature
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
You could run the method inside of a BackgroundWorker. With the BackgroundWorker you can get the progress of the method through its properties and you can define how the progress...well progresses.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
i want yo know that how i can add data from a table into a drop down.
ursbuddy
|
|
|
|
|
SqlDataSource1.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["YourConnStr"].ConnectionString;
<br />
SqlDataSource1.SelectCommand = "select * from yourtablename";
SqlDataSource1.DataSourceID = "SqlDataSource1";
SqlDataSource1.DataTextField = "ColText";
SqlDataSource1.DataValueField = "ColVal";";//DataValueField represent value<br />
SqlDataSource1.DataBind();
Hope this helps
"My advice to you is to get married. If you find a good wife, you will be happy; if not, you will become a philosopher." Socrates
|
|
|
|
|
|
you are welcome...
example which i posted before to you it's in VS2005
"My advice to you is to get married. If you find a good wife, you will be happy; if not, you will become a philosopher." Socrates
|
|
|
|