Question : Copying and pasting a transparent GIF

Hello Helpers,

I have the following issue with VB.NET 2005:

I'm trying to copy a transparent GIF to the clipboard so I can past this image in another application (excel,word, or any other).
The code i use is:        
Dim img As Bitmap = Bitmap.FromFile(FileLocation)
Clipboard.SetImage(img)

Now when i past the image the background is gray.
The same problem when i load a GIF into Excel, select and copy, than past it into photoshop. The background is than white.

I have also tested this with a PNG but the results are the same.

Anyone an idea?

Answer : Copying and pasting a transparent GIF

Side: You other project has probably implemented SummonGameObject as a static method in the WorldObject class.

GameObject* WorldObject::SummonGameobject(uint32 id, float x, float y, float z, float angle, uint32 despwtime)

This line however gives the impression that it's non-static, but my rough guess is that it should be static because it seems to take GameObject's Id as first parameter GO_ICE_WALL stands for game object ice_wall. This method is the usual Global lookup method that locates register game objects and therefore makes sense to be static, unless ofcourse a worldobject is a composite game object composed of other game objects.

if(GameObject* pGate = m_creature->SummonGameObject(GO_ICE_WALL, 5540.39f, 2086.48f, 731.066f, 1.00057f, 0))

 Maybe you can check with the other project and see how they have done it. BTW, if SummonGameobject can return a GameObject that may not always be WorldGameObject then the return type should be a bit more stricter to avoid further unnessary typecasting and make subsequent code more typesafe. Otherwise it probably makes more sense to put it in GameObject rather than WorldGameObject.

It could be as simple as copying to Worldobject.h/cpp (if those are the names). Otherwise you should try to have your own design as you may see fit. Start by just defining it in Creature, if you need it elsewhere you can move it to the base class and refactor accordingle.

Would have been less of a guess game, had you have posted the source code ...

Random Solutions  
 
programming4us programming4us