Embedded Visual Basic 3.0 and the planning of Windows Ce 3.0
It is mattering with the times that they run to be able to have access in immediate and simple manner to the always increasing mole of information of whom we need, even if to be able have carried them of breast pocket I do not ruin..... N.B: You can found an Italian Version of this Article here: http://web.tiscali.it/mberardi/articoli/panoramica_su_evb30.htm
AI
Podsumowanie AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Kod źródłowy
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:w = "urn:schemas-microsoft-com:office:word"><HEAD><TITLE>I articulate</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <META content=Word.Document name=ProgId> <META content="MSHTML 6.00.2715.400" name=GENERATOR> <META content="Microsoft Word 10" name=Originator> <META content="Berardi Michele Programmatore Senior Developer http://web.tiscali.it/mberardi/ e-mail: [email protected] [email protected] mobile: +39 347 319 2000 Customize Your Opportunities!" name=author> <META content="http://web.tiscali.it/mberardi/ Berardi Michele programmatore senior con esperienze concomitanti sia nella ricerca e sviluppo su sistemi wireless e palmari che web programming nonchè programmazione classica , amministrazione e gestione della sicurezza e del problem solving attinente la gestione sia dei sistemi Unix che windows. La sua esperienza si fonda su solide nozioni classiche di algoritmica e programmazione che su ricerca continua all'innovazione ed al miglioramento delle conoscenze in sintonia con i tempi. Come valore aggiunto offre una forte capacità creativa e di integrazione con i commerciali ed in genere nel team working." name=description> <META content="web agency, website, siti, internet, web, solutions, maintenance, creations, toys, advertise, games, giochi, flash, Tin.it, Virgilio, Seat pagine gialle, advertising, consulenza, net added value, new economy, tecnologia, web oriented, webdesign, search engines, registrazione nei motori, motori di ricerca, usability, usabilità, spazio web, registrazione dominio, commercio elettronico, connettività, mobile, marketing, multimedia, business-to-business, business-to-consumer, b2b, b2c, umts, wap, gprs, wireless, e-commerce, portali, web portal, hosting, programmazione, asp, php, ASP, xml, html, javascript, java, js, css, action scripts, dhtml, dynamic, xhtml, vbscript, cgi, sql, perl, carrello elettronico, database, Foggia, provincia di Foggia, Puglia, Italia, Italy , Programmatore, developer, creative, analyst, senior, embedded, visual, basic, C, pocket, pc, palmari, career, summary, expert, system, administrator, unix, windows, win32, *nix, linux, solaris, windows, CE, wireless, customize, opportunities" name=keywords><LINK href="panoramica_su_evb30_file/filelist.xml" rel=File-List><!--[if gte mso 9]><xml> <w:WordDocument> <w:HyphenationZone>14</w:HyphenationZone> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <STYLE>@font-face { font-family: Verdana; } @page Section1 {size: 595.3pt 841.9pt; margin: 42.55pt 2.0cm 2.0cm 2.0cm; mso-header-margin: 35.4pt; mso-footer-margin: 35.4pt; mso-paper-source: 0; } P.MsoNormal { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman" } LI.MsoNormal { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman" } DIV.MsoNormal { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman" } A:link { COLOR: blue; TEXT-DECORATION: underline; text-underline: single } SPAN.MsoHyperlink { COLOR: blue; TEXT-DECORATION: underline; text-underline: single } A:visited { COLOR: purple; TEXT-DECORATION: underline; text-underline: single } SPAN.MsoHyperlinkFollowed { COLOR: purple; TEXT-DECORATION: underline; text-underline: single } P.autore { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-STYLE: italic; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: center; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: autore } LI.autore { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-STYLE: italic; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: center; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: autore } DIV.autore { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-STYLE: italic; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: center; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: autore } P.bibliografia { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: bibliografia } LI.bibliografia { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: bibliografia } DIV.bibliografia { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: bibliografia } P.biografia { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: biografia } LI.biografia { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: biografia } DIV.biografia { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: biografia } P.listatino { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Courier New"; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: listatino } LI.listatino { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Courier New"; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: listatino } DIV.listatino { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Courier New"; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: listatino } P.occhiello { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-STYLE: italic; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: center; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: occhiello } LI.occhiello { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-STYLE: italic; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: center; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: occhiello } DIV.occhiello { FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-STYLE: italic; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: center; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: occhiello } P.titolodellarticolo { FONT-WEIGHT: bold; FONT-SIZE: 22pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: center; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: titolodellarticolo } LI.titolodellarticolo { FONT-WEIGHT: bold; FONT-SIZE: 22pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: center; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: titolodellarticolo } DIV.titolodellarticolo { FONT-WEIGHT: bold; FONT-SIZE: 22pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: center; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: titolodellarticolo } P.titolettodiparagrafo { FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: titolettodiparagrafo } LI.titolettodiparagrafo { FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: titolettodiparagrafo } DIV.titolettodiparagrafo { FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: titolettodiparagrafo } P.rubrica { FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: right; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: rubrica } LI.rubrica { FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: right; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: rubrica } DIV.rubrica { FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: right; mso-pagination: widow-orphan; punctuation-wrap: simple; mso-fareast-font-family: "Times New Roman"; mso-style-name: rubrica } DIV.Section1 { page: Section1 } </STYLE> <!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabella normale"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--> <META content="Berardi Michele Programmatore Senior Developer http://web.tiscali.it/mberardi/ e-mail: [email protected] [email protected] mobile: +39 347 319 2000 Customize Your Opportunities!" name=author> <META content="http://web.tiscali.it/mberardi/ Berardi Michele programmatore senior con esperienze concomitanti sia nella ricerca e sviluppo su sistemi wireless e palmari che web programming nonchè programmazione classica , amministrazione e gestione della sicurezza e del problem solving attinente la gestione sia dei sistemi Unix che windows. La sua esperienza si fonda su solide nozioni classiche di algoritmica e programmazione che su ricerca continua all'innovazione ed al miglioramento delle conoscenze in sintonia con i tempi. Come valore aggiunto offre una forte capacità creativa e di integrazione con i commerciali ed in genere nel team working." name=description> <META content="web agency, website, siti, internet, web, solutions, maintenance, creations, toys, advertise, games, giochi, flash, Tin.it, Virgilio, Seat pagine gialle, advertising, consulenza, net added value, new economy, tecnologia, web oriented, webdesign, search engines, registrazione nei motori, motori di ricerca, usability, usabilità, spazio web, registrazione dominio, commercio elettronico, connettività, mobile, marketing, multimedia, business-to-business, business-to-consumer, b2b, b2c, umts, wap, gprs, wireless, e-commerce, portali, web portal, hosting, programmazione, asp, php, ASP, xml, html, javascript, java, js, css, action scripts, dhtml, dynamic, xhtml, vbscript, cgi, sql, perl, carrello elettronico, database, Foggia, provincia di Foggia, Puglia, Italia, Italy , Programmatore, developer, creative, analyst, senior, embedded, visual, basic, C, pocket, pc, palmari, career, summary, expert, system, administrator, unix, windows, win32, *nix, linux, solaris, windows, CE, wireless, customize, opportunities" name=keywords></HEAD> <BODY lang=IT style="tab-interval: 35.4pt" vLink=purple link=blue> <DIV class=Section1> <P class=rubrica><A href="http://web.tiscali.it/mberardi/articoli/popup_emu.zip">Download here the project source code</A></P> <P class=MsoNormal> </P> <P class=titolodellarticolo>Embedded Visual Basic 3.0</P> <P class=titolodellarticolo>and the planning of Windows Ce 3.0</P> <P class=autore>by Michele Berardi</P> <P class=MsoNormal> </P> <P class=occhiello>The explosive mania of the pocket applications</P> <P class=MsoNormal> </P> <P class=MsoNormal>It is mattering with the times that they run to be able to have access in immediate and simple manner to the always increasing mole of information of whom we need, even if to be able have carried them of breast pocket I do not ruin.</P> <P class=MsoNormal> </P> <P class=MsoNormal>After to to be run to gain a PDA and to have some past now to play us on, we notice ourselves that for those this technological wonder hand to hand itself yourselves it it more indispensable not only to organize our engagements but also for very other requirements, even if we have the talent of the computer program and in mind a shining idea to apply these technologies, we wonder us if the house motherPlanned the operating system (we will analyze in this case windows ce) makes available us some tools of development.</P> <P class=MsoNormal> </P> <P class=MsoNormal>The suite in matter released like free is called embedded visual I study, itself compone of 2 environments orientated to the development in c/c + + and visual basic, we will take care of ourselves this one. These finish renamed for the occasion in “embedded visual basic”, in synthesis a version to hoc of vbscript. Our escursus will drive us between the characteristic of this environment that for how much pertains the structure of the RAD reflects faithfully the environment visual made basic exception</P> <P class=MsoNormal>For some actual features of the systems embedded.</P> <P class=MsoNormal> </P> <P class=titolettodiparagrafo>The environment of development and test.</P> <P class=bibliografia>A time unloaded the environment of development hence: <A href="http://www.microsoft.com/mobile/downloads/emvt30.asp">http://www.microsoft.com/mobile/downloads/emvt30.asp</A> </P> <P class=MsoNormal> (That it weighs about like sole 300mb installer), we proceed in easy manner to its installation on the car of development that I remember to be able to to be used to emulate the embedded systems should ascend an operating system NT compatibile (nt or 2000 goes well).</P> <P class=MsoNormal> </P> <P class=MsoNormal>At the conclusion of the installation we will have embedded coupled it visual basic and visual c + + ready to to be thrown.</P> <P class=MsoNormal>Performing embedded visual basic we notice themselves with big satisfaction that for ourselves gotten used to the warm and friendly RAD of visual basic nothing is changed, we note alone some windows in more where we will note for example a pigeonhole to come down with to the indicating inside the name of one of the varied device supported from the technology windows ce.</P> <P class=MsoNormal> </P> <P class=MsoNormal>Certainty we will note the classic helm with the typical controls of vb and all the windows to their place, but extited for the desire to write a program of example, even if a simple form with a button that us show the classic hallo world,</P> <P class=MsoNormal>Choosing from menu file a novelty I project we will choose the platform for that breed the form of example, on which operate like with visual basic (introducing controls and code clicking or writing by hand the necessary lines of code). The successive step will be at our discretion the generation of the code vbscript from uploadare on the car pocket pc join to our pc how described in the manual of use of our peripheral pocket pc or the execution of the application in one of the varied environments of emulation distributed with the suite (the emulation will be possible alone on the systems of development having like S. OR. windows. </P> <P class=MsoNormal> </P> <P class=titolettodiparagrafo>The differences with Visual Basic</P> <P class=MsoNormal>The systems windows ce is a windows32 bit compatible (while is not supported win16 bit for example..)</P> <P class=MsoNormal>Whose together of bookstores and functions of system much are reduced and laughs at the bone for obvious motive of solidarity</P> <P class=MsoNormal>And meager availability of resources (in origin perhaps could be worth, but today the power of such peripheral grew sensitively).</P> <P class=MsoNormal> </P> <P class=MsoNormal>The first one what that jumps to the eye is the missed support of the UDT (user defined types), thing that goes around with the due sense and simulating the structure that it is wanted representative, therefore in phase of import of the code from visual traditional basic behaves a total rewrote of the portions of code that do use of abovementioned structures.</P> <P class=MsoNormal> </P> <P class=MsoNormal>The general controls of use and of support to the interface user they are all presents (listbox,treeview,filesystem,ecc..) and all supported the methods exhibited from their seeming desktop, even if turning between the newsgroup complain themselves bug in the management of some methods (for example of winsock control..) .</P> <P class=MsoNormal> </P> <P class=MsoNormal>Other scarcity the direct management of the popup menu (using the calls to the bookstores of system we can hold in check this feauture , the web abounds of code of example..)</P> <P class=MsoNormal> </P> <P class=MsoNormal>The relevant functions to the register there are all and an appropriate api-viewer installed with the tools of embedded visual I study, will help to recreate us the part of code necessary basic code function to the purposes of our program is correctly defined.</P> <P class=titolettodiparagrafo> </P> <P class=titolettodiparagrafo>To manage THE Pop Up and the function “tap and hold” menu from Embedded Visual Basic</P> <P class=MsoNormal> </P> <P class=MsoNormal>How indicated in the short panoramic one on embedded visual basic an of the scarcities in limits of management directed by part of embedded visual basic they are the Pop Up menu and the function “tap and hold” typical of the palm systems equipped of touch screen, equivalent of the function “right key of the mouse” natural part of the traditional pc.</P> <P class=MsoNormal> </P> <P class=MsoNormal>I will pick the occasion for drive you throught some steps in the accomplishment of a simple application with embedded visual inclusive basic of the management of the Pop menu Up, using some actual functions of bookstore of the kernel of windows ce.</P> <P class=MsoNormal> </P> <P class=MsoNormal>Basic visual basic environment skill is required, therefore alone some intervent when in the course of the guided accomplishment will be found us opposite to actual operations of embeded visual basic.</P> <P class=MsoNormal> </P> <P class=MsoNormal>Ahead all we will proceed to the creation of a new project, if to the start of embedded visual basic will not appear the window “new project”, we will proceed choosing from the menu “File” the voice “new project” and from the window will choose a relevant project to an of the platforms installed. For convenience we choose the model named: “Windows CE for Pocket PC project” and we choose “ok”. Now we will have the classic empty form on which build our application.</P> <P class=MsoNormal> </P> <P class=MsoNormal> </P> <P class=MsoNormal>For first thing we add to the project a new form of program, moving us in the window project or from the menu file choosing the voice “add moduls”, to its inside we will introduce the following lines of code:</P> <P class=MsoNormal> </P> <table cellpadding=5 width="100%" bgcolor=#e0e0e0 border=0> <tbody> <tr> <td><P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Option Explicit<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public CurX As Integer, CurY As Integer, MenuX As Integer, MenuY As Integer<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const MF_ENABLED = &H0&<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const MF_STRING = &H0&<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const MF_GRAYED = &H1&<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const MF_CHECKED = &H8&<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const MF_UNCHECKED = &H0&<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const MF_SEPARATOR = &H800&<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const TPM_CENTERALIGN = &H4<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const TPM_RIGHTALIGN = &H8<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const TPM_BOTTOMALIGN = &H20<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const TPM_VCENTERALIGN = &H10<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const TPM_TOPALIGN = &H0&<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const TPM_LEFTALIGN = &H0&<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Const TPM_RETURNCMD = &H100&<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public OpVec(10), OpName (10) As Integer<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Declare Function CreatePopupMenu Lib "Coredll" () As Long<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Declare Function AppendMenu Lib "Coredll" Alias "AppendMenuW" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As String) As Long<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Public Declare Function TrackPopupMenuEx Lib "Coredll" (ByVal hMenu As Long, ByVal an As Long, ByVal n1 As Long, ByVal n2 As Long, ByVal hWnd As Long, lpTPMParams As Long) As Long<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Function ShowPopupMenu (intPosLeft As Integer, intPosTop As Integer, frmName As Form) As Integer<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino>Dim hMenu As Long</P> <P class=listatino> </P> <P class=listatino>' -beginning- construction and popolamento of the pop up menu</P> <P class=listatino> </P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">hMenu = CreatePopupMenu<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> AppendMenu hMenu, OpVec(1), 1, OpName (1)<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> AppendMenu hMenu, OpVec(2), 2, OpName (2)<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> AppendMenu hMenu, MF_SEPARATOR, 0, "--------------------"<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> AppendMenu hMenu, OpVec(3), 3, OpName (3)<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> AppendMenu hMenu, OpVec(4), 4, OpName (4)<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> </SPAN> AppendMenu hMenu, OpVec(5), 5, OpName (5)</P> <P class=listatino> </P> <P class=listatino>'</P> <P class=listatino>' -end- construction</P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">'<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">ShowPopupMenu = (TrackPopupMenuEx (hMenu, TPM_LEFTALIGN Or TPM_TOPALIGN Or TPM_RETURNCMD, intPosLeft, intPosTop, frmName. hWnd, 0))<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino>End Function</P> <P class=MsoNormal> </P> </td> </tr> </tbody> </table> <P class=listatino> </P> <P class=listatino> </P> <P class=MsoNormal>Now we return at our empty form and insert a button of order making sure us of to name it “cmdOpzioni” and a label, to which we will give the name “lblRisultato”.</P> <P class=MsoNormal> </P> <P class=MsoNormal>Subsequently we add to the form an event Timer, rename it “mnuTimer”, this event will be occupied to monitor and to moderate intervals of time if the user carries out operations of tap & hold on the button of order “cmdOpzioni”, additional to our form.</P> <P class=MsoNormal> </P> <P class=MsoNormal>Select our form and go in the code display of formal procedure.</P> <P class=MsoNormal> </P> <P class=MsoNormal>select in the procedure started of default to the loading of the Form, which will make turn the execution of the program (safe different choice in phase of definition of the project), named Form_Load(), and we introduce this code:</P> <P class=MsoNormal> </P> <table cellpadding=5 width="100%" bgcolor=#e0e0e0 border=0> <tbody> <tr> <td><P class=listatino>'</P> <P class=listatino>' we boot the strip of the options to pass the function that emulates</P> <P class=listatino>' the menu to come down...</P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">'<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">OpVec (1) = MF_ENABLED Or MF_STRING<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">OpVec (2) = MF_ENABLED Or MF_STRING<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">OpVec (3) = MF_GRAYED Or MF_STRING<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">OpVec (4) = MF_ENABLED Or MF_STRING Or MF_CHECKED<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">OpVec (5) = MF_GRAYED Or MF_STRING Or MF_CHECKED<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino>OpName (1) = " First Option"</P> <P class=listatino>OpName (2) = " Second Option"</P> <P class=listatino>OpName (3) = " Inactive Option"</P> <P class=listatino>OpName (4) = " Chosen of Default"</P> <P class=listatino>OpName (5) = "Inactive-Chosen"</P> </td> </tr> </tbody> </table> <P class=MsoNormal> </P> <P class=MsoNormal>Subsequently and outside from the procedure Form_Load() , we introduce these lines of code:</P> <P class=MsoNormal> </P> <table cellpadding=5 width="100%" bgcolor=#e0e0e0 border=0> <tbody> <tr> <td><P class=listatino>Private<SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> Sub cmdOpzioni_MouseDown (ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)<o:p></o:p></SPAN></P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">CurX = X<o:p></o:p></SPAN></P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">CurY = Y<o:p></o:p></SPAN></P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">MenuX = X + cmdOpzioni. Left<o:p></o:p></SPAN></P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">MenuY = Y + cmdOpzioni. Top<o:p></o:p></SPAN></P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">mnuTimer. Enabled = True<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">End Sub<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino>Private<SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> Sub cmdOpzioni_MouseMove (ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)<o:p></o:p></SPAN></P> <P class=listatino> ' <SPAN lang=EN-GB style="mso-ansi-language: EN-GB"></SPAN>if the pen is moved from the object we are unaware of the function of "tap & hold"</P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">If Abs (CurX - X) > 4 Then mnuTimer. Enabled = Fake<o:p></o:p></SPAN></P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">If Abs (CurY - Y) > 4 Then mnuTimer. Enabled = Fake<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">End Sub<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino>Private<SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> Sub cmdOpzioni_MouseUp (ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)<o:p></o:p></SPAN></P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">mnuTimer. Enabled = Fake<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">End Sub<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino>Private<SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> Sub mnuTimer_Timer ()<o:p></o:p></SPAN></P> <P class=listatino><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Dim intMenuResult As Integer<o:p></o:p></SPAN></P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">mnuTimer. Enabled = Fake<o:p></o:p></SPAN></P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">intMenuResult = ShowPopupMenu (MenuX, MenuY + 30, Me)<o:p></o:p></SPAN></P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB"></SPAN>lblRisultato. Caption = "you chose the option: " & OpName (1)</P> <P class=listatino> </P> <P class=listatino> ' introducing a structure houses.. select</P> <P class=listatino> ' we can manage better the operations</P> <P class=listatino> ' To perform in base to the choice of the user.</P> <P class=listatino> </P> <P class=listatino> Select Houses intMenuResult</P> <P class=listatino> Houses 1</P> <P class=listatino> ' you introduce here the code that will go performed if the user</P> <P class=listatino> ' it chooses this option..........................</P> <P class=listatino> Houses 2</P> <P class=listatino> Houses 3</P> <P class=listatino> 'the option is disabled....</P> <P class=listatino> Houses 4</P> <P class=listatino> Houses 5</P> <P class=listatino> 'option disabled..........</P> <P class=listatino> End Select</P> <P class=listatino> </P> <P class=listatino> ' to activate and to deactivate the option man hand that we work over be there we entrust</P> <P class=listatino> ' to the function exclusive...Or</P> <P class=listatino> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">OpVec (intMenuResult) = OpVec (intMenuResult) Xor MF_CHECKED<o:p></o:p></SPAN></P> <P class=listatino>End Sub</P> </td> </tr> </tbody> </table> <P class=MsoNormal> </P> <P class=MsoNormal> </P> <P class=MsoNormal> </P> <P class=listatino> </P> <P class=MsoNormal> </P> <P class=MsoNormal>Now we are ready to make endorser under emulation or directly on the car target the ours program,</P> <P class=MsoNormal>and it is therefore arrived the time to illustrate the phases of set up of the environment of emulation and the installation of packet of creation stand-alonr for all systems windows ce compatible with our application of example (in this case there we entrust alone to functions of the kernel of windows ce present in all his reincarnations. .).</P> <P class=MsoNormal> </P> <P class=titolettodiparagrafo>How to boot the environment for the emlation and create packet of installation for the target machine</P> <P class=MsoNormal> </P> <P class=MsoNormal>move itself in the menu File, choose the option make (near the voice “nomeprogetto. vb”) and to breed the file</P> <P class=MsoNormal>*.Vb.</P> <P class=MsoNormal> </P> <P class=MsoNormal>Subsequently to move itself in Tools / Remote Tools / and to choose “Application Install Wizard”.</P> <P class=MsoNormal> </P> <P class=MsoNormal>The wizard will follow us during everything the phases of construction of the file. cab asking us the route of the files of project and other information, in the following order:</P> <P class=MsoNormal> </P> <P class=MsoNormal>1. file of project. ebp</P> <P class=MsoNormal>2. file I project. vb</P> <P class=MsoNormal>3. folder where will come created the file of the installer</P> <P class=MsoNormal>4. the/the processors for which include the runtimes</P> <P class=MsoNormal>5. eventual active-additional x to include in the file of installation</P> <P class=MsoNormal>6. files of data additional user</P> <P class=MsoNormal>7. the directory of destination, more a series of data describing the application (description,producer,ecc..)</P> <P class=MsoNormal> </P> <P class=MsoNormal>Us not awn that click on install and to breed the file. cab and the remote installer. The phase of copy of the file of installation of the application happens is copying directly on the device the file. cab that starting the application of install bred from the trial, that will provide is to copy the necessary files on the pocket pc that to invite the user to install I applied it.</P> <P class=MsoNormal> </P> <P class=MsoNormal> </P> <P class=titolettodiparagrafo>Conclusions</P> <P class=MsoNormal> </P> <P class=MsoNormal>All it adds the suite Microsoft Embedded visual I study 3.0 is free and is rich of relevant documentation to the planning of the windows ce devices, even I notice some bug in the planning of some relevant components to adoce (I think does not reduced to the smaller limits and suitable to manage the systems windows ce...) and winsock.</P> <P class=MsoNormal> </P> <P class=MsoNormal>The community of developers is lively at work for patching or use some tricks for scarcities aside of mommy microsoft like for example the direct support for the popup menu and the scarcity of UDT (user defined types).</P> <P class=MsoNormal> </P> <P class=titolettodiparagrafo><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Bibliography<o:p></o:p></SPAN></P> <P class=bibliografia><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=bibliografia><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">[1] <B>Pocket PC Development in the Enterprise</B> Microsoft Press, <I>Andreas Sjostrom and Christian Forsberg.</I><o:p></o:p></SPAN></P> <P class=bibliografia><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">[2] to Program Windows Ce Microsoft Press</SPAN> <SPAN lang=EN-GB style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">, Douglas Boling.</SPAN> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><o:p></o:p></SPAN></P> <P class=bibliografia><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"> <o:p></o:p></SPAN></P> <P class=titolettodiparagrafo>References</P> <P class=bibliografia>[2] <A href="http://www.devbuzz.com/">http://www.devbuzz.com/</A> <A href="http://www.microsoft.com/mobile/downloads/emvt30.asp">http://www.microsoft.com/mobile/downloads/emvt30.asp</A> </P> <P class=MsoNormal> </P> <DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 1pt; BORDER-BOTTOM: medium none"> <P class=biografia>Michele Berardi</P></DIV> <P class=MsoNormal>Computer program Senior</P> <P class=MsoNormal>It has working for different months on the pocket pc for account of a partner Hewlett Packard.</P> <P class=MsoNormal>It works at present like Computer Program Senior.</P> <P class=MsoNormal><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">E-mail(s )</SPAN> :<A href="mailto:[email protected]"> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB">03473192000@vizzavi. it</SPAN></A> <SPAN lang=EN-GB style="mso-ansi-language: EN-GB"></SPAN><A href="mailto:[email protected]"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">[email protected]</SPAN></A> <SPAN style="mso-ansi-language: EN-GB"><SPAN lang=EN-GB><o:p></o:p></SPAN></SPAN></P></DIV> </BODY></HTML>
Oryginalne komentarze (3)
Odzyskane z Wayback Machine