微软.net精简框架常见问题及回答(中文版)(78)

王朝c#·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

11.18. How can I copy files to the device currently connected to desktop ActiveSync?

Download CECopy from Windows Mobile Developer Power Toys:

http://www.microsoft.com/downloads/details.aspx?FamilyId=74473FD6-1DCC-47AA-AB28-6A2B006EDFE9&displaylang=en

11.19. Why does the Visual Studio debugger fail to connect to an ARMV4I device?

Cause

Bug in the connection tool after selecting ARMV4I CPU type

Resolution

Configure tool for ARMV4T CPU type:

In Visual Studio, on the Tools menu, click "Select Windows CE Device CPU". Note: this menu item is installed by the Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack

Change the device architecture to ARMV4T

Click Configure, then click Close. Restart Visual Studio if prompted

Top of Page

12. Smartphone

12.1. Where can I get the latest Smartphone SDK?

Download the Windows Mobile 2003 Smartphone SDK here:

http://www.microsoft.com/downloads/details.aspx?familyid=a6c4f799-ec5c-427c-807c-4c0f96765a81&displaylang=en

12.2. What are the rules for smartphone menus?

Smartphone menus have several rules, such as:

the first menu item (corresponding to the left soft button) cannot have any sub items

the second menu item (corresponding to the right soft button) can have sub items

any other top level menu items are not used If the first menu item has more than 1 item, you will get a NotSupportedException.

For a complete list of requirements, refer to the Smartphone help documentation:

ms-help://MS.VSCC.2003/MS.Smartphone2003Help.1033/dv_smartphone/html/spconUsingMenus.htm

The preceding link is referenced from the Windows Mobile 2003 Smartphone SDK:

http://www.microsoft.com/downloads/details.aspx?familyid=a6c4f799-ec5c-427c-807c-4c0f96765a81&displaylang=en

12.3. Why are there disabled controls in the toolbox when creating a Smartphone project?

The smartphone platform only supports a small set of controls. The controls that are not supported are disabled.

For more information, refer to the following Smartphone help documentation:

ms-help://MS.VSCC.2003/MS.Smartphone2003Help.1033/dv_smartphone/html/spconWindowsFormsSupport.htm

The preceding link is referenced from the Windows Mobile 2003 Smartphone SDK:

http://www.microsoft.com/downloads/details.aspx?familyid=a6c4f799-ec5c-427c-807c-4c0f96765a81&displaylang=en

12.4. Does Smartphone support RAM installs of the .NET Compact Framework?

No. The .NET Compact Framework is serviced through operating system updates at the carrier's / OEM's discretion. Therefore, .NET Compact Framework will generally drop as part of larger Windows Mobile for Smartphone operating system updates.

12.5. How do I set the title of a fullscreen multiline edit control window?

This is not supported by the current version of the .NET Compact Framework.

12.6. How can I generate Smartphone CABWizSP XML docs from existing Pocket PC CAB files?

Download Convert PPC DAT to SP XML from Windows Mobile Developer Power Toys:

http://www.microsoft.com/downloads/details.aspx?FamilyId=74473FD6-1DCC-47AA-AB28-6A2B006EDFE9&displaylang=en

12.7. How can I send characters and strings to the Smartphone 2003 Emulator via ActiveSync?

Download TypeIt from Windows Mobile Developer Power Toys:

http://www.microsoft.com/downloads/details.aspx?FamilyId=74473FD6-1DCC-47AA-AB28-6A2B006EDFE9&displaylang=en

12.8. How do I programmatically set the Smartphone input mode?

The input mode can be set using GetFocus and SendMessage APIs according to the code below:

'VB

Imports System.Runtime.InteropServices

Public Const EM_SETINPUTMODE As Integer = &HDE

Public Const EIM_SPELL As Integer = 0

Public Const EIM_AMBIG As Integer = 1

Public Const EIM_NUMBERS As Integer = 2

<DllImport("coredll.dll")> _

Public Shared Function GetFocus() As IntPtr

End Function

<DllImport("coredll.dll")> _

Public Shared Function SendMessage(ByVal hWnd As IntPtr, _

ByVal Message As Integer, ByVal wParam As Integer, _

ByVal lParam As Integer) As Integer

End Function

'Sample use setting TextBox to number input

Private Sub txtAmount_GotFocus(ByVal sender As Object, _

ByVal e As System.EventArgs) Handles txtAmount.GotFocus

Dim hWnd As IntPtr

hWnd = Me.GetFocus()

SendMessage(hWnd, EM_SETINPUTMODE, 0, EIM_NUMBERS)

txtAmount.SelectionStart = txtAmount.Text.Length

End Sub

//C#

using System.Runtime.InteropServices;

public const uint EM_SETINPUTMODE = 0xDE;

public const uint EIM_SPELL = 0;

public const uint EIM_AMBIG = 1;

public const uint EIM_NUMBERS = 2;

[DllImport("coredll.dll")]

public static extern IntPtr GetFocus();

[DllImport("coredll.dll")]

public static extern int SendMessage(IntPtr hWnd,

uint Message, uint wParam, uint lParam);

// Sample use setting TextBox to number input

private void Form1_Load(object sender, System.EventArgs e)

{

txtAmount.GotFocus +=

new System.EventHandler(txtAmount_GotFocus);

}

private void txtAmount_GotFocus(object sender, System.EventArgs e)

{

IntPtr hWnd;

hWnd = GetFocus();

SendMessage(hWnd, EM_SETINPUTMODE, 0, EIM_NUMBERS);

txtAmount.SelectionStart = txtAmount.Text.Length;

}

Top of Page

第一頁    上一頁    第78頁/共78頁    下一頁    最後頁
第01頁 第02頁 第03頁 第04頁 第05頁 第06頁 第07頁 第08頁 第09頁 第10頁 
第11頁 第12頁 第13頁 第14頁 第15頁 第16頁 第17頁 第18頁 第19頁 第20頁 
第21頁 第22頁 第23頁 第24頁 第25頁 第26頁 第27頁 第28頁 第29頁 第30頁 
第31頁 第32頁 第33頁 第34頁 第35頁 第36頁 第37頁 第38頁 第39頁 第40頁 
第41頁 第42頁 第43頁 第44頁 第45頁 第46頁 第47頁 第48頁 第49頁 第50頁 
第51頁 第52頁 第53頁 第54頁 第55頁 第56頁 第57頁 第58頁 第59頁 第60頁 
第61頁 第62頁 第63頁 第64頁 第65頁 第66頁 第67頁 第68頁 第69頁 第70頁 
第71頁 第72頁 第73頁 第74頁 第75頁 第76頁 第77頁 第78頁 
 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航