|
Tony Honter wrote: Each stroke i will draw 100 points around it.
Your code draws ten times that!
Tony Honter wrote: for (int j=0; j<1000, j++)
You are aware that compilers don't turn comments into code, aren't you?
Tony Honter wrote: // Only draw if we are at least 4 units away
// from the end of the last ellipse. Otherwise,
// we're just redrawing and wasting cycles.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
I hope others have or will give a solution. I didn't study all that, for obvious reasons.
I did notice an interesting comment ("Only draw if...") but did not see its implementation.
|
|
|
|
|
Graphics may use up a lot of resources. Sometimes it may help to explicitly call the Garbage Collection:
GC.Collect();
GC.WaitForPendingFinalizers();
|
|
|
|
|
hi guys
i want to read sms with gsmcomm from nokia phone but i cant read and get error
whats problem ?
from gsmcomm or phone?
thanks
|
|
|
|
|
What's the error and what's the code?
|
|
|
|
|
DecodedShortMessage[] messages = CommSetting.comm.ReadMessages(PhoneMessageStatus.All, storage);
foreach(DecodedShortMessage message in messages)
{
Output(string.Format("Message status = {0}, Location = {1}/{2}",
StatusToString(message.Status), message.Storage, message.Index));
ShowMessage(message.Data);
Output("");
}
Output(string.Format("{0,9} messages read.", messages.Length.ToString()));
Output("");
error:Phone reports generic communication error or syntax error.
of curse i get this code from this site mean codeproject
|
|
|
|
|
behzadcp wrote: of curse i get this code from this site mean codeproject
Then you should post your question in the forum below the article where you got the code, so the person who wrote the code will see your problem.
It's time for a new signature.
|
|
|
|
|
Hi All,
The Problem:
I currently have a few hundred crystal reports which get populated via an ODBC connection. I have to programmatically change this so I can populate a DataSet from a csv file and then populate a report based on the dataset. The main aim is to do this without actually modifying any of the reports (as that would mean months of re-testing of hundreds of reports....and common, who likes to fight with the testing department ;->)
The ideal solution:
My app gets 3 parameters 1) actual report location, 2) report parameter csv file location 3) report data csv file location. To over-ride the ODBC connection specified in the report and populate the report via a dataset populated from the specified csv file.
So far:
At the moment I load the report, populate the report's parameters with those specified in the csv file, create a dataset based on the data csv file and set the report dataset with cryReport.SetDataSource(ds.Tables["tableX"]). The table name in the dataset has been kept the same as the default table name used in all the reports.
The problem seems to be that the report is not pulling in any of the data specified in the DataSet? As far as I can gather from searching the net, you can only populate a report with a strongly typed dataset? I don't see how you can create a strongly typed dataset programmatically for each dataset every-time the application is called, as this cannot be done beforehand.
I would appreciate any direction or help with this problem!
Thanx,
MC
|
|
|
|
|
I can't help with your problem, but it is a very bad idea to post your email address to any forum - not just codeproject. Unless of course, you really like spam...
Change your name! If anyone really wants to contact you privately, there is a option to allow emails at the bottom of each message - this sends an email to your registered address without revealing it to the sender.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Hi,
I'm trying to re-host wf 4.0 designer (done that) and use custom activity controls that have similar behavior with FlowSwitch. Could you tell me how I could do a custom FlowSwitch with modifiable content( I need a custom picture and a custom textbox). If anybody could give me an example would be great.
Another question is how do I register to events like FlowNode click on a flow chart?
Thank you
|
|
|
|
|
I would like emptying TexBox who are in treatment but in the event selectedchanger:
texbox.text = String.Empty , find an error message because the content of the TexBox changes.
can you help me??
thank you
|
|
|
|
|
tek 2009 wrote: an error message
interesting
tek 2009 wrote: can you help me??
sure
|
|
|
|
|
|
Maybe he means "an error message". Its very specific and helps to guess what your problem is.
Next time write "My application crashs!" to get some more wild guesses.
Greetings
Covean
|
|
|
|
|
He was making a point of being as unspecific as you were.
If you get an error message and need help with it, then include what the error message was.
|
|
|
|
|
Hi there ,
You can't empty the text box while it's changing , it would be user hostile !
I recommended this :
private void textBox1_Enter(object sender, EventArgs e)
{
textBox1.SelectAll();
}
So the user can empty the text box with one Button click
Please , Don't Mind the Other posters ! , they just didn't read the rules !
I know nothing , I know nothing ...
|
|
|
|
|
Hi,
I'm using picturebox to show some images that my application hold.
I want to mark with some square part of my image ( mark in the code ).
How can i do it ?
Thanks.
P.S I'm using simple winform (not WPF)
|
|
|
|
|
You'll need to create a watermarked version of the Image before setting it into the PictureBox control.
/ravi
|
|
|
|
|
Maybe you want something like the following:
Graphics g = Graphics.FromImage(pb.Image);
g.DrawRectangle(Pens.Red, pbleft, pbtop, pbwidth, pbheight);
g.Dispose();
This will draw a red rectangle in your image. Is that what you want?
|
|
|
|
|
I don't think the PictureBox will even be aware you did that. You would have to reload the image or otherwise signal it about the change.
BTW: I think PictureBoxes are crap anyway, one should not even try and do such complex things to them.
|
|
|
|
|
That's probably true. In that case
Image im = pb.Image;
Graphics g = Graphics.FromImage(im);
g.DrawRectangle(Pens.Red, pbleft, pbtop, pbwidth, pbheight);
g.Dispose();
pb.Image = im;
|
|
|
|
|
I have to Get data from database and fill data into ListBox using javascript. I did like below
var strConn = 'Provider=SQLOLEDB;server=localhost;user id=sa;pwd=***;initial catalog=xxx;';
var cn = new ActiveXObject("ADODB.Connection");
cn.open(strConn);
var rs = new ActiveXObject("ADODB.Recordset");
rs.Open('SELECT EmpId,Name FROM Employee', cn);
rs.MoveFirst
while(!rs.eof)
{
var opt = document.createElement("Option");
opt.text = rs.fields(1);
opt.value = rs.fields(0);
document.getElementById(ListBoxCtrlName).options.add(opt);
rs.movenext;
}
rs.close;
cn.close;
This is working fine in IE only when access datasource across domains enabled otherwise listbox not getting data.How can I fix this issue in IE And FireFox
|
|
|
|
|
Try posting this in the Javascript forum?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
As mentioned you should have posted this to the JavaScript forum.
ActiveXObject is an IE object and not officially supported in FireFox, AFAIK. Most importantly though you are exposing the details of your database, username, password, table, table structure; a huge breach of security.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Oh jeez, not only a conn string in javascript, but a conn string with an sa password!
Looks like im going to be employed for the foreseeable future.
|
|
|
|