|
Dear Mr. Viagra,
Take a look at the property DoubleBuffered . It is used on any control (the control that is updating over and over) to prevent flickering.
In Christ,
Aaron Laws
http://ProCure.com
|
|
|
|
|
Hi,
I've now created a little article[^] that explains how to animate GDI+ on WinForms.
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
That's exactly what I need, thanks Luc!
Motivation is the key to software development.
|
|
|
|
|
Dear Mr. Pattyn,
I couldn't see a way to contact you in your `little article.' But, I thought I would cite something I saw in MSDN:
"
To fully enable double-buffering, you can set the OptimizedDoubleBuffer and AllPaintingInWmPaint bits to true. However the preferred method for enabling double buffering, which yields the same result, is to set the DoubleBuffered property for the control to true.
"
Nice article, though!
[EDIT]
http://msdn.microsoft.com/en-us/library/system.windows.forms.controlstyles.aspx[^]
Paragraph 3 of Remarks.
In Christ,
Aaron Laws
http://ProCure.com
|
|
|
|
|
Hi Aaron,
thanks for your feedback.
I have updated the article, so it now uses the Control.DoubleBuffered property.
Cheers.
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
a
modified 23-Nov-14 7:02am.
|
|
|
|
|
Create a user control, and use its paint event. Then you can draw it however you want and give it a function like...
int percentToDraw;
void UpdateProgress(int percent)
{
percentToDraw = percent;
this.Invalidate();
}
void OnPaint(object sender, PaintEventArgs e)
{
}
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Check out Ruler Control[^]
It was top of the list in Google for 'C# Ruler'.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Hi. I trying to get caller ID using tapi3lib examples from this forum.
I tried with multiples codes but ever some errors happens.
case TAPI3Lib.CALL_STATE.CS_OFFERING:
addtolist("A party wants to communicate with you!");
ITCallNotificationEvent cne;
ITCallInfo ci = cne.Call;
CALLINFO_STRING ci_s;
string callerid = ci.get_CallInfoString(ci_s);
MessageBox.Show(callerid, "Incoming call");
break;
error messages:
Error 4 Use of unassigned local variable 'cne' D:\tapi3_dev\tapi3_dev\Form1.cs 536 41 tapi3_dev
Error 5 Use of unassigned local variable 'Caller_ID' D:\tapi3_dev\tapi3_dev\Form1.cs 538 65 tapi3_dev
Anyone could help me to get caller id with any exaple code, please?
Regards and thanks a lot.
|
|
|
|
|
grefu wrote: ITCallNotificationEvent cne;
ITCallInfo ci = cne.Call;
cne has not been initialised to anything so cannot be used yet.
grefu wrote: CALLINFO_STRING ci_s;
string callerid = ci.get_CallInfoString(ci_s);
I suspect the same holds true of ci_s .
|
|
|
|
|
Ok, but how must I initialize those variables?
Regards.
modified on Thursday, November 19, 2009 3:34 AM
|
|
|
|
|
grefu wrote: Ok, but how must I initialize those variables?
You need to set them to instances of their classes. I have no idea what this entails as I know nothing of Tapi3lib; you need to read the documentation.
|
|
|
|
|
Hi.
I suppose that I must use this code:
<br />
private ITCallNotificationEvent cne;<br />
...<br />
string callerid = cne.Call.get_CallInfoString(CALLINFO_STRING.CIS_CALLEDIDNAME);
But error occurs:
(sorry for translate)
'Referencia a objeto no establecida como instancia de un objeto'
'Object reference no stablish as an object instance'
Sorry. I don't know much about C# and I'm not be able to continue with this.
Your help is much apreciated.
Regards.
|
|
|
|
|
grefu wrote: I suppose that I must use this code:
private ITCallNotificationEvent cne;
...
string callerid = cne.Call.get_CallInfoString(CALLINFO_STRING.CIS_CALLEDIDNAME);
No, it's still wrong, cne still has no value.
grefu wrote: Sorry. I don't know much about C# and I'm not be able to continue with this.
There is much material to learn from if you need it.
|
|
|
|
|
hi guys,
i need some help on graphs for my windows mobile 6.5 application.
I wanna do a finance graph with the stock prices. (x axis = time, y axis =stock price)
On top of that, i would like to add icons to certain point of the graph based on the time.
How can i acheive that? thanks in advance
|
|
|
|
|
|
Hello,
I have a minor problem. I have a Mouse Enter event declared for a Panel Control in c#.
The Event is detected correctly when I enter the panel, but if I have other controls in that panel it does not work.
So if I drag the mouse over a control from that panel, the mouse enter event is not activated. I hope I am explaining correctly.
The ideea would be to get Activate the mouse enter event even if the mouse is entering a control from tha panel.
Hope someone can help.
Thanks
|
|
|
|
|
Two choices:
1. Make all the subcontrol mouseOver events point to the same event handler as the Panel MouseOver Event.
2. Do the same thing, dynamically.
That is, handle the ControlAdded and ControlRemoved events of the panel and add/remove the handler on the fly e.g.
void Panel1ControlAdded(object sender, System.Windows.Forms.ControlEventArgs e)
{
e.Control.MouseEnter += this.Panel1MouseEnter;
}
void Panel1ControlRemoved(object sender, ControlEventArgs e)
{
e.Control.MouseEnter -= this.Panel1MouseEnter;
}
However this second options relies on adding the handlers to the ControlAdded and ControlRemoved events before the sub controls are added.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Hello guys
Can you please help me with this one?
I want to make a mehtod that when you pass it a particular month and year it will return you the ammount of Mondays that are found in that Month of that particular day.
Anyone has any ideas?
Thank you in adavance
Regards,
Christian Pace
|
|
|
|
|
A possibility:
Use DateTime() to discover what day of the week is 1st of the month.
From there you can calculate when the first Monday is.
Then, from the number of days in the month you can calculate how many more there will be.
|
|
|
|
|
|
Code is for VBA but you can figure out from it to write equivalent code in C# or Vb.Net
|
|
|
|
|
That's not what the OP asked for...
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
|
NSS
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|