Many developers have encountered this issue when their application works perfectly until the device goes into sleep mode. Or when you need to keep the screen on for a long time without touching the screen (e.g., when you're creating your own navigation system).
Encountered a big need to run Putty (ssh client) on my HD2. And everything is fine, downloaded, launched, everything works well but the screen width is not enough in vertical position and some information is not visible. For example, when executing the command <b>ps -ax</b>, the lines were simply cut off (did not fit on the screen, the lower scrollbar was missing, and it was impossible to view the information). I've been searching the internet - nothing really worked to rotate the screen for this application. As a result, I decided to quickly write my own program.<br><br>So, the program's main purpose is to rotate the screen, launch Putty, wait for Putty to complete, and return the screen to its normal position.<br><br>The code can be easily adapted to change the orientation in other programs.<br><br>So, the program itself:
The easiest way to create archives in C# is to use the special library 'DotNetZip'. The library has a very large functionality and allows you to do real wonders, but at the same time it is very simple to use when you need to quickly pack or unpack something small. Moreover, the package even includes a library for the Compact Framework.
Everything below is written as an example, learn to use Dapper better. Below, in a separate class, methods are implemented not only to execute queries of the type (Scalar and NonQuery) but also a method that returns a set of data in DataTable. The handling of exceptional situations is also considered.
Example function that changes the size of an image on a Windows Mobile platform. Example: //Changing image sizes public static Image Resize(Image image, Size size) { Image bmp = new Bitmap(size.Width, size.Height); using (…
Here I will provide a function to rotate an image by 90 degrees, but not to display a pictureBox at a certain angle, but rather to transform the image so that the input is one image and the output is an absolutely different, but identical to the first, image - rotated by 90 degrees.
Recently, I've had to work with Word documents from C# quite often. I'd say it's a decent mechanism for generating simple reports. It's quite convenient - since Word is often installed on most user computers, there's no need to install additional components, such as Crystal Reports (they're good, but when you need something very simple, it's better without them).
Recently, I was thinking about a small task - to use the camera in my application and get photos from it. As it turned out, it's quite simple to do. To do this, you just need to add the Microsoft.WindowsMobile.Forms library to your project.
Recently, I was faced with the task (due to the acquisition of the HTC HD2 device) of how to access the accelerometer data in it. And here is the result of my work, a small library for accessing the G-Sensor in HTC (theoretically, it should be suitable for all HTC devices with an accelerometer).
In essence, there's nothing simpler than populating a ComboBox from a DataSet. This is done as follows: SqlConnection connRC = new SqlConnection(MainParams.ConStr); string command = "SELECT Kod, Nam FROM Produkt ORDER BY Nam"; SqlDataAdapter...