|
Have a look at:
Graphics.DrawPolygon();
|
|
|
|
|
Ok im trying to count the characters that i have loaded into a buffer i have set up the following function
void countchars(char *buffer, int *count)
/*Counts the number of characters in the text file */
{
int i,counter;
char cdata;
count['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'];
do
{
{ for(cdata='A';cdata<='Z';cdata++)
if(buffer[i]==counter[count])
{
count++;
}
i++;
}
}while(buffer[i]!=EOF);
}
I am calling this function using the following code:
countchars(buffer,cdata);
printf("\nDistribution of letters in %s is:",fname);
for (c='A';c<='Z';c++)
{
N=cdata[c]+cdata[tolower(c)];
printf("\n'%c' %4d: ",c,N);
for (i=0;i
|
|
|
|
|
You might want to post this in a C/C++ board. The code above isn't C# style.
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
How can I extract a content from the OLE object as Text in C#? I have create in VB6:
...
OLE1.object.saveas "c:\tryFile.rtf"
...
and after that I started the Automation like
Set wordAutomation = CreateObject("Word.Application")
With wordAutomation
.Visible = False
.Application.Documents.Open ("c:\tryFile.rtf")
.Application.ActiveDocument.Select
.Application.ActiveDocument.content.Copy 'now is in Clipboard as Text
End With
...
How can I transform and implement this Code in C#?
Best regards
|
|
|
|
|
Hopefully[^] (23MB) a lot of bug fixes : Marshaling hazard, IE events, just to name a few.
...
If you want to take advantage of .NET 1.1 (read : make sure it's used instead of the current .NET 1.0 that might be installed), then remove .NET 1.0. By default, apps configured to start with 1.0.3705 will start with 1.1.4322 in case 1.0.3705 is not installed. That's kind of throwing away the .NET side-by-side versioning, but that's the simplest way I can think of to make sure you are always running .NET apps with the latest CLR.
|
|
|
|
|
including Visual Studio 2003, for download is available for MSDN subscribers.
|
|
|
|
|
Thanks for the info .S.Rod.
.S.Rod. wrote:
then remove .NET 1.0. By default, apps configured to start with 1.0.3705 will start with 1.1.4322 in case 1.0.3705 is not installed.
Did you get this to work with VS.net 2002? I'm just curious, I'm going to try it on a spare machine since my dev machine is pretty stable and I hate monkeying up a "good" set-up.
Hey don't worry, I can handle it. I took something. I can see things no one else can see. Why are you dressed like that?
- Jack Burton
|
|
|
|
|
Any idea on what are the bug fixes that was done to 1.1.
I have seen lot of docs saying breaking changes and new stuff added, but is there a place where they say the bugs that where fixed. I haven't downloaded it, so i'm not sure if the readme or some place contains that information.
- Kannan
|
|
|
|
|
Is there some control or DLL that facilitates rectange selection, as found on the Windows Desktop and many paint/presentation programs? Ideally it would help select child controls.
Or is this something that must be coded from scratch on a custom basis?
For instance, let's pretend that I wanted to simulate the Windows Desktop and wanted to be able to select icons by dragging a mouse to form a rectangle selection. Without any special DLL help, I would have to manage the drawing of the rectangle via mouse events, check for controls within the rectangle's area, and select the controls, perhaps by highlighting them in some way. Or I could also change the selections list by clicking on controls with the Control key.
|
|
|
|
|
Try ControlPaint.DrawReversibleFrame Method.
Regards
Smitha
It is better to be hated for what you are than to be loved for what you are not.
-- Andre Gide
|
|
|
|
|
Yeah, that's definitely part of what I'd need to do if I have to do it from scratch.
I was hoping since this seems to be a common enough task for applications that there would be more OS or Framework support for it.
|
|
|
|
|
|
XmlTextWriter writes forward-only streams. You should use XmlDocument if you want to manipulate the XML file.
XmlTextWriter would probably work okay if you just wanted to append to the end of the XML file, but XmlDocument will save you the trouble of having to worry about the formatting on a low level.
|
|
|
|
|
|
Nishant S wrote:
BTW XmlTextWriter will overwrite the file So even appending is not possible.
I wonder if that's true, if you get the XmlTextWriter's underlying stream and seek to a certain position in the file. I was able to do that when using an XmlTextWriter with a MemoryStream.
|
|
|
|
|
Arun Bhalla wrote:
I wonder if that's true, if you get the XmlTextWriter's underlying stream and seek to a certain position in the file. I was able to do that when using an XmlTextWriter with a MemoryStream.
Ah okay, that's an idea. But it'd still be sorta impossible or at least very difficult to write proper xml I guess. I'll look up XmlDocument as you had suggested.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
can you write macros in c# ? if so how to begin ? can you reference a link or example plz.
tia
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
Yes you can, however, the ms docs have tons of examples all in VB.NET
I am going towards writing an add-in instead. The add-in wizard get's you started.
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
I have the following situtation
In my program i want to do request an dns lookup for several servers. How many servers are variable and are listed in a string array. Now i want to request the dns lookup not after each other but i want to do them in threads. So that not one dns lookup is waiting before the other is ready.
From each dns lookup thread i want the IPaddress as return value. And after all i want my program to continue after all threads are stopt.
So a quick summary
- Program start
- List of servers is in array list (for example 10)
- Starts 10 threads with the server to check as parameter
- Get response of the threads (and keep them in memory)
- Continue with program after all threads are done
I hope someone can help me with this. I search a lot about Threads but havend found a clear solutions for this problem. And if you think you had an other/better solution without threads, please reply also.
Thanx
|
|
|
|
|
If your using threads I highly recommend using the ThreadPool class. Caution, there is an error with the ThreadPool with WebRequests, but I am not sure if it applies to Dns class.
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
Can I map key combinations (like Alt-2) to form methods in C#.
I should mention, Windows Forms apps...
|
|
|
|
|
Hello people,
I have a quick question for you. I am currently importing data into an access database and i need to check each field and make sure that it does not exceed the maximum lenth of the fields in our database. So.... I create a DataSet, the a DataTable, and then use the column collection to try and find the max length of the field, something like this:
oDataTable.Columns[k].MaxLength
All I ever seem to get is a -1 for the maxlength, although all the other data shows up great. I was wondering if anyone had a suggestion as to what Im doing wrong.
Thanks so much!
Ryan
|
|
|
|
|
I was wondering if there is a C# equivalent to the 'with' stmt in vb.net ..
I have some code that sure needs it!
thks in advance .
|
|
|
|
|
Dato wrote:
I was wondering if there is a C# equivalent to the 'with' stmt in vb.net ..
No, there isn't, and some people think that there should not be, I'll explain why below.
Dato wrote:
I have some code that sure needs it!
So, put this code in a method in this object.
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
I came up against this problem, too, and no, you can't always put the code in a method of the object. I don't see any reason not to have a with block statement, except that C++ didn't have one, which is a very poor excuse!
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|