|
Can you be more specific?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Sorry,
Thanks for the advise... i'll give better details next time
Have worked out my problems anyhow.
|
|
|
|
|
Digger27 wrote:
Having trouble exporting data from DataReader from access database to csv file
Again, like Colin said we need more info. This shouldn't be hard and both Heath and I have discussed this issue in the past in this forum. Take a look at the following[^] post (similar concept) as well as Heath's[^] response too. Hopefully this will get you started.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Can someone please help me i would like to be able to send and retrieve data from the ISA slot (i am making an IO card and would like to use C# as the controling software)
Are there any classes avaliable that would allow such bus access in an XP enviroment
Any help or ideas would be greatly aprieciated
|
|
|
|
|
zaarzzz wrote:
Are there any classes avaliable that would allow such bus access in an XP enviroment
No, NT-based OS's will NOT allow you to this directly. You will the Windows DDK AFAIK, and write your own driver and start praying (alot)!
top secret Download xacc-ide 0.0.3 now! See some screenshots
|
|
|
|
|
Hi,
Can C# export a report (created using Crystal Reports 9) to multiple excel files automatically (in background)?
Because the report is to big for only one excel file, so i need to split it into more than 1 excel files.
Thank you for the help.
|
|
|
|
|
What I use to do for exporting is exporting HTML file but under XLS extension (Excel can understand HTML).
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition","attachement; filename=\"SomeFile.xls\"");
That is the code that I entered in my Page_Load. Everything works fine after that
If someone says "Die mortal!", don't stay to see if he isn't.
|
|
|
|
|
Hi,
I am having the following problem with a richtextbox. I have files that I read into it that often contain one line that may be 1 million characters or more.
When I read these long lines in, the line is displayed on multiple lines in the richtextbox. Each display line seems to break at around 3066 characters. (Reading these into an application like notepad, will give me what I am looking for which is a one line display).
All I'm really doing in the code is opening the file using a streamreader and reading it with ReadLine(). Looking at the richtextbox.Text property, all looks well until it displays.
I'd appreciated any tips you may have.
Thanks
Dave
|
|
|
|
|
Are you sure it's the number of characters? All control's are limited in height and width by int16.MaxValue (32767). If you try to draw anything beyond those borders, it will be clipped. Perhaps this is what you're seeing with the RTB?
Judah Himango
|
|
|
|
|
Why would you want to load up one line of any TextBox with over a million characters? What purpose could that possibly serve?
Look into just adding the first, say couple hundred characters of the line into the RichTextBox. If you need to append all these things together and your using the RichTextBox to do this, don't. Use the RichTextBox for displaying information and then write your code for appending the data together.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I do a lot of work with EDI files that in many cases aren't sent with \r\n delimiters and often it's useful to do a quick scan of the entire line as it was sent- so that's the main reason.
As I mentioned before applications sucha as notepad, TextPad or VS.NET can read something like this into a single line. But I'm obviously missing something.
It would seem to me that just assigning to the Text property or Lines property, that string would do the trick, but it doesn't.
Also, as to Judah's point, I'm not sure that it is related to the number of characters, that 3066(+/- a few characters) is just where my line keeps breaking at.
Thanks
Dave
|
|
|
|
|
I have a File with NODES (x and y values).
Is it possible to draw a line with this nodes , and can someone show me how to do it (read it from file and draw)? I am beginer
I would like to have it in my form, schould I create Pannel to draw on it or how
This is how my file looks like
1 0.0000E+00 -0.4396E+01
2 0.1136E+01 -0.4506E+01
3 0.2217E+01 -0.4706E+01
4 0.3290E+01 -0.4953E+01
5 0.4355E+01 -0.5230E+01
6 0.5409E+01 -0.5519E+01
7 0.6447E+01 -0.5808E+01
8 0.7472E+01 -0.6075E+01
9 0.8488E+01 -0.6324E+01
10 0.9492E+01 -0.6548E+01
11 0.1049E+02 -0.6749E+01
12 0.1147E+02 -0.6926E+01
13 0.1245E+02 -0.7086E+01
14 0.1343E+02 -0.7230E+01
15 0.1440E+02 -0.7360E+01
16 0.1538E+02 -0.7476E+01
17 0.1636E+02 -0.7568E+01
18 0.1735E+02 -0.7649E+01
19 0.1833E+02 -0.7719E+01
20 0.1931E+02 -0.7782E+01
21 0.2030E+02 -0.7836E+01
22 0.2130E+02 -0.7869E+01
23 0.2230E+02 -0.7902E+01
24 0.2331E+02 -0.7936E+01
25 0.2431E+02 -0.7969E+01
26 0.2532E+02 -0.8003E+01
27 0.2632E+02 -0.8036E+01
28 0.2733E+02 -0.8070E+01
29 0.2833E+02 -0.8103E+01
30 0.2934E+02 -0.8137E+01
31 0.3034E+02 -0.8170E+01
32 0.3134E+02 -0.8204E+01
33 0.3235E+02 -0.8237E+01
34 0.3335E+02 -0.8271E+01
35 0.3435E+02 -0.8336E+01
36 0.3535E+02 -0.8404E+01
37 0.3635E+02 -0.8474E+01
38 0.3735E+02 -0.8547E+01
Thanx, .a.d.o.
|
|
|
|
|
Well, this is a multi part question really.
Where are you getting stuck on? Or are you needing assistance with some design as well?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
OK
I am creating a little win application, in which I can select Input and Output Files for calculations I need. Calculation runs as a extern EXE File.. After ewerything is done, as result I get one text file where I can find data about NODEs (points) (x and y data). Now in my app, I need to create plot (drawing) in one pannel or something like that, a LINE which goes thrue my nodes..
I need to load this nodes file, (read it) and somehow create that plot..
And that is only for one moment, in next moment I have another Nodes position, and my LINE has changed.. So I taught, if I can do it for one time step (moment) I would change those pannels and so have something like an Animation..
|
|
|
|
|
Okay, if I understand you correctly you want to draw a line between nodes 1 and 2, then a moment later between 3 and 4 and so on?
Reading the file should be fairly easy:
ArrayList nodes = new ArrayList();
try
{
using (StreamReader sr = new StreamReader("TestFile.txt"))
{
String line;
while ((line = sr.ReadLine()) != null)
{
string[] values = line.Split(' ');
double x = Convert.ToDouble(values[1]);
double y = Convert.ToDouble(values[2]);
PointF node = new Point(x, y);
nodes.Add(node);
}
}
}
catch (Exception e)
{
}
DISCLAIMER: I typed this directly into the browser, there may be syntax errors.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
In one moment I need line thrue all points, in next moment I get another node set (in my file are meny node sets for diferent moments (time steps), and I should draw a whole new line.. As result I should have an Animation, where one line getting deformed (changes shape).. At first it is straight (First time step-moment):
.................................................. at the End (last step) it should looks like:
......
. .
............... .................. (something like that
I hope that U understand, I appologise about my poor English
|
|
|
|
|
Okay, so you have one file. That file contains many node sets. A node set is a list of coordinates to draw a polyline through (lots of straight lines connecting each node).
How do you determine from your file the start of a new node set? In the example you gave before, each line is numbered sequentially. I don't see anything to mark the start of a new set of nodes.
Incidentally, did you understand my explanantion of reading the file?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
I have sent a sample file to You as attachment in mail message.. Its *.dat file, but You can open it with any text editor
|
|
|
|
|
Okay your file format, with all the spaces properly preserved is as follows (so anyone else can keep up with the thread
$ State Nr.: 150
1 0.0000E+00 -0.4396E+01
2 0.1136E+01 -0.4506E+01
3 0.2217E+01 -0.4706E+01
The easiest thing to do is when reading the file, each line that starts with a $ denotes a new node, so you can use a line like:
if (line[0] == '$')
{
}
So, before you start reading your file you might want to create an array to hold the node sets in, then each time you encounter a dollar symbol at the start of a line you can create a new array to hold each of the nodes in. The array of nodes gets added to the array of the nodesets. A node set is an array of nodes.
Then when you have finshed reading the file you will have an array of node sets (in other words an array of arrays).
Does this help?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Yes off course it helps, now I knew how to read it from file..
I will have to find a way to plot those lines somehow..
Thank You very much
|
|
|
|
|
For plotting your node list you could derive a class from Panel and then override the OnPaint function.
I'd save the ArrayList of Point s as a property of your new class:
protected ArrayList _graph = new ArrayList();
public ArrayList GraphPoints
{
get { return _graph; }
set { _graph = value; Invalidate(); }
} Then you can write something like this in the overridden function:
protected override void OnPaint(PaintEventArgs pe)
{
Point[] points = new Point[GraphPoints .Count];
GraphPoints .CopyTo(points);
pe.Graphics.DrawLines(Pens.Red, points);
} Regards,
mav
|
|
|
|
|
HI~
I written a class Form1 which inherit system.windows.forms.form
I close a form using "f1.Close()" and then later I new it again using the statement "f1 = new Form1()". When I click and use the control inside the form like tabControl, it causes a "System.ObjectDisposedException" error.
I have new the form again by why still say the object is disposed?
How to solve the problem?
thanks~
|
|
|
|
|
hi,
I didn't get you.
You Wrote
written a class Form1 which inherit system.windows.forms.form
I close a form using "f1.Close()"
that's is fine
you Wrote
I new it again using the statement "f1 = new Form1()".
from where you are calling this ?
You Wrote
When I click and use the control inside the form like tabControl, it causes a "System.ObjectDisposedException" error.
What you mean by this ?
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
sorry~
I have a class group all the form together.
First, I create an instance of class Form1 by using this statement
"Form1 f1 = new Form1()";
Then I somewhere call "f1.Close()".
As the object f1 is close, then I execute this statement again"
"f1 = new Form1();" in the grouping class
note the instance "f1" is the same instance as the previous call.
then after I execute this statement and execute "f1.Show()", f1 is shown on the screen. However, when I use the method of the control and this form, say, "this.textBox1.Text = "something"; ", it causes an System.ObjectDisposedException.
I think I new f1 again through it is closed before. However, exception occurs. WHy?
Thanks
|
|
|
|
|
HI,
On next instance call make sure whether object is alive or not.
if(f1.Equals(null))
f1=new Form1();
else
f1.textbox.text="something";
If this idea doen't surve your purpose then please send me the code block. i can help you. Sure.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|