Is there any way to Use the Builtin ScrollBars that comes with each .Net ScrollableControl without setting the AutoScroll Property to Enable? Here is the issue, even If I Enable, set to Visible and declare min and max values as well as the smallChange and LargeChange for the HorizontalScrollBar and VerticalScrollBar they show up in the borders of the Control but they are useless. When clicked t
是否有任何方法可以使用每个.Net ScrollableControl附带的内置滚动条,而无需将AutoScroll属性设置为启用? 这是问题,即使我启用,设置为可见并声明最小值和最大值以及horizontalScrollBar和VerticalScrollBar的smallChange和LargeChange,它们显示在控件的边框中,但它们没有用处。 单击时,拇指不会移动,并且控件的滚动事件在单击滚动时(OldValue和NewValue均为0)不会带来任何有用的信息。这是我试图设置滚动条值的方
In the Full .NET framework you can use the Color.FromArgb() method to create a new color with alpha blending, like this: Color blended = Color.FromArgb(alpha, color); or Color blended = Color.FromArgb(alpha, red, green , blue); However in the Compact Framework (2.0 specifically), neither of those methods are available, you only get: Color.FromArgb(int red, int green, int blue); and Color.F
在Full .NET框架中,您可以使用Color.FromArgb()方法创建一个带有alpha混合的新颜色,如下所示: Color blended = Color.FromArgb(alpha, color); 要么 Color blended = Color.FromArgb(alpha, red, green , blue); 但是在Compact Framework(特别是2.0)中,这两种方法都不可用,只能得到: Color.FromArgb(int red, int green, int blue); 和 Color.FromArgb(int val); 第一个显然甚至不让你输入一个alpha值,但后者
I want to use the same functionality available when a Panel.AutoScroll is true, but with the scrollbars invisible. To do so I need to know how can I scroll to left/right up/down using functions in my code. 您应该可以使用组件的VerticalScroll和HorizontalScroll属性: c.HorizontalScroll.Value += 100; c.VerticalScroll.Value = c.VerticalScroll.Maximum; Well if you don't want to use the Autosc
我想在Panel.AutoScroll为true时使用相同的功能,但滚动条不可见。 为此,我需要知道如何使用代码中的函数向上/向下滚动左/右。 您应该可以使用组件的VerticalScroll和HorizontalScroll属性: c.HorizontalScroll.Value += 100; c.VerticalScroll.Value = c.VerticalScroll.Maximum; 那么如果你不想使用Autoscroll属性,那么很久以前我就使用过这种方法。 在面板内放置面板。 将滚动条控件放在父面板上,然后使用滚动条
I'm working on a windows mobile project using compact framework. One thing I have to do is log when users perform actions, this can mean any action from pressing a button to using the barcode scanner. The time it happened also needs to be logged. My plan is to override all controls to include logging functionality built into them but this might not be the right way to go about it, seems
我正在使用紧凑框架开发Windows Mobile项目。 我需要做的一件事就是记录用户执行操作的时间,这可能意味着从按下按钮到使用条形码扫描器的任何操作。 它发生的时间也需要记录。 我的计划是重写所有控件以包含内置的日志记录功能,但这可能不是正确的方式,似乎是一件非常乏味的事情。 有没有更好的办法? 我会和IL Weaving一起去的。 这里是我会推荐的一个库:http://www.sharpcrafters.com/aop.net/msil-injection它
I need to convert a byte array to my structure type. To do this I use the following code for desktop project application: var str = new SFHeader(); int size = Marshal.SizeOf(str); IntPtr ptr = Marshal.AllocHGlobal(size); Marshal.Copy(buffer, 0, ptr, size); str = (SFHeader)Marshal.PtrToStructure(ptr, typeof(SFHeader)); Marshal.FreeHGlobal(ptr); return str; Where SFHeader is my structure. Th
我需要将一个字节数组转换为我的结构类型。 为此,我为桌面项目应用程序使用以下代码: var str = new SFHeader(); int size = Marshal.SizeOf(str); IntPtr ptr = Marshal.AllocHGlobal(size); Marshal.Copy(buffer, 0, ptr, size); str = (SFHeader)Marshal.PtrToStructure(ptr, typeof(SFHeader)); Marshal.FreeHGlobal(ptr); return str; SFHeader是我的结构。 问题在于该行: str = (SFHeader)Marshal.PtrToStructur
i want to have a time stamp for logs on a Windows Mobile project . The accuracy must be in the range a hundred milliseconds at least. However my call to DateTime.Now returns a DateTime object with the Millisecond property set to zero. Also the Ticks property is rounded accordingly. How to get better time accuracy? Remember, that my code runs on on the Compact Framework, version 3.5. I us
我想为Windows Mobile项目上的日志记录时间戳 。 精度必须至少在百毫秒的范围内。 但是,我对DateTime.Now调用返回了一个将Millisecond属性设置为零的DateTime对象。 Ticks属性也相应地舍入。 如何获得更好的时间准确性? 请记住,我的代码在Compact Framework 3.5版上运行。 我使用HTC touch Pro 2设备。 基于MusiGenesis的回答,我创建了以下课程来解决这个问题: /// <summary> /// A more precisely implem
I have two projects in my solution, eg Project1 and Project2. Project1 targets .NET Framework 2.0, and Project2 targets .NET Framework 3.5. Project1 has no references to Project2, the purpose of Project2 is to use the .exe file it generates in post-build of Project1. However, when I try to run Project1.exe on a machine with .NET Framework 2.0 it says that it needs .NET 3.5 to run. Is is becau
我的解决方案中有两个项目,例如Project1和Project2。 Project1面向.NET Framework 2.0,而Project2面向.NET Framework 3.5。 Project1没有对Project2的引用,Project2的目的是使用它在生成Project1后生成的.exe文件。 但是,当我尝试在具有.NET Framework 2.0的计算机上运行Project1.exe时,它说它需要运行.NET 3.5。 是因为Project2与Project1处于相同的解决方案吗? 如果是这样,是否有解决这个问题的方法来改变Project2
This question already has an answer here: How to convert UTF-8 byte[] to string? 12 answers 取决于您希望使用的编码: var str = System.Text.Encoding.Default.GetString(result); 假设你正在使用UTF-8编码: string convert = "This is the string to be converted"; // From string to byte array byte[] buffer = System.Text.Encoding.UTF8.GetBytes(convert); // From byte array to string string s = System.
这个问题在这里已经有了答案: 如何将UTF-8字节[]转换为字符串? 12个答案 取决于您希望使用的编码: var str = System.Text.Encoding.Default.GetString(result); 假设你正在使用UTF-8编码: string convert = "This is the string to be converted"; // From string to byte array byte[] buffer = System.Text.Encoding.UTF8.GetBytes(convert); // From byte array to string string s = System.Text.Encoding.UTF8.Get
I have a Windows mobile .NET 3.5 compact framework application on a handheld device which connects to a SOAP Server requiring WS-Security in the message header. Since WSE doesn't work on compact framework, I managed to create a Custom Binding to communicate with the server and receive messages. In the Custom Binding Encoder (a MessageEncoder), I need to override some methods to read the r
在手持设备上有一个Windows Mobile .NET 3.5紧凑框架应用程序,该应用程序连接到消息头中需要WS-Security的SOAP服务器。 由于WSE不能在紧凑框架上工作,我设法创建了一个自定义绑定来与服务器通信并接收消息。 在自定义绑定编码器(一个MessageEncoder)中,我需要重写一些方法来读取收到的消息: public override Message ReadMessage(ArraySegment<byte> buffer, BufferManager bufferManager, string contentType)
I'm running some C# software on .NET Compact in WinCE, which is on a TITAN board in a handheld device. There have been reports of intermittent errors when .wav files are saved, that after multiple times recording the device sometimes fails to record, and will not do so again until the device has been restarted. I've replicated the error on a Dev kit, and through debugging have seen tha
我在WinCE上的.NET Compact上运行了一些C#软件,它位于手持设备中的TITAN板上。 有一些间歇性错误报告,当.wav文件被保存时,多次记录设备有时无法记录,并且在设备重新启动之前不会重新执行。 我已经在开发工具包上复制了错误,并且通过调试发现,在录制.wav文件时,正在使用waveInOpen和waveInClose方法(来自coredll.dll)。 但是,当问题发生时,waveInOpen正在返回MMSYSERROR.ALLOCATED,表示正在使用资源(误报)。