|
try calling...
this.Refresh();
after each text update, this is a quick fix.
I would suggest you look into the BackgroundWorker component for a better solution
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I went for Background worker, it is a great solution.
Thanks alot.
|
|
|
|
|
I want to send Email in Arabic ;
I have used genaral SmtpMail class to send email,.. but when i send Arabic text email it shows like '?????????' for the all text;
i did objMsg.BodyFormat = MailFormat.Html; also but no Luck.
There are many ActiveX,.Component available,..
But i want to know in using .Net class same SMTP;
If any body know plz tell me;
Your corperation is appreciated!
B/rgs
Anushka
|
|
|
|
|
try using
mailMessage.BodyEncoding = Encoding.Unicode;
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I've used
theMessage.BodyEncoding = Encoding.UTF8;<br />
Is using Encoding.Unicode better for Arabic than Encoding.UTF8 ?
Regards,
Gary
|
|
|
|
|
Hi
I'm trying to add a web reference to my windows app, but .net is not allowing this, i'm getting the following error Operation is not valid due to the current state of the object., i understand that this has to do with proxy, how do i solve his problem, my browser opens the web service without a problem
thanx in advance
|
|
|
|
|
try this in your application's web config/ app config and add the following under the <configuration> element:
<system.net>
<defaultProxy>
<proxy usesystemdefault="True" proxyaddress=http:
</defaultProxy>
</system.net>
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
i tried that it doesn't seem to be working.
|
|
|
|
|
Google and I were not friends today, so I ask you guys here!
This project has GridView control and MenuStrip which is set in grid's ContextMenuStrip to pop up when user is pressing right mouse button over the grid.
When user is pressing right mouse button over GridView the current row is not automatically set to the row "under" mouse pointer.
How is it possible to change current row (focus on) to the row under mouse pointer at that point before toolstrip menu is shown?
|
|
|
|
|
Raybarg wrote: How is it possible to change current row (focus on) to the row under mouse pointer at that point before toolstrip menu is shown?
It may not be. Without looking at the Grid documentation I would guess, like other controls, you can determine the row based on the mouse pointer coordinates.
Keep in mind this is a complete guess on my part and if I am wrong someone else will likely reply to you with the correct solution.
|
|
|
|
|
In the cell mouse down event open your context menu rather than using the built in context menu property.
|
|
|
|
|
The row is selected on the left mouse down.
while in your case, you do a right mouse click to show the menu strip.
You can instead fake this in the OnCellMouseClickEvent
if (e.Button == MouseButtons.Right)
{
if(this.datagridview1.SelectedRows.Count > 0)
this.datagridview1.SelectedRows[0].Selected = false;
this.datagridview1.Rows[e.RowIndex].Selected = true;
}
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Yes, that works with the solution Ennis suggested to pop the menu after doing that.
And here is how I got the menu positioned correctly:
Point pt = MyGrid.PointToClient(Control.MousePosition);
MyMenuStrip.Show(MyGrid, pt.X, pt.Y);
Thank you all for helping in this simple matter.
|
|
|
|
|
Hi again!
Since I had CurrencyManager in BindingContext, your suggested solution resulted in CurrencyManager position not changing when user right-clicked the grid so I had to google again, this time with more words in the issue to succeed.
Here's the solution:
Using DataGridViewCellMouseEventArgs e I can change current row by setting CurrentCell property:
this.datagridview1.CurrentCell = this.datagridview1[e.ColumnIndex, e.RowIndex];
And I repaste the code submitted in other post which pops the context menu also:
Point pt = datagridview1.PointToClient(Control.MousePosition);
menustrip1.Show(datagridview1, pt.X, pt.Y);
Thanks for your help again, the grid is working exactly like I want it to now!
|
|
|
|
|
hi. I coded a multi threaded TCP Server (using .net 2.0)
and also I coded a client side program.Client side programs are executing on Mobile Devices
When the client number is six or seven a serious problem occurs , The problem is even if a mobile device send a message to server properly (Socket.Send is succesful and then start waiting for the response ) but often the response message does not arrive to client side.I think this is so weird
Is there a concurrent use of server side network i/o or something and needed to thread synchronization
to send data to clients or this is all about wireless network performance
|
|
|
|
|
It is likely a design issue. Multithreaded programming is an Advanced concept (to do correctly) and sockets programming is up there as well. (Compared to ASP.NET) If you have a TCP/IP socket you are guaranteed to be able to get data in order or get an exception (or socket closed).
|
|
|
|
|
but I look at a lot of sample code of multi threaded server applications.I can not find major diffirences to cause this kind of problem.Just I can see about that I don't use asynchronous functions for example networkstream.BeginWrite.
is that ok the concurrent (from all running threads) use of networkstream.Write function
may be somehow some Write functions fails according to concurrent use I don't know really.
|
|
|
|
|
All of the sample code on the web for multi-threaded tcp/ip code is derived from the MS sample which is crap.
|
|
|
|
|
my server code look like this sample code(Concurrent Server Application Example) its url
http://blog.rednael.com/2008/11/07/ParallelComputingWithSockets.aspx
I am not sure it is crap or something else but I can not find any better sample .
But I want to repeat my main problem is clients sometimes does not get response messages from server even if at the first it can send messages server properly
any idea..? thanks a lot
|
|
|
|
|
Back in 1999 I spent 3 days with a packet sniffer to debug a client server application I wrote in C++. How long have you spent analyzing the raw network traffic and your code?
The code is hard to write and isn't usually a one line fix or an, oh you missed this. And like I said previously, all samples on the web derive from the MS sample which is crap including the link you provided which you would have known had you bothered to look at the MS sample.
Crappy MS code that has been plagiarized the Internet over with no real value ever added. [^]
|
|
|
|
|
ok I undestand you all sample codes looks like each other but is there any good one in internet or book to inspire me
|
|
|
|
|
check out sockets.com. I first used it in 1994 or 5
|
|
|
|
|
kordel222 wrote: I think this is so weird
There is nothing weird about it. Most people will have difficulty properly coding a multithreaded socket server even if they have vast experience doing it. If you are a novice then this is completely normal.
The thing that is actually weird is how many novices believe it will be simple to do it.
|
|
|
|
|
I don't mean this is a easy subject.indeed this is the hardest programming subject I ever seen
I agree with you.
but still is there not even a clue about my question.
|
|
|
|
|
hii..
m creating a c# windows application......
in this i need to complete all my task at the init event of form......and after completeion of work.....i need to completely stop the application
|
|
|
|