i see but there is no properties like to set background image .
any knows how to do.otherwise have any cotrol tool kits to support windowsmobile
here i m using windows mobile sdk 5.0
Please give me any idea to do this
(or)
How to create custum controls in my window mobile sdk give me idea.
Thanks
Venkat.S
Loading

Venkat SPosted Jun 21, 2011, 5:58 AM
Hi bina patel,
if u dont mind.
let me know how to call this.
i create like this in my form1.cs source code .now how to call background image please give me idea.
(OR)
i m take one class file i put the code then after how can i do.
i ll try two way which is correct.and give me solution please.
static class Helper
{
// ListView messages
private const int LVM_FIRST = 0x1000;
private const int LVM_SETBKIMAGE = (LVM_FIRST + 138);
[Flags]
enum LVBKIF : int
{
SOURCE_NONE = 0x00000000,
SOURCE_HBITMAP = 0x00000001,
SOURCE_URL = 0x00000002,
SOURCE_MASK = 0x00000003,
STYLE_NORMAL = 0x00000000,
STYLE_TILE = 0x00000010,
STYLE_MASK = 0x00000010,
FLAG_TILEOFFSET = 0x00000100
}
class LVBKIMAGE
{
public LVBKIF ulFlags = LVBKIF.SOURCE_NONE;
public IntPtr hbm = IntPtr.Zero;
public IntPtr pszImage = IntPtr.Zero;
public uint cchImageMax = 0;
public int xOffsetPercent = 100;
public int yOffsetPercent = 100;
};
public static void SetBackgroundImage (ListView control, Bitmap bitmap)
{
LVBKIMAGE lvBkImage = new LVBKIMAGE ();
lvBkImage.ulFlags = LVBKIF.SOURCE_HBITMAP | LVBKIF.STYLE_TILE;
lvBkImage.hbm = bitmap.GetHbitmap ();
lvBkImage.cchImageMax = 0;
lvBkImage.xOffsetPercent = 0;
lvBkImage.yOffsetPercent = 0;
Message msg = Message.Create (control.Handle, (int)LVM_SETBKIMAGE, (IntPtr)0, Marshal.AllocCoTaskMem (Marshal.SizeOf (lvBkImage)));
Marshal.StructureToPtr (lvBkImage, msg.LParam, false);
MessageWindow.SendMessage (ref msg);
Marshal.FreeCoTaskMem (msg.LParam);
}
}
bina patelPosted Jun 21, 2011, 5:31 AM
Check this link
http://social.msdn.microsoft.com/forums/en-US/netfxcompact/thread/9f04fbca-0730-4182-aedd-993238c0a97b/
Venkat SPosted Jun 21, 2011, 5:22 AM
thanks for replay.
i am new for windows mobile app.
i am using windows mobile sdk to develop device application
it is posible to call css file .
how to call css file in windows mobile forms please give me idea.
bina patelPosted Jun 21, 2011, 5:05 AM
Add this css in your page and change image path and apply to cssclass of listview control property.
Venkat SPosted Jun 21, 2011, 4:40 AM
thanks for replay.
but i m c# developer and i m not able to understand.
please give any idea.
bina patelPosted Jun 21, 2011, 4:20 AM