|
can you send me any sample code for this ?
|
|
|
|
|
Really?? You can't do this:
MyBook = APexcel.Workbooks.Open(CSVfilepath);
Why does Microsoft bother writing documentation on the API's they write when only a few of us ever read it??
|
|
|
|
|
Dave Kreskowiak wrote: Why does Microsoft bother writing documentation on the API's they write when
only a few of us ever read it??
To be fair the fact that they write documentation doesn't mean that it understandable or even readable.
And finding the specific one that is meaningful and correct is often a challenge as well.
|
|
|
|
|
Given that the .NET documentation lists every method available (including Close), it's just a matter of being curious to see what's in there and reading the one line description for each method.
I find the documentation quite good for about 95% of the stuff I need. I'll say that the documentation is missing some depth in parts, but it isn't unreadable for a basic method like this.
There's even a ton of samples demonstrating all of the basics.
I'm saying most people don't even bother to look at/find the documentation let alone try to read it.
|
|
|
|
|
Dave Kreskowiak wrote: Given that the .NET documentation lists every method available (including Close), it's just a matter of being curious to see what's in there and reading the one line description for each method.
The question wasn't about a specific method of a specific class.
And as an example and in terms of your statement try to find the 'close' method that I am thinking of right now with no other context.
Dave Kreskowiak wrote: I find the documentation quite good for about 95% of the stuff I need. I'll say that the documentation is missing some depth in parts, but it isn't unreadable for a basic method like this.
I find that the documentation from multiple sources plus my decades of experience usually allows me to figure out what some method/class etc is really doing despite what the documentation says or doesn't say.
And there are times when that fails.
Dave Kreskowiak wrote: I'm saying most people don't even bother to look at/find the documentation let alone try to read it.
And I am saying the for the question originally posed that it would take me quite a bit of research to even determine what documentation to start reading in the first place.
Now if I had already used the mentioned API and used it recently then it would take less time. But I haven't.
|
|
|
|
|
If everyone read the API docs and such, how would we have fun answering questions here?
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
I am confident that there would still be plenty of questions.
|
|
|
|
|
i am calling showDialog() for form2 from form 1 i want if i close the form2 changes made in form2 appears in form 1 it is fullfillng my requirement for first time but when i call showdialog() 2nd time and malke some chnaging in form 2 it does not appears in form 1....how to solve this problem?
|
|
|
|
|
You haven't provided anywhere near enough information to answer this question. What does your code look like? How are you triggering the update? All this information is needed.
|
|
|
|
|
both forms have text boxes and check boxes data is updated in database and fecthing is from sql qries and set into fom1 textboxes
|
|
|
|
|
And still no code. As it's the code that's wrong, don't you think that you should provide that or are you happy for us to throw random guesses around in the hope that one of them sticks like dung to a wall?
|
|
|
|
|
ShowDialog displays the form and waits for the user to close it with OK or Cancel before it returns. When it does, you can get the changed values from the form instance:
MyForm mf = new myForm();
mf.StringValue = "Hello";
if (mf.ShowDialog() == DialogResult.OK)
{
Console.WriteLine(mf.StringValue);
}
mf.StringValue = "Goodbye";
if (mf.ShowDialog() == DialogResult.OK)
{
Console.WriteLine(mf.StringValue);
} Works fine for me: What are you doing that is different?
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Does any one knows : How to drawing text that can rotate in Tao.OpenGL , i search the web for two days already . Can't find some sample like Tao.OpenGl for text . If any one has the samples , please let me know . Thanks very much .
|
|
|
|
|
I never used TAO, however I do know how to use Google[^] and found a couple of relevant articles including this one[^]. I'd say text rotates just like everything else.
|
|
|
|
|
|
It's been a while since I played with the Shell, but I think this is the correct method:
IShellIcon::GetIconOf()
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761275(v=vs.85).aspx[^]
EDIT:
I apologize, I forgot this is the C# forum and answered with a C++ solution. If you know what you're doing, however, you can use the Shell interfaces in C#.
The difficult we do right away...
...the impossible takes slightly longer.
modified 3-Jan-12 23:04pm.
|
|
|
|
|
I want to fill the cells of a datagridview column based on numbers derived at runtime. Sounds easy enough but...
these two lines of code work great if I only wanted red
dataGridView1.Rows[layerCount].Cells[3].Style.BackColor = Color.Red;
dataGridView1.Rows[layerCount].Cells[3].Style.ForeColor = Color.Red;
but these two lines just color the cells text (if existing)? or they just act bizzarly(although they worked good with a listview)
dataGridView1.Rows[layerCount].Cells[3].Style.BackColor = Color.FromArgb(swLayer.Color);
dataGridView1.Rows[layerCount].Cells[3].Style.ForeColor = Color.FromArgb(swLayer.Color);
Anyone have any pointer?
wait a minute, no POINTERS, how about advice
|
|
|
|
|
My CP Vanity article fills DGV cells with platinum, gold, silver, bronze. No problem, unless the cell is otherwise empty, then it may get tricky.
|
|
|
|
|
what is CP vanity.?? where is code?
|
|
|
|
|
It is one of my articles, as I said. And it has a download link.
|
|
|
|
|
I found an answer.
Using System.Drawing.ColorTranslator.FromWin32()
instead of ArgB();
|
|
|
|
|
I sometimes come across situations where I could use a string type to represent a unique key in something (sorry for being vague)...
An example:
ConnectSensor(new OffScreenSensor(),"screen");
Where the "screen" part is used to identify the OffScreenSensor object in a dictionary somewhere.
I could use an Enum as a replacement but was wondering if any one here has a better way of dealing with stuff like this?
I don't like the idea of having to look back to see the names of keys I have named before
|
|
|
|
|
strings are fine for identifying, i.e. naming, objects by humans. And I would suggest you store the sensor's name inside the Sensor object, hence turn it into a constructor parameter!
|
|
|
|
|
Ok thanks, sounds like I am on the right track
|
|
|
|
|
Yeah, I would just derive a class from Sensor that manages its own name, something like a GUID for example.
|
|
|
|