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...
This publication is part of a series on what not to do. Instead, do it like this: read MSDN first, then create, not the other way around. And as a result, the problem: "Why is it showing me 56 records? I applied a filter and there should be exactly 1 record!"…
Многие материалы которые я здесь описываю, я размещаю для самого себя, в основном чтобы мучительно долго не вспоминать как же оно делается и вновь пытать поисковики запросами. На сей раз опишу простой пример доступа и выборки данных из табл…
Not long ago, I had to implement DragAndDrop for TreeView and was surprised to find that scrolling does not work out of the box (does not work at all, as it turned out, Microsoft acknowledges this as a problem and suggests solving it in the way described below).
Often there is a need to pass certain parameters between forms in one application, for example, values of certain variables, or run a procedure or function in another form. Here I will tell you about two methods of solving this problem...