Now I have written Powershell scripts to automate the conversion from ANSI to UTF-8 See here
Erhy
Posts
-
how to restore old sources with Windows characters -
how to restore old sources with Windows charactersDo you know, how to detect old Windows coded text files? How Visual Studio detect them? Thank you for advice Erhy
-
how to restore old sources with Windows charactersThank You! I will try it after Chistmas. Erhy and I wish you Merry Christmas!
-
how to restore old sources with Windows charactersI need a tool which searches for sources and other text files and convert them to Unicode with BOM, and leave the modification time. I think, the new convention, where text files without BOM are processed as UTF-8 encoded will cause much work for million of peoples. Erhy
-
how to restore old sources with Windows charactersHello! I opened a old project and some source files with VS . If the files was written with Windows characters eg. "Windows: Western" an alert said that this file is now restored. But the characters with codes above x7f are marked as unknown characters. Do somebody know a tool to convert such files to Unicode without loss of the meaning of such characters? Thank you Erhy
-
who leaves there machine in sleep mode over night?all times until Windows want reboot fo update
-
bulk data should be in executableThanks, while developing I will make an extra DLL with data and in the final version I will include the byte array with data in the body of the exe project. Erhy
-
bulk data should be in executableis it possible without DLL ?
-
bulk data should be in executableI hoped for using pointers in unsafe mode of C#, but I failed. Now in a test project I have 250 C# files in the form
namespace WavDatSpace
{
unsafe public static partial class WavDats
{
public static byte[] WAVEA = {
0,0,220};
}
}and with VS the building of the project needs minutes, also when I change only one file. How to do it better? Erhy
-
bulk data should be in executableThank you for thinking about. I want to avoid streams, because with XAudio2 the usage of pointers is necessary. XAudio2 cannot used straight with C# .NET, rather such interfaces are necessary:
[SuppressUnmanagedCodeSecurity]
[DllImport(XAudioDll, CallingConvention = CallingConvention.StdCall)]
internal static extern int XAudio2Create(IntPtr ptr, int flags, XAudio2Processor flags0); -
bulk data should be in executablethe data are .wav files prepared for XAudio2. The longest file has 163 KB
-
bulk data should be in executablethe App is a speaking keyboard and when a key is pressed the sound should played immediately. So the wave data has to be available in memory. The App should start fast. The only reason to port from MFC to WPF is to have more beautiful dialog. Erhy
-
bulk data should be in executableHello, by rewriting a MFC App In .NET I want to declare huge bulk data, which should be placed in the exe. Because I see, with the resource techniques the access to data implemented with resource-techniques are only possible with streams, I want to prepare the data, e.g. by declaring long arrays. Have you a tip for me? Thank You Erhy
-
platform for an app for Ease of Access searchednow with .NET a hang with the resources I embedded more than 150 wave Files with the build action 'Embedded Resource' and want memory pointers to the data. With MFC a used LockResource to get a pointer - this is fast. I see, in .NET an access is only possible with Streams. I think this will take a while and need a big memory space. Have you an idea? Erhy
-
platform for an app for Ease of Access searchedThanks for your answer. Can you tell me more about P/Invoke I never heard above. Erhy
-
platform for an app for Ease of Access searchedI have written an app for Ease of Access on desktop which plays sound for typing on keyboard and releases the shift key automatically after a letter typed. I used MFC messages and SetWindowsHookEx(WH_KEYBOARD_LL, …) I’m not so happy with the ancient dialog elements and need advice to port the software to a modern GUI. Needed features, used in the software are: Handling of keyboard events and SendInput() to release shift-key automatically Hide the dialog and placed as tray icon Usage of the XAudio2 library Imbed sounds of .wav files in the resources of the App Regions for the shape of the dialog and oval buttons Now I use C++ and MFC Are the features mentioned practicable also for a WPF app written in C# or an other ? Thank you for tips Erhy
-
Is any one using MS Access?What software you use, to use MDB files, compatible with Access 97? For me it is not possible since Windows 8. Thank you for hints Erhy
-
WPF - Why was it formed?with ShowUI in PowerShell there is no need of XML a little tool with ShowUI in PowerShell :
Import-Module ShowUi
############################################################################
Hibernate_WPF_V2.ps1
start with Cmd-Batch example:
@echo off
cd /D C:\Users\Public\Documents\prog\Hibernate
start powershell -STA -WindowStyle Hidden -Command .\Hibernate_WPF_V2.ps1
############################################################################
function global:Hours_and_Mins ( [Int16]$MinsTill ) {
if ( -not ( $MinsTill -gt 0 -and $MinsTill -lt 1440 ) ) {
return "--:--"
}
do { #get certain time
$nowdue = Get-Date
$now = Get-Date
$nowminutes = $now.Minute
$nowhours = $now.Hour
} while ( ( $nowminutes -ne $nowdue.Minute ) -or ( $nowhours -ne $nowdue.Hour ) )$TimeAtTill = $now.AddMinutes( 0.5 + $MinsTill ) #a half minute in plus # Write-Host ("TimeAtTill: " + $TimeAtTill.ToString("HH:mm:ss")) $HoursAndMins = $TimeAtTill.ToString("HH:mm") return ( $HoursAndMins )
}
function global:MinutesTill ( [string]$AtTimStr, [ref]$TodayTomor ) {
$now = Get-Date try { \[DateTime\]$AtTim = Get-Date $AtTimStr } catch { \[DateTime\]$AtTim = $now.AddMonths( 12 ) } if ( ( \[int64\]$span = \[Math\]::round(( $AtTim - $now ).TotalMinutes )) -lt 0 ) { $span += 1440 $TodayTomor.value = "tomorrow" } else { $TodayTomor.value = "today" } return ( $span )
}
function global:BtnOKdekorate ( [object]$Btn, [string] $clicked ) {
if ( $clicked -eq "clicked" ) {
$Btn.Tag = $Btn.Name
$Btn.FontSize = 13.0
$Btn.Content = "count down"
$Btn.Foreground = "green"
} else {
$Btn.Tag = $clicked
$Btn.FontSize = 22.0
$Btn.Content = "OK"
$Btn.Foreground = "black"
}
}
#############################################################main
#############################################################
New-Window -Name MainWindow -Width 200 -Height 286 -title 'Minutes till hibernate' `
-ResizeMode CanMinimize -Background Pink -Top 0 -Left 0 {
New-StackPanel -Margin 7 -Background Pink {
New-TextBox -Text "minutes`ntill hibernate" -IsReadOnly $True `
-Background Pink -BorderThickness 0 -FontFamily Arial -FontSize 22.0 `
-HorizontalCont -
Clicky KeyboardsThank you for talking about keyboards. I would desire a keyboard driver which clicks through the loudspeakers, because sometimes a window popups at which the keyboard input is lost. The second, I asked often is the possibility to control the release interval of the SHIFT-key and CTRL-key. While my typing it occurs often that capital letters persist although my finger has released the SHIFT-key. Good luck Erhy