Meta tags:
description= .NET Compact Framework Samples: Simple .NET Compact Framework 2.0 examples to kick start your development, Windows Mobile 5.0, PDAs, blogging, and many more.;
keywords= Compact Framework,.NET,mobile,Pocket PC,samples,examples,tutorials,Visual Studio,Compact Framework 2.0,Microsoft,netcf,netcf2,programming,Windows CE,;
Headings (most frequently used words):
2005, compact, framework, net, wednesday, december, november, or, the, january, 2006, in, part, sql, emulator, getting, started_, tutorials, saturday, 07, tuesday, 03, 28, thursday, 15, 14, 30, sunday, 27, friday, 25, categories, previous, posts, archives, links, msmq, message, queueing, create, mobile, database, plasma, lcd, tv, co, founder, of, opennetcf, mentions, my, blog, accessing, server, express, from, pda, vote, suggest, tutorial, topic, multithreaded, prime, number, generator, networking_, ping, new, features, what, is,
Text of the page (most frequently used words):
the (281), and (97), click (56), you (50), that (47), framework (42), this (42), sql (38), #mobile (36), compact (36), for (35), your (34), server (28), new (25), #emulator (25), net (24), msmq (24), database (23), can (23), windows (22), have (21), more (21), code (19), add (19), from (18), are (18), start (18), will (17), file (17), intptr (17), create (16), not (16), read (15), string (15), 2005 (14), message (14), data (13), using (13), first (13), with (13), private (13), form (13), int32 (13), project (12), categories (12), application (12), network (12), see (12), device (12), createprocess (12), select (11), here (11), which (11), button (11), getting (10), tutorial (10), lcd (10), comments (10), posted (10), permalink (10), tags (10), install (10), thread (10), studio (10), cab (10), blog (9), express (9), right (9), write (9), let (9), netcf2 (9), set (9), how (9), still (9), next (9), threading (8), all (8), some (8), support (8), connection (8), close (8), program (8), user (8), false (8), text (8), event (8), system (8), northwind (8), service (8), send (8), queue (8), msmq_adm (8), dll (8), pocket (7), what (7), topic (7), part (7), even (7), microsoft (7), run (7), tab (7), then (7), dialog (7), also (7), check (7), has (7), following (7), visual (7), return (7), explorer (7), hprocess (7), static (7), started_ (6), features (6), plasma (6), access (6), about (6), just (6), does (6), offers (6), out (6), app (6), well (6), connections (6), window (6), within (6), change (6), need (6), should (6), properties (6), under (6), simple (6), back (6), view (6), there (6), tutorials (6), copy (6), messages (6), messagequeue (6), arm (6), closehandle (6), public (6), dllimport (6), coredll (6), extern (6), networking_ (5), ping (5), suggest (5), queueing (5), networking (5), development (5), virtual (5), machine (5), management (5), type (5), too (5), version (5), like (5), but (5), them (5), time (5), class (5), now (5), ensure (5), few (5), use (5), long (5), when (5), while (5), runthread (5), true (5), one (5), double (5), enter (5), leave (5), password (5), handler (5), tcp (5), folder (5), tvs (5), plasmas (5), exists (5), zero (5), december (4), november (4), posts (4), multithreaded (4), prime (4), vote (4), started (4), main (4), called (4), security (4), its (4), servers (4), managed (4), call (4), port (4), partial (4), authentication (4), useful (4), writing (4), tools (4), host (4), address (4), reset (4), soft (4), same (4), name (4), enable (4), learn (4), responsive (4), step (4), pda (4), label (4), test (4), int (4), finally (4), design (4), panel (4), property (4), however (4), most (4), textbox (4), note (4), other (4), download (4), source (4), comm (4), try (4), messagebox (4), show (4), smart (4), expand (4), viewing (4), terms (4), than (4), longer (4), firstdb (4), sdf (4), icon (4), installs (4), receive (4), exe (4), lblreceivemsg (4), testq (4), txtsendmsg (4), strdestq (4), register (4), processinfo (4), exitcode (4), neil (3), january (3), 2006 (3), number (3), founder (3), opennetcf (3), get (3), controls (3), page (3), thanks (3), look (3), such (3), short (3), devices (3), sudoku (3), browser (3), post (3), into (3), say (3), was (3), applications (3), soon (3), already (3), connect (3), doing (3), only (3), means (3), settings (3), ne2000 (3), work (3), times (3), specify (3), want (3), background (3), processing (3), better (3), leaving (3), running (3), invoke (3), clicking (3), being (3), displayed (3), bool (3), isprime (3), texttoshow (3), these (3), image (3), line (3), closing (3), end (3), stop (3), press (3), top (3), their (3), empty (3), easily (3), wednesday (3), below (3), blogging_ (3), edition (3), installed (3), very (3), allows (3), technology (3), link (3), sample (3), extracted (3), created (3), open (3), catch (3), reference (3), yes (3), status (3), left (3), files (3), things (3), models (3), screen (3), ibm (3), query (3), analyzer (3), timeout (3), _path (3), handle (3), hthread (3), cmdline (3), getexitcodeprocess (3), infinite (3), messaging (3), solution (3), package (3), blogger (2), com (2), cowburn (2), links (2), current (2), generator (2), accessing (2), mentions (2), previous (2), blogging (2), pdas (2), been (2), think (2), equivalent (2), java (2), developer (2), known (2), clr (2), having (2), currently (2), list (2), runtime (2), solver (2), seen (2), talks (2), delve (2), looking (2), older (2), interested (2), improvements (2), library (2), classes (2), protocols (2), methods (2), lot (2), intermediate (2), requires (2), explore (2), fact (2), written (2), problem (2), assigned (2), cards (2), driver (2), configure (2), selected (2), contains (2), box (2), adapter (2), case (2), cradling (2), don (2), anything (2), cradle (2), wait (2), usual (2), numbers (2), notice (2), updated (2), object (2), deploy (2), buttons (2), blocked (2), void (2), workerthread (2), update_label (2), label1 (2), respectively (2), minimizebox (2), simply (2), free (2), successor (2), msde (2), replication (2), something (2), dive (2), mdf (2), although (2), access_ (2), make (2), sure (2), sconnection (2), 192 (2), 1433 (2), yourpassword (2), ssql (2), country (2), order (2), sqlcommand (2), cbocountries (2), exception (2), account (2), sqlclient (2), activate (2), enabled (2), clear (2), may (2), another (2), configuration (2), databases (2), node (2), treeview (2), made (2), downloaded (2), both (2), choice (2), particular (2), his (2), response (2), television (2), won (2), burn (2), ins (2), forward (2), lcds (2), angles (2), lifespan (2), added (2), nothing (2), small (2), cover (2), coming (2), tree (2), browse (2), pane (2), table (2), column (2), each (2), generated (2), menu (2), over (2), output (2), directory (2), newer (2), copied (2), filename (2), provider (2), automatically (2), load (2), wceload (2), formatter (2), messagereceived (2), btnreceive (2), second (2), btnsend (2), msmqadm (2), msmqd (2), failed (2), else (2), activatedevice (2), later (2), waitforsingleobject (2), exename (2), maintained, www, bloguniverse, mag, zandoná, wei, meng, lee, archives, fra, category, donate, keep, going, really, bigger, software, kit, provides, she, writes, executed, lingo, resource, safety, necessary, plumbing, programmer, without, worry, much, nitty, gritty, grand, uncle, desktops, platform, developing, churn, productively, focusing, important, business, logic, manages, execution, common, language, apis, subset, latest, shall, deep, suffices, working, improves, hard, tell, beyond, cousin, ones, boldfaced, xml, xmlserializer, xpath, schema, telephony, soap, simplified, asynchronous, web, services, programming, model, serial, registrykey, outlook, ntlm, negotiate, kerberos, messsage, ipv6, imrpoved, generics, direct3d, directdraw, dataset, cryptographic, md5, sha1, des, 3des, rsa, interoperability, rcw, anonymous, additional, forms, introduction, friday, especially, actually, depends, activesync, router, internet, initiation, neither, nor, outside, find, containing, advanced, dropdown, networks, boxes, assuming, dhcp, valid, subnet, card, connects, emulated, familiar, exactly, binding, bind, checkbox, know, emulators, default, sunday, yet, maintains, gives, productive, calculations, decide, engaged, works, illustrate, keeps, calculating, solving, puzzles, threading_, directly, worker, because, belongs, process, synchronously, through, compile, calculated, math, sqrt, break, tostring, eventhandler, sender, eventargs, events, thunderbolt, give, informs, threadstart, shift, attributes, namespace, control, btnstart, btnstop, corner, ppc, thinking, particularly, area, would, readers, therefore, sincerely, invite, frame, above, votebox, asp, own, websites, pages, kindly, comment, 113, actual, together, editions, feature, compared, workload, throttle, restriction, thus, giving, scalability, higher, maximum, size, 4gb, increase, 2gb, kid, block, always, uses, single, cpu, multiple, supports, subscriptions, publisher, extremely, basic, exploration, opinion, comes, console, community, preview, downloadable, predecessor, lacks, 2000, used, combo, populated, countries, initial, catalog, distinct, customers, sqlconnection, sqldatareader, null, executereader, items, form_load, replacing, combobox, near, restart, configurations, sqlexpress, addresses, dynamic, ports, entries, blank, fixing, stopped, best, practice, versions, instances, programs, manager, attach, logins, leftside, login, allow, place, ldf, mysql, thursday, delighted, org, put, words, day, worth, plug, two, years, ago, comparing, sets, hands, down, never, mind, were, slow, streaks, blurs, action, movies, fast, today, changed, sharp, aquos, boasting, remarkable, 4ms, specifications, surpassed, typical, 170, degrees, offer, sony, bravia, example, 178, degree, angle, 000, hours, almost, twice, fair, claim, 60k, hour, rather, norm, moreover, allowing, extended, operation, contrast, general, images, permanently, etched, price, wise, par, advantage, equal, definitely, flat, energy, efficient, suffer, heavier, affordably, replaced, replaceable, fluorescent, tubes, wider, vivid, colors, issue, recently, conducted, poll, turns, requested, ongoing, voting, results, mentioned, lightweight, enough, footprint, 5mb, fit, smoothly, included, users, 2003, smartphone, platforms, word, pre, rom, transactional, multi, synchronization, competition, players, fighting, sybase, anywhere, oracle, lite, db2, everyplace, alright, our, transferred, programmatically, objects, interesting, deployed, yourprojname, extension, manage, environment, tables, columns, shown, zoom, custid, identity, value, record, auto, care, must, taken, 2nd, move, mouse, tooltip, cancel, datasets, prompted, computer, radiobutton, fields, they, convenience, pop, indicate, creating, tuesday, present, interface, provided, via, disparate, necessarily, store, failsafe, mechanism, priorities, strongest, competitors, providing, middleware, remains, product, websphere, based, mark, ihimoyan, excellent, across, watch, space, msmq_, reopening, sent, receivable, effect, done, quite, delay, invoking, loaded, refresh, deserializing, xmlmessageformatter, typeof, timespan, body, frontmost, setting, isn, any, trim, msmqrt, path, getdirectoryname, reflection, assembly, getexecutingassembly, getname, codebase, docname, noui, again, cleanup, binary, drivers, builtin, registry, key, success, checks, remember, generate, stub, mode, similarly, handlers, processid, threadid, setlasterror, imagename, lpprocessattributes, lpthreadattributes, boolinherithandles, dwcreationflags, lpenvironment, lpszcurrentdir, lpsistartinfo, getlasterror, lpszdevkey, dwclientinfo, unchecked, 0xffffffff, failure, declarations, needed, win32, function, interopservices, import, namespaces, existing, item, after, downloading, extract, follow, redistributable, components, center, self, contained, presence, detected, naming, lets, receives, closes, stored, remain, intact, received, restarted, clears, references, component, previously, mqseries, extent, guaranteed, delivery, saturday, income, career, information, singapore, celebrity, treat, kari, byron, mythbusters, zac, efron, hairspray, star, kick, many, samples, quickstart,
Text of the page (random words):
t32 waitforsingleobject intptr handle int32 wait public static bool createprocess string exename string cmdline int32 infinite unchecked infinite int 0xffffffff processinfo pi new processinfo if createprocess exename cmdline intptr zero intptr zero 0 0 intptr zero intptr zero intptr zero pi 0 return false waitforsingleobject pi hprocess infinite int32 exitcode if getexitcodeprocess pi hprocess out exitcode 0 messagebox show failure in getexitcodeprocess closehandle pi hthread closehandle pi hprocess return false closehandle pi hthread closehandle pi hprocess if exitcode 0 return false else return true in the form load event handler remember to generate the event handler stub by double clicking on the form in design mode similarly for the button click event handlers later enter the following code which checks for and installs the msmq service string msmq_adm windows msmqadm exe if createprocess msmq_adm status if file exists msmq_adm file exists windows msmqd dll file exists windows msmqrt dll install msmq string _path path getdirectoryname system reflection assembly getexecutingassembly getname codebase string docname _path msmq arm cab createprocess wceload exe noui _path msmq arm cab check again if file exists windows msmqadm exe messagebox show failed to install msmq cab close else register start and activate service createprocess msmq_adm register cleanup if createprocess msmq_adm register install createprocess msmq_adm register createprocess msmq_adm enable binary intptr handle activatedevice drivers builtin msmqd 0 device registry key closehandle handle if createprocess msmq_adm status return success messagebox show failed to start msmq close in the btnsend click event handler enter the following code to send a message to the testq queue if txtsendmsg text trim return string strdestq private testq queue name try if messagequeue exists strdestq messagequeue create strdestq messagequeue mq new messagequeue strdestq mq send txtsendmsg text txtsendmsg text catch finally in the btnreceive click event handler we will receive the frontmost message in the testq queue note that we are setting a simple timeout of 1 second so the ui is not blocked for too long in case there isn t any message in the queue lblreceivemsg text refresh messagequeue mq new messagequeue private testq set formatter for deserializing message mq formatter new xmlmessageformatter new type typeof string try message messagereceived mq receive new timespan 0 0 1 timeout in 1s lblreceivemsg text string messagereceived body catch lblreceivemsg text timeout we are done deploy and run the first time you run there is quite a long delay on form load as the application is invoking wceload exe to install the msmq service when the form is loaded type something in the textbox and click the send button send a few more messages then click the receive button a few times try closing and reopening the application and test if sent messages are still receivable what about the effect of doing a soft reset in part 2 coming soon we will send msmq messages across the network watch this space categories msmq_ networking_ tags netcf2 compact framework msmq networking read more permalink posted 11 36 am 30 comments tuesday january 03 2006 create a sql mobile database part 1 i recently conducted a small poll and it turns out that sql mobile is the most requested topic see ongoing voting results here so in this tutorial we will cover how to create a sql mobile database for the pda or emulator having seen the sql server express mentioned here let s now look at sql mobile being the successor of sql server ce 2 0 sql mobile is microsoft s lightweight database server that has a small enough footprint 1 5mb to fit and run smoothly in a pocket pc device it is included in visual studio net 2005 so you don t have to install anything as a developer for end users sql mobile can be installed on the pocket pc 2003 windows mobile 5 0 smartphone 5 0 as well as windows ce 5 0 platforms word has it that sql mobile will be pre installed in the rom of all new windows mobile devices just like compact framework 2 0 in terms of features sql mobile offers transactional support multi user access as well as synchronization and replication with back end servers in terms of competition i m not too sure if these few players are still fighting close sybase sql anywhere oracle lite and ibm db2 everyplace alright let s dive in to create our very first sql mobile database start visual studio and create a new smart device project click data in the menu and select add new data source to see the following dialog window select the database icon to indicate that you are creating a database and click next in the next screen click new connection to create a new database in the the pop up add connection window click change to select a data source type you should see the following select microsoft sql server mobile edition as the data source and leave the data provider as net framework data provider for sql server mobile edition click ok back at the add connection dialog leave my computer radiobutton selected and then click create to specify the filename of the sql mobile database enter c firstdb sdf for the filename and leave the other fields as they are you can also specify the password here but we leave it empty for convenience click ok if prompted on the empty password click yes you may now click test connection to check if the database is in order click ok back at the first dialog window click next and click yes to add the database file to your project in the next screen click cancel as we are not using generated datasets in this tutorial you will notice that the firstdb sdf has been added to your project click on it and press f4 to check that its copy to output directory property is copy if newer this means that the file will be copied to the emulator if the emulator does not have a copy or have an older copy now from the menu click view server explorer and in the server explorer pane click the connect to database icon 2nd icon from the right or move your mouse over each icon to see the tooltip click browse and go to your project folder and select the firstdb sdf file note that you can also create a database here but care must be taken to add the created file to your project test the connection and click ok in the server explorer pane expand the tree right click on tables and select create table enter the table name and create 2 columns for it as shown below click on the image below to zoom in note that the custid column has identity set to true so that this column s value for each record is auto generated click ok finally run your program there s nothing interesting in your form however open file explorer and browse to the folder which contains the deployed files at program files yourprojname you should see a file with the name firstdb there the sdf extension is not displayed click on this file to open it with query analyzer query analyzer allows you to explore and manage sql mobile databases from within the pda environment in query analyzer expand the tree under the objects tab you should see this that s it you have created a simple sql mobile database and transferred it to the emulator device part 2 coming soon will cover how to create a sql mobile database programmatically categories data access_ tags netcf2 compact framework sql server mobile read more permalink posted 10 57 am 27 comments plasma or lcd tv two years ago the choice was clear just by comparing their response times plasma television sets won hands down never mind the burn ins lcd tvs were simply too slow and left streaks of image blurs when viewing action movies fast forward to today have things changed the response time problem for lcd television is no longer an issue with some models in particular sharp aquos even boasting a remarkable 4ms in their specifications although plasma tvs still have more vivid colors lcds have surpassed them in terms of viewing angles some lcd models even have wider viewing angles than the typical 170 degrees that plasmas offer the sony bravia for example offers a 178 degree viewing angle lcd models have a longer lifespan of 65 000 hours almost twice longer than that of plasmas to be fair a few plasmas also claim to have a 60k hour lifespan but these are the exception rather than the norm moreover lcd tvs have replaceable fluorescent tubes allowing for even longer extended operation in contrast there s nothing in plasmas that can be easily and affordably replaced finally plasma tvs are in general a lot heavier than lcd tvs and plasmas still suffer from burn ins images get permanently etched on the screen when left displayed for too long price wise both are on par lcds have the added advantage of being more energy efficient so all other things equal i will definitely go for an lcd won t you categories blogging_ tags lcd plasma flat panel read more permalink posted 12 20 am 10 comments wednesday december 28 2005 co founder of opennetcf mentions my blog i m delighted to say that neil cowburn co founder of opennetcf org has put up a short plug for my compact framework tutorials blog in his words my blog is very well worth a read if you are looking to get into smart device development thanks neil you made my day categories blogging_ tags netcf2 compact framework windows mobile read more permalink posted 6 14 pm 4 comments thursday december 15 2005 accessing sql server express from the emulator or pda this post talks about data access from the emulator or actual device to your pc if you re just getting started on the net compact framework 2 0 you can read this to install the tools and this to write your first app in this tutorial you learn how to let the emulator access a sql server express database in your pc sql server 2005 express edition is free and is installed together with most editions of visual studio 2005 as the successor of the very useful msde sql server express offers the equivalent if not better feature set of other free database servers mysql in particular compared to msde sql server express does not have the workload throttle restriction thus giving better scalability and allows a higher maximum database size of 4gb an increase of 2gb however the new kid on the block always uses only a single cpu even if the machine has multiple and supports only replication subscriptions it can t be a publisher still it is extremely useful for basic development and exploration in my opinion it even comes with a management console currently in community technology preview downloadable from a link on this page something that its predecessor lacks now let s dive in this step by step tutorial requires a sample database such as northwind mdf which can be extracted from a download here although northwind was created for sql server 2000 it can also be used in sql server 2005 you should have downloaded and extracted the northwind sample database download from here place both northwind mdf and northwind ldf files in a folder of your choice download and install the management studio express from a link on this page start the management studio and login using windows authentication right click on the first node in the treeview and click properties in the dialog window click security on the left and select sql server and windows authentication this will allow connections to be made using sql server authentication next still in management studio expand the security node in treeview then expand logins in the main panel right click on sa and click properties change the password still within properties dialog click status in the leftside panel and enable the sa account click ok right click on databases and attach the northwind database next we need to enable tcp ip connections click start all programs sql server 2005 configuration tools sql server configuration manager under protocols for sqlexpress ensure that tcp ip is enabled double click on tcp ip set enabled to yes and under the ip addresses tab clear all the tcp dynamic ports entries set them blank and set tcp port under ip all to 1433 we are fixing the port which means sql browser service can be stopped in fact this is a security best practice you may need to use another port number if you have other versions instances of sql server running restart the sql express service to activate the new configurations start visual studio and create a new smart device project add a combobox called cbocountries to the form add the reference system data sqlclient to your project in code view add the line using system data sqlclient near the top in the form_load event handler add the following code replacing 192 1 2 3 with your ip address and yourpassword with the password for your sa account string sconnection data source 192 1 2 3 1433 initial catalog northwind user id sa password yourpassword string ssql select distinct country from customers order by country sqlcommand comm new sqlcommand ssql new sqlconnection sconnection sqldatareader dr null try comm connection open dr comm executereader while dr read cbocountries items add dr 0 catch exception e messagebox show e message return dr close comm connection close start the emulator and cradle it see this post on cradling the emulator make sure that it can access the network run your program you should see the combo box populated with a list of countries extracted from the northwind sample database what next learn how to create a sql server mobile database here categories data access_ networking_ tags netcf2 compact framework sql server read more permalink posted 11 43 pm 113 comments wednesday december 14 2005 vote or suggest a tutorial topic there are some compact framework tutorials that i m thinking of writing particularly in the area of sql server mobile however i would like the readers of this blog to have a say i therefore sincerely invite you to suggest or vote for a compact framework topic that you d like to see most to vote click on one or more of the links in the frame below to suggest a topic simply type in the textbox and click the suggest button thanks for your support the above votebox is written using asp net 2 0 if you re interested in using it in your own websites pages kindly leave me a note comment categories blogging_ tags netcf2 compact framework read more permalink posted 12 46 am 3 comments wednesday november 30 2005 multithreaded prime number generator this is more of an intermediate topic if you re just getting started on the net compact framework 2 0 you can read this to install the tools and this to write your first app in this tutorial you learn how to write a multithreaded program that does some background processing and yet maintains a ui that s responsive to the user a multithreaded program is useful in that it gives the user a responsive ui and at the same time be productive in some background work such as doing long calculations and io how do you decide when to start a thread if the program is about to...
|