mohasad


hi all,

Is there any api available in .Net CF1.0 to do the Image Transition like moving the image left to right , right to left etc,


thnaks
sadiq



Re: Smart Devices VB and C# Projects regarding the Image transition

Guang-Ming Bian - MSFT

Hi sadiq,

Base on my understanding, you want to implement Image Transition using some API, if I have misunderstood you, please let me know, thanks.

I am not aware of some API to implement it. But you can implement it without it. you can change the image location to move it from left to right or right to left.

Code Block

private void button1_Click(object sender, EventArgs e)

{

this.pictureBox1.Location = new Point(this.pictureBox1.Location.X + 20, this.pictureBox1.Location.Y);

}

Best regards,

Guang-Ming Bian - MSFT






Re: Smart Devices VB and C# Projects regarding the Image transition

mohasad


hi Ming,

thanks for your help. Is there any way to copy the pixels of one rectangular area or region in the screen , as in j2me g.copyPixels();


thanks
sadiq





Re: Smart Devices VB and C# Projects regarding the Image transition

Guang-Ming Bian - MSFT

Hi sadiq,

You can Graphics.CopyFromScreen Method to copy one rectangualr area in the screen, like the code:

Code Block
private void CopyPixels2(PaintEventArgs e){    e.Graphics.CopyFromScreen(this.Location, new Point(40, 40),         new Size(100, 100), CopyPixelOperation.MergePaint); }

For more information, see MSDN document:
http://msdn2.microsoft.com/en-us/library/6yfzc507.aspx
Best regards,
Guang-Ming Bian - MSFT





Re: Smart Devices VB and C# Projects regarding the Image transition

mohasad



hi Guang ,

thanks a lot . i checked out the article from the link that you have mentioned , but it doesnt show the support for .Net Compact Framework 1.0 . since i am developing my application in CF 1.0 , i need a corresponding api ....

thanks
sadiq





Re: Smart Devices VB and C# Projects regarding the Image transition

Ilya Tumanov

You would need to implement your own if you have to stay with NETCF V1. You should consider upgrading to V2/V3.5.

That probably would save you months. You would need to install NETCF V2 SP2 instead of deploying NETCF V1 SP3 you're deploying now (newer devices come with V2 in ROM).

V2 has Bitmap.LockBits() so you can work with bitmap data directly and it has GetHbitmap() so you can call native methods easily. COM interop also allows for easy access to powerful Imaging API if needed.