windows-ce

DataGrid column size (Compact Framework) C#

两盒软妹~` 提交于 2019-12-11 01:47:58
问题 I'm new with DataGrids. My Code: private void populateGrid() { conn.Open(); string query; query = "select company_id_no, company_name, last_update_datetime, username from company"; OracleDataAdapter da = new OracleDataAdapter(query, conn); OracleDataSet ds = new OracleDataSet(); da.Fill(ds); dgSku.DataSource = ds.Tables[0]; } This is how it looks on my mobile device: I want it to automatically re-size the columns to 100%, like: I would really appreciate if someone can point me in the right

Run command line program silently with c# on wince

微笑、不失礼 提交于 2019-12-11 01:45:35
问题 I once again need some help. I'm using the .net Compact Framework and the programming language C# to develop for mobile devices that are running WinCE 5.0. What I want to accomplish is to programmatically mount a network drive. To do so, the app runs the following code in a background thread: ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "net"; startInfo.UseShellExecute = false; startInfo.Arguments = @"use logs \\server\logs /user:dom\uname /password:pw"; Process p

Windows Embedded CE 6.00 cannot .run Net compact Framework 3.5 application

*爱你&永不变心* 提交于 2019-12-11 01:34:39
问题 First of all, i have a device with Windows Embedded CE 6.0. As we know, EWS Managed API can only be used on .NET Framework 3.5 and above. I created a new project ->Smart Device Project -> Target Platform: Window CE .NET Compact Framework Version: .NET Compact Framework Version 3.5 Templates: Device Application Then i tried to use EWS API library to write a program to send email from server to my email but there is an error. Error 1 The type 'System.TimeZoneInfo' is defined in an assembly that

Available space left on drive - WinAPI - Windows CE

左心房为你撑大大i 提交于 2019-12-10 23:37:11
问题 I've forgotten the WinAPI call to find out how much space is remaining on a particular drive and pinvoke.net isn't giving me any love. It's compact framework by the way, so I figure coredll.dll. Can anyone with a better memory jog mine? 回答1: GetDiskFreeSpaceEx. That links to pinvoke.net's desktop page; simply replace kernel32 with coredll . Unfortunately System.IO.DriveInfo is not present on Compact Framework. It doesn't quite fit with Windows CE's Unix-style singly-rooted tree. 来源: https:/

Windows CE 6.0 - Installing SQL Server CE 3.5 into the run-time image

百般思念 提交于 2019-12-10 20:15:04
问题 I made an application that I put onto the hard disk of Win CE (the Compact Flash card). My problem is that the application is using the SQL Server CE 3.5 database but it looks like that the image is created with the SQL Server CE 3.0. I couldn't select the 3.5 version when I started to build the image. The 3.5 version dlls are deployed every time I debug the application so the problem never shows up in the development phase. Now when the application starts (it is started automatically when OS

How can I handle Ctrl+C in a Windows CE console application?

不羁的心 提交于 2019-12-10 20:13:49
问题 I need to make some clean up before closing my application, but SetConsoleCtrlHandler doesn't seem to be available for Windows CE console applications. Is there any alternative method for handling Ctrl+C in Windows CE 6? 回答1: According to Microsoft's documentation, on Windows CE 3.0 and up, the DeviceIoControl function called with the IOCTL_CONSOLE_SETCONTROLCHANDLER control code will install a Ctrl+C handler on Windows CE. I haven't tried it out myself yet, but something like this "should"

Install WinCE 5.0 Platform Builder SDK - build code with Visual Studio 2012 or higher

…衆ロ難τιáo~ 提交于 2019-12-10 20:02:03
问题 I have a Windows CE 5.0-based Platform Builder image. It is intended to be installed on Visual Studio 2005. My team would like to upgrade our build tools to utilize Visual Studio 2012, but Visual Studio 2012 does not support this platform image. To be clear; I am not asking whether or not Visual Studio 2012 (or higher) supports Platform Builder SDKs targeting Windows CE 5.0. That question has already been answered (more or less), and the answer is clearly "No." Instead, what I'd like to do is

WinCE: How can I determine the module that contains a code address?

耗尽温柔 提交于 2019-12-10 19:07:19
问题 I wrote a solution that involved OpenProcess, EnumProcessModules, GetModuleInformation and GetModuleBaseName, but apparently EnumProcessModules and GetModuleBaseName do not exist in Windows CE! What alternative is there? 回答1: I found a way to do this with CreateToolhelp32Snapshot, Module32First, Module32Next, Process32First and Process32Next. First you have to get a list of modules, then search through the list of modules to find the desired address. #include <Tlhelp32.h> struct MyModuleInfo

Faster way to get File Size information C++

随声附和 提交于 2019-12-10 18:53:49
问题 I have a function to get a FileSize of a file. I am running this on WinCE. Here is my current code which seems particularily slow int Directory::GetFileSize(const std::string &filepath) { int filesize = -1; #ifdef linux struct stat fileStats; if(stat(filepath.c_str(), &fileStats) != -1) filesize = fileStats.st_size; #else std::wstring widePath; Unicode::AnsiToUnicode(widePath, filepath); HANDLE hFile = CreateFile(widePath.c_str(), 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE

System.Data.SQLite issue on compact Framework 3.5

允我心安 提交于 2019-12-10 18:25:43
问题 I am using sqlite in my compact framework application to log the events in system. I am also using System.Data.SQLite. The event has the time stamp to describe at what time it occurred. I am storing this Time stamp as Ticks in my table. Along with this column the table contains another 5 columns of integer/text type. Below is table schema CREATE TABLE T1 (TimeStamp INTEGER, Col2 INTEGER, Col3 INTEGER, Col4 INTEGER, Col5 INTEGER, Col6 TEXT, PRIMARY KEY(TimeStamp DESC)); I am querying for the