|
Scan0 is a pointer to the bitmap data. The easiest thing to do is to create the bitmap, then get access to the pointer and set the values in an unsafe block. None of this code is setting up a palette, as far as I can see.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Dear *.*
I'm a c#-rooky *g*. How can I call word/outlook from an existing c#-app. The users just want to start word or outlook by pressing a simple button within the form.
An additional nice feature would be for example submitting the email-adress to outlook or something like this.
regards
Klaus
|
|
|
|
|
You need to add reference of Word and outlook libraries in your project. Then you can do whatever you want using Application objects of these libraries.
If you are using Office Xp, library 10.0 will be available on your system. And if it is 2003, you will see library 11.0
Enjoy
- ashish
|
|
|
|
|
Ashish,
thanks a lot for open my eyes . After thinking it over, I've also found many samples on the net (msdn).
regards
Klaus
|
|
|
|
|
I've in my application an infinite number of object displayed on the form that are made dinamically by the user.
The user define the position, the size and the color.
I've implement this by a linked list.
Now i want to save this linked list inside a ASCII file so i can load in a second time and recreate this objects.
In your opinion what is the easer way to do that?
|
|
|
|
|
Sasuko wrote:
I've implement this by a linked list.
take a look at some classes from System.Collections , especially ArrayList , Hashtable and similar...
Sasuko wrote:
Now i want to save this linked list inside a ASCII file so i can load in a second time and recreate this objects.
In your opinion what is the easer way to do that?
Does it have to be ASCII ? Again, take a look at System.Serialization .
Do not reinvent the wheel.
Search for them on http://msdn.microsoft.com/[^].
David
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Sorry i've maybe explained bad.
I know about ArrayList and Serialization, the problem is implement this to an invinite Linked list, how could i concettually linked list in a file?
Maybe it is easy but i don't understand how?
Have i to loop for all the list's son and save one at time in the file?
But how can i read it then?
|
|
|
|
|
Sasuko wrote:
Sorry i've maybe explained bad.
I know about ArrayList and Serialization, the problem is implement this to an invinite Linked list, how could i concettually linked list in a file?
uh. I understand this even worse
Sasuko wrote:
Have i to loop for all the list's son and save one at time in the file?
No, serializer will do that for you.
Sasuko wrote:
But how can i read it then?
Using deserialization.
Search Google for keywords "Serialization of ArrayList". There are many examples. It's actually easier then it looks.
David
|
|
|
|
|
|
can you submit some details
|
|
|
|
|
i've found nothing about that on google! Can you show me where?
|
|
|
|
|
|
the problem is that array is finite, linked list no!
It does work the same?
|
|
|
|
|
Forget about linked list.
Sasuko wrote:
array is finite
Who says so? ArrayList is growing array, that means if there is no place for new item, it re-create array with double size... There isn't limit. ArrayList is actually much better then linked list implemented by yourself.
"The capacity of an ArrayList is the number of elements the list can hold. As elements are added to an ArrayList, the capacity is automatically increased as required through reallocation."
How on earth you can think that ArrayList is somehow limited but linked list isn't? Did you even try to look up what ArrayList actually is?! link[^]
David
"Stay Kul And Happy" I.A.
|
|
|
|
|
Really thanks for your interesting.
I let you know...
|
|
|
|
|
a recursive method to check if a lined list is sorted
method should return true if it is sorted in ascending order, false otherwise
|
|
|
|
|
what you mean by recursive method?
like this?
bool checkNode( IListItem node )
{
static something lastValue;
static bool sorted = true;
if( node == null )
{
return true;
}
if( lastValue > IListItem.Value )
{
return false;
}
else
{
lastNode = node;
return ( checkNode( node.Next ) );
}
}
What a stupid method. If you tell me why it is so stupid, maybe I'll teach you how write more stupid code like this.
David
|
|
|
|
|
A recursive method to append two linked lists and return a reference to the first node in the resulted list
|
|
|
|
|
How can I delete a file witn C#, witch is in use?
|
|
|
|
|
Simple, you can't. The filesystem won't allow you to do that.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Nothing is inpossibile
In Google I fuond a C++ executable witch delete locked files too, Somethime I use this, but I need a way to do this in C#.
|
|
|
|
|
If you can get them to cough up the source code, great!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have no clue that how can I set c+ classed to call c# classes. For example, I am using c++ on dialog and I am clicking on button from c++ dialog,then it will call new dialog or class that contains C# coding. I know what are you thinking. Why are you do that? I am using c# coding and my co-worker is using c++ coding so we have to put them together somehow. any suggestions??
|
|
|
|
|
|