|
Hi
How can I apply double buffering to the form ?
Thnaks
|
|
|
|
|
If your using .Net 2.0 theres a property on the form called 'DoubleBuffered', just set it to true.
|
|
|
|
|
Hello,
If you are using .Net 1.x, you have to use the SetStyle method of the Form class.
this.SetStyle(
ControlStyles.DoubleBuffer |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.ResizeRedraw,
true);
In .Net 2.0 there is a new member of the ControlStyles enum which optimizes the perfomance of DoubleBuffering.
this.SetStyle(
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.ResizeRedraw,
true);
All the best,
Martin
|
|
|
|
|
Hi
Thank you very much indeed.
Best regards
|
|
|
|
|
You are welcome!
All the best,
Martin
|
|
|
|
|
Can anyone pls give me a smaple application of this code usage in double buffering and preview of teleprompter window of same form on two monitors.
this.SetStyle(
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.ResizeRedraw,
true);
Thank you.
|
|
|
|
|
hello,
I also want achieve the same task, but unfortunately i am not able to succeed, I used grid for developing prompter but my issue is grid scrolling is row by row not pixel by pixel.
Kindly give me some idea to develop prompter app.
Thanks
|
|
|
|
|
I have a tablelayoutpanel.In this I have added a usercontrol.This usercontrol creates a graph on itself.Now I print the tablelayoutpanel by using DrawToBitmap.But it does not print the entire tablelayoutpanel.It prints only half of it.The remaining part which shld actually come on the second printpage is just not there.Can anyone tell me a solution so I can print the entire tablelayoutpanel on multiple print pages.
Anita
|
|
|
|
|
I'm developing a 'socket programming solution for client server architecture'. There a client connects to a server and send messages.
But i got this error,"cross thread operation not valid" and found a solution as follows.
It has to pass the thread address but i dont know how to obtain a thread address.
Could you please tell me how to obtain a thread address.
This is the solution i found.
----------------------------------------
Thread mythread = new Thread(addressOf thread1);
mythread.start();
Sub MyThread1
' Working code
' Working code
' Working code
' Working code
' Working code
' Working code
AccessControl();
End Sub
--------------------------------
Thank you.
sweenySL
|
|
|
|
|
It not the address of the thread, it is a delegate for the method to invoke when the thread begins execution. Check the documentation on MSDN. Here is a sample.
Public Class Test
<mtathread> _
Shared Sub Main()
Dim newThread As New Thread(AddressOf Work.DoWork)
newThread.Start()
End Sub
End Class
Public Class Work
Private Sub New()
End Sub
Shared Sub DoWork()
End Sub
End Class
|
|
|
|
|
Hi,
Thanx alot for your reply.
sweenySL
|
|
|
|
|
Hi
Actually you don't have to obtain the address of a thread instead you provide the name of a function (Your thread function) and .net will find the address for you . AddressOf is a VB.net keyword that returns the address of a callback function.In C# you don't have to use any keywords .
For example:
<br />
Thread myThread=new Thread(new ThreadStart(MyFunction));<br />
myThread.Start();<br />
That MyFunction is a call back function that will be called when the thread is started and the ThreadStart is a delegate to MyFunction.
Regards
|
|
|
|
|
Hi
Thank you so much for your reply. Hence im not much familier with C# it helped me alot.
Once again thank you so much.
|
|
|
|
|
I need to save the entire form in bmp format. I 've used the following code:
Bitmap bi = new Bitmap(this.Width, this.Height);
this.DrawToBitmap(bi,new Rectangle(0,0,this.Width,this.Height));
bi.Save (@"c:\Test.bmp", ImageFormat.Bmp);
Problem: only the visible area of the form is saving in bmp format. the other part like area of the form occupied by scroll bar is not saving.
could you please give me any suggestions.
Anita
|
|
|
|
|
|
Can you please give me a regular expression in c# to remove single line comments from a string and its urgent
Criteria
a. // text --- Should be removed
b. file:///text.txt -- should be retained
c }//abc -- hear //abc should be removed
Thanks in Advance
Thanks and Regards
Irsh
Thanks and Regards
Irsh
|
|
|
|
|
can you write example better ?
|
|
|
|
|
The regular expression to match single line comments would be
(with the multi-line option turned on) basically looks for // followed by any number of characters until the new line.
|
|
|
|
|
Thank you very much
I got the solution.
Thanks and Regards
Irsh
|
|
|
|
|
hello
i need a component that connect send a message to yahoo messenger.
and also take me all my fried list ...
can you help me?
tanks
|
|
|
|
|
|
i have field in my database : sitehit.
If someone has visited my site, value '1' must be in 'sitehit' else it must contain '0'.
how is this possible?
Thanking you in adv.
regards nekshan.
|
|
|
|
|
Sounds like you want to store a cookie on the local machine. You can't identify someone to store something local, because their IP address is likely to change the next time they connect.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
In Visual C# 2005 IDE, can I customize the "using" directives that are automatically added when a new file or new class is added to the project?
Also in Express?
|
|
|
|
|
Not that I know of...
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|