Click here to Skip to main content
15,893,668 members
Home / Discussions / Mobile
   

Mobile

 
GeneralRe: COM wrapper registration Pin
gottimukkala5-Feb-08 3:46
gottimukkala5-Feb-08 3:46 
GeneralScreen Orientation Pin
CodingYoshi30-Jan-08 13:21
CodingYoshi30-Jan-08 13:21 
GeneralRe: Screen Orientation Pin
Christopher Fairbairn31-Jan-08 15:43
Christopher Fairbairn31-Jan-08 15:43 
GeneralRe: Screen Orientation Pin
CodingYoshi1-Feb-08 6:54
CodingYoshi1-Feb-08 6:54 
GeneralRe: Screen Orientation Pin
Christopher Fairbairn10-Feb-08 16:15
Christopher Fairbairn10-Feb-08 16:15 
GeneralRe: Screen Orientation Pin
CodingYoshi12-Feb-08 7:12
CodingYoshi12-Feb-08 7:12 
GeneralRe: Screen Orientation Pin
Christopher Fairbairn15-Feb-08 22:42
Christopher Fairbairn15-Feb-08 22:42 
GeneralRe: Screen Orientation Pin
Ravenet7-Feb-08 15:39
Ravenet7-Feb-08 15:39 
Hi Guy

I Had doen this in my project. we want to create a custom event eith Platform Invoke.

i means like this

u create this P/Invoke mthoed
[DllImport("coredll.dll", SetLastError=true)]
private static extern int ChangeDisplaySettingsEx(
string lpszDeviceName,
byte[] lpDevMode,
IntPtr hwnd,
CDS dwflags,
IntPtr lParam);

after create a DEMODE class like this
internal class DEVMODE
{
public const short Size = 192;
private byte[] mData;

public DEVMODE()
{
mData = new byte[Size];
BitConverter.GetBytes((short)Size).CopyTo(mData, 68);
}

public byte[] ToByteArray()
{
return mData;
}

public DM Fields
{
get
{
return (DM)BitConverter.ToInt32(mData, 72);
}
set
{
BitConverter.GetBytes((int)value).CopyTo(mData, 72);
}
}
public int DisplayOrientation
{
get
{
return BitConverter.ToInt32(mData, 188);
}
set
{
BitConverter.GetBytes(value).CopyTo(mData, 188);
}
}
}

[Flags()]
internal enum DM
{
ORIENTATION = 0x00000001,
PAPERSIZE = 0x00000002,
PRINTQUALITY = 0x00000400,
COLOR = 0x00000800,
BITSPERPEL = 0x00040000,
PELSWIDTH = 0x00080000,
PELSHEIGHT = 0x00100000,
DISPLAYORIENTATION = 0x00800000,
DISPLAYQUERYORIENTATION = 0x01000000,
}

then let's crate a method , within that create object above class and call Above P/Invoke methods and pass arugs. If P/Invoke method return >0 when get success result from the OS, after get >0 u must inove ur event next line. and od ur work.

i hope this is help to you.

Thanks

Cheers
RRave
MCTS,MCPD



QuestionReceiving data . Pin
Agbaria Ahmad30-Jan-08 3:20
Agbaria Ahmad30-Jan-08 3:20 
GeneralRe: Receiving data . Pin
Ravenet7-Feb-08 15:42
Ravenet7-Feb-08 15:42 
GeneralRe: Receiving data . Pin
Ravenet7-Feb-08 15:44
Ravenet7-Feb-08 15:44 
GeneralInteresting puzzles ...i wannt ur suggstion ...plz !!!! Pin
rowdy_vc++30-Jan-08 1:05
rowdy_vc++30-Jan-08 1:05 
QuestionObjectList control and Windows Mobile Pin
sfm129-Jan-08 3:07
sfm129-Jan-08 3:07 
QuestionHow to Write a Site to a Mobile Phone? Pin
Sara12328-Jan-08 19:08
Sara12328-Jan-08 19:08 
AnswerRe: How to Write a Site to a Mobile Phone? Pin
Ravenet7-Feb-08 15:47
Ravenet7-Feb-08 15:47 
GeneralPocket pc bluetooth in Visual Basic .net 2005 Pin
NGENEAR1127-Jan-08 16:37
NGENEAR1127-Jan-08 16:37 
GeneralRe: Pocket pc bluetooth in Visual Basic .net 2005 Pin
João Paulo Figueira28-Jan-08 2:44
professionalJoão Paulo Figueira28-Jan-08 2:44 
Generalchange the folder Pin
Paulraj G25-Jan-08 20:57
Paulraj G25-Jan-08 20:57 
GeneralRe: change the folder Pin
Christopher Fairbairn31-Jan-08 15:56
Christopher Fairbairn31-Jan-08 15:56 
Questione-mail attachments and windows mobile Pin
inapocket20-Jan-08 22:48
inapocket20-Jan-08 22:48 
GeneralRe: e-mail attachments and windows mobile Pin
Paul Conrad27-Jan-08 7:26
professionalPaul Conrad27-Jan-08 7:26 
GeneralRe: e-mail attachments and windows mobile Pin
Ravenet7-Feb-08 15:53
Ravenet7-Feb-08 15:53 
QuestionHow to create mobile games/software ? Pin
tina->newcoder18-Jan-08 6:54
tina->newcoder18-Jan-08 6:54 
AnswerRe: How to create mobile games/software ? Pin
Rajesh R Subramanian25-Jan-08 0:50
professionalRajesh R Subramanian25-Jan-08 0:50 
Questionhow to make sound & get the value of battery & memory in C# for PPC ? Pin
E_Gold11-Jan-08 19:37
E_Gold11-Jan-08 19:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.