The ruler indicates where your cursor is, and you haven't looking for it. 8)
Here is a screenshot from my IDE:
Of course it is FREE Add-in :) Thanks for the developers! ;)
Download page:
http://www.slickedit.com/content/view/441
.Net Compact Framework samples, tips and tricks
protected override void OnKeyUp(KeyEventArgs e)
{
if (e.KeyCode == Keys.Space ||
e.KeyCode >= Keys.D0 && e.KeyCode <= Keys.D9 ||
e.KeyCode == Keys.Enter)
{
base.OnKeyUp(e);
}
else
{
e.Handled = true;
}
}
3 <Class Name="MyControls.SpecialTextBox">
4 <DesktopCompatible>trueDesktopCompatible>
5 <Class>
If you are creating a single .exe that is designed to run on all Windows Mobile devices, use an application icon with these sizes:
If your .exe is only designed for "Pocket PC" devices, use an application icon with these sizes:
If your .exe is only designed for "Smartphone" devices, use an application icon with these sizes:
I advise a FREE icon editor, which can generate all needed sizes from one picture:
http://icofx.ro/
29 public enum Volumes : int
30 {
31 OFF = 0,
32 LOW = 858993459,
33 NORMAL = 1717986918,
34 MEDIUM = -1717986919,
35 HIGH = -858993460,
36 VERY_HIGH = -1
37 }
38
39 [DllImport("coredll.dll", SetLastError = true)]
40 public static extern int waveOutSetVolume(IntPtr device, int volume);
41
42 [DllImport("coredll.dll", SetLastError = true)]
43 public static extern int waveOutGetVolume(IntPtr device, ref int volume);
44
45 public static Volumes Volume
46 {
47 get
48 {
49 int v = (int)0;
50
51 waveOutGetVolume(IntPtr.Zero, ref v);
52
53 switch (v)
54 {
55
56 case (int)Volumes.OFF:
57 return Volumes.OFF;
58
59 case (int)Volumes.LOW:
60 return Volumes.LOW;
61
62 case (int)Volumes.NORMAL:
63 return Volumes.NORMAL;
64
65 case (int)Volumes.MEDIUM:
66 return Volumes.MEDIUM;
67
68 case (int)Volumes.HIGH:
69 return Volumes.HIGH;
70
71 case (int)Volumes.VERY_HIGH:
72 return Volumes.VERY_HIGH;
73
74 default:
75 return Volumes.OFF;
76 }
77 }
78 set { waveOutSetVolume(IntPtr.Zero, (int)value); }
79 }
Sometimes developers need to know the resolution of device, where the application's running.
Here is the code:
using System.Windows.Forms;
int width = Screen.PrimaryScreen.Bounds.Width;
int height = Screen.PrimaryScreen.Bounds.Height;
MessageBox.Show("The device's resolution: Width = " + width + " Height = " + height);
using Microsoft.WindowsCE.Forms;That's all :)
© 2009 .Net CF Developer's Blog | Blogger Templates created by Deluxe Templates
Powered by Blogger | Wordpress Theme by danielfajardo web