Wince development essay (1)

Source: Internet
Author: User

1,InWinCEIn the project, how does one determine whether the form itself is the current top-level form?

A: first obtain the window handle, and then useAPIFunctionGetforegroundwindowObtain the current top-level window handle and compare whether the two handles are consistent.

Note thatCf1.0Medium,. NetNot providedForm. HandleProperties to obtain the window handle.APIFunctionFindwindowThe steps are as follows:

A.Use variables to save the title of the window, that isForm. Text

B.To avoid repeated titles, change the title of the window to oneGuidOr other unique titles

C.PassFindwindowSearch for the handle of the window after the title is modified

D.Restore window title

2,How to obtain an applicationProgramCurrent physical path?

A: InWinCEMedium-

System. Io. Path. getdirectoryname (system. reflection. Assembly. getexecutingassembly (). getname (). codebase );

InWindowsMedium-Appdomain. currentdomain. basedirectory

3. Pocket PCThe close button function of the window in the device is to minimize the window or place the window in the background, rather than end the process;

4,Why can't exceptions in the timer function be caught in the window function?

A: The timer thread is started by the system. Its exception is directly thrown to the system thread that calls it. Therefore, exceptions cannot be caught in window functions. For promotion, exceptions cannot be captured across threads.

5,Why?WinCEProgram to rewrite the componentDisposeIs the method ineffective?

A:Cf1.0InComponentClass is not implementedIdisposableInterface, and its subclassDisposeThe method is a protected member and does not appear to be automatically called during garbage collection;

6,Can IASP. NETCreate a thread in the program and accessSession?

A: No.SessionThe mechanism uses thread slots, so it cannot be accessed across threads.

7,HowWinCEIs Global Assembly Cache deployed on the device?

A: refer

MS-help: // Ms. msdnqtr. v80.chs/ms. msdn. v80/ms. visualstudio. v80.chs/dv_fxnetcf/html/5aa081e4-13b3-4646-a391-9c184394ac62.htm

Note that we useCabFile deployment Global Assembly Cache, the updated version of the Global Assembly cannot pass the originalCabDirect deployment. To solve this problem, we need to modifyCabIn. GACFile so that. NetProcess knows. GACThe file has changed.

8,PairXMLCan be usedXpathTo simplify and ProcessXMLIt can be used like a database.XpathQuery and locate.

9,How to install twoWebApplication?

A: currentlyVSBuilt-inWebThe installation project does not support one-time installation or poor support (for example, for eachWebYou can use the following methods to specify a virtual path:

A.Use the deployment project templateWindowsInstall the project and install all required files in the application folder.

B.Create a custom installation class and create two folders for the target machineWebShare

For details about how to create a virtual directory, refer

MS-help: // Ms. msdnqtr. v80.chs/ms. msdn. v80/ms. netdevfx. v1_chs/cpref8/html
/T_system_enterpriseservices_internal_iisvirtualroot.htm

Http://www.microsoft.com/china/MSDN/library/enterprisedevelopment/softwaredev
/Vsvbtchusingcustomactionstomodifyinternetinformationserverduringdeployment. mspx? MFR = true

10,Why is the property of my device control not displayed during design?

A: Generally,Vs2005The properties of the following controls, including custom type attributes, can be directly seen in the property window during design, but the following conditions will affect the display of properties:

However,DLLTheDllimport C #Property, the custom control properties cannot be normally displayed in the Property Window.

Note: The cause or solution is unknown. (You can use the design-time attribute desktopcompatible)

11, 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.