技術メモ

Privacy Policy

Privacy Policy

This privacy policy applies to the LED News, Telescope, after birth day, Japanest Stamps, and 横浜線 行き先表示 app (hereby referred to as “Application”) for mobile devices that was created by Juraku Software (hereby referred to as “Service Provider”) as a Free service. This service is intended for use “AS IS”.

What information does the Application obtain and how is it used?

The Application does not obtain any information when you download and use it. Registration is not required to use the Application.

Does the Application collect precise real time location information of the device?

This Application does not collect precise information about the location of your mobile device.

Do third parties see and/or have access to information obtained by the Application?

Since the Application does not collect any information, no data is shared with third parties.

What are my opt-out rights?

You can stop all collection of information by the Application easily by uninstalling it. You may use the standard uninstall processes as may be available as part of your mobile device or via the mobile application marketplace or network.

Children

The Application is not used to knowingly solicit data from or market to children under the age of 13.

The Service Provider does not knowingly collect personally identifiable information from children. The Service Provider encourages all children to never submit any personally identifiable information through the Application and/or Services. The Service Provider encourage parents and legal guardians to monitor their children’s Internet usage and to help enforce this Policy by instructing their children never to provide personally identifiable information through the Application and/or Services without their permission. If you have reason to believe that a child has provided personally identifiable information to the Service Provider through the Application and/or Services, please contact the Service Provider (info@juraku-software.net) so that they will be able to take the necessary actions. You must also be at least 16 years of age to consent to the processing of your personally identifiable information in your country (in some countries we may allow your parent or guardian to do so on your behalf).

Security

The Service Provider is concerned about safeguarding the confidentiality of your information. However, since the Application does not collect any information, there is no risk of your data being accessed by unauthorized individuals.

Changes

This Privacy Policy may be updated from time to time for any reason. The Service Provider will notify you of any changes to their Privacy Policy by updating this page with the new Privacy Policy. You are advised to consult this Privacy Policy regularly for any changes, as continued use is deemed approval of all changes.

This privacy policy is effective as of 2024-04-07

Your Consent

By using the Application, you are consenting to the processing of your information as set forth in this Privacy Policy now and as amended by the Service Provider.

Contact Us

If you have any questions regarding privacy while using the Application, or have questions about the practices, please contact the Service Provider via email at info@juraku-software.net.


【C# WebView2】PDFを表示した際の上部のメニューアイコンを一部非表示にする

Microsoft.Web.WebView2.WinForms.WebView2の以下の赤枠部分を非表示にする。

次のコードのように、非表示にしたいアイコンを複数指定可能。

webView.CoreWebView2.Settings.HiddenPdfToolbarItems =
Microsoft.Web.WebView2.Core.CoreWebView2PdfToolbarItems.ZoomOut /*縮小*/ |
Microsoft.Web.WebView2.Core.CoreWebView2PdfToolbarItems.ZoomIn /*拡大*/ |
Microsoft.Web.WebView2.Core.CoreWebView2PdfToolbarItems.FitPage /*幅に合わせる*/ |
Microsoft.Web.WebView2.Core.CoreWebView2PdfToolbarItems.Rotate /*回転*/ |
Microsoft.Web.WebView2.Core.CoreWebView2PdfToolbarItems.PageLayout /*ページ表示*/ |
Microsoft.Web.WebView2.Core.CoreWebView2PdfToolbarItems.Search /*検索*/ |
Microsoft.Web.WebView2.Core.CoreWebView2PdfToolbarItems.Save /*上書き保存*/ |
Microsoft.Web.WebView2.Core.CoreWebView2PdfToolbarItems.FullScreen /*PDF全画面表示を入力する*/ |
Microsoft.Web.WebView2.Core.CoreWebView2PdfToolbarItems.MoreSettings/*設定など*/;

【Windows10】ペイントが「新しいドキュメントを作成できません。」と表示され起動できなくなった

2023/12/14時点で、Windows10のペイントを起動すると「新しいドキュメントを作成できません。」というメッセージが表示され、起動できない。


恐らくWindowsUpdateが実行されたことにより壊れた?と思われる。

ショートカットは、「C:\Windows\System32\mspaint.exe」を実行するが、こちらではなく「C:\Windows\SysWOW64\mspaint.exe」の方だと起動できた!

【Subversion,SVN】バージョンを調べる

コマンドプロンプトで、以下のように入力する。
(バージョンの前のハイフンは2つ付けること!)

svn --version

実行すると以下のような結果が返ってくる。
svn, version 1.12.0 (r1857323)
 compiled Apr 26 2019, 02:13:45 on x86_64-microsoft-windows6.2.9200

【ノートパソコン】電源は入るが画面に何も表示されない(ボタン電池の交換で解決)

現象

普段利用していなかったノートパソコンを起動するために電源を入れると、電源ボタンが光るが、画面が真っ黒のまま。ハードディスクなどのアクセスランプもつかず、ロゴなども一切表示されない。

対応

ノートパソコンの中にあるボタン電池(CR2023)を新品に交換してみたところ、無事起動した!
画面が壊れたのかと思ったが、まさか電池が切れていただけとは・・・。分かりにくい。
壊れた?と思ったら試してみると良いかも。
但し、電池交換はノートパソコンを分解しなければならなかったためとても手間だった(富士通のLIFEBOOK AH42/J)

【マウスコンピューター】Yahoo!などに接続できなくなる

現象

mouse K5のノートパソコン(Windows 10)でYahoo!を閲覧中、別ページをクリックしたところ読込に失敗するようになった。
ルーターを再起動したが、閲覧できないまま。
但し、GmailやOutlookなどは閲覧できた。

コマンドプロンプトから「ipconfig -all」を実行し、「Wireless LAN adapter Wi-Fi:」を確認したところ、DHCPで割り振られるアドレスが通常と異なる(こちらの環境だと、普通は192.168.10.xxxだが、168?から始まるものに変わっていた。正確なアドレスは失念・・・)ものになっていた。Windowsを再起動しても戻らない。

対処

デバイスマネージャから「Intel(R) Wi-Fi 6 AX201 160MHz」(Wireless LAN adapter Wi-Fiの説明に記載されていたもの)を右クリックし、「デバイスのアンインストール」をクリックする。
確認画面が表示されるので、「このデバイスのドライバー ソフトウェアを削除します。」にチェックを入れないで、「アンインストール」をクリックする。
アンインストール完了後、そのままWindowsを再起動し、ルーターのパスワードを再入力したら直った!(192.168系のIPアドレスが割り振られるようになった)。

ドライバーの問題かな?

【C#,VB.NET】.NET Framework 4.8から.NET6へコンバートする(try-convertを利用する)。その他コンバート後の注意点まとめ

try-convertというツールを利用して、以下の手順でコンバートする(Visual Studio 2022で作成した.NET Frramework4.8のWindowsフォームの前提)。

コンバート手順

※実行する前に全ファイルを別フォルダなどにコピーしてバックアップしておくこと!
 コンバートは自動でバックアップしてくれず、そのままプロジェクトが書き換えられるので注意!

    1. Windowsのスタートメニューから、Visual Studio2022(のフォルダの方)→x64 Native Tools Command Prompt for VS 2022をダブルクリックして起動
    2. 「dotnet tool install -g try-convert」を実行し、try-convertをインストールする。
      既にインストール済みの場合、「dotnet tool update -g try-convert」を実行し、try-convertを最新版にアップデートする(この記事を作成した際に利用したバージョンは、0.9.232202)
    3. 「cd c:\~(.slnファイルが保存されているパス)」で、.slnファイルが保存されているパスまで移動
    4. 「try-convert」を実行する
    5. しばらく待ち、「Conversion complete!」と表示されればコンバート完了!
    6. .slnファイルをダブルクリックし、Visual Studioを起動する
    7. ビルドを試すと、次のエラーが表示される。
      「エラー NETSDK1136 Windows フォームまたは WPF を使用しているとき、またはそのようなプロジェクトまたはパッケージを参照しているときには、ターゲット プラットフォームを Windows に設定する必要があります (通常は TargetFramework プロパティに ‘-windows’ を含めることによる)。」
    8. ソリューションエクスプローラーからプロジェクト名を右クリックし、プロパティをクリック。表示された画面の「アプリケーション」のターゲットOSが「(なし)」になっているので「Windows」を指定する。
      ターゲットフレームワークが「.NET 7.0」になっているので「.NET 6.0」を指定し、再度ビルドする。

これで、とりあえず.NET6としてコンバートが完了した。

以下の旧プロジェクトファイルが残るので、これらは削除してOK
「XXX.csproj.old(C#の場合)」「XXX.vbproj.old(VB.NETの場合)」

以下に、コンバート後に手修正した問題点を随時追記していく。

警告つぶし

「警告 CA1416 この呼び出しサイトはすべてのプラットフォームで到達可能です。’Font’ は ‘windows’ でのみサポートされています。」というような「CA1416」の警告が出た場合は、とりあえず以下のように警告をつぶすことができる。

C#

#pragma warning disable CA1416
    LabelText.Font = new System.Drawing.Font("Meiryo UI", 21.75F);
#pragma warning restore CA1416

VB.NET

#Disable Warning CA1416
    LabelText.Font = New System.Drawing.Font("Meiryo UI", 21.75F)
#Enable Warning CA1416 

上記のように#から始まるディレクティブを使って、警告がでないようにする。

フォームのデザインがおかしくなる

フォーム自体のフォントが「Yu Gothic UI, 9pt」になるので、これを「MS UI Gothic, 9pt」に変更すれば元のデザインのままになった。

Process.Startが実行時エラーになってしまう

.NET Framework4.8のときは、以下を実行すると既定のブラウザで指定したURLのページが表示されていた

System.Diagnostics.Process.Start("https://juraku-software.net");

しかし、.NET6だとこれを実行すると「System.ComponentModel.Win32Exception: ‘An error occurred trying to start process ‘https://juraku-software.net’ with working directory ‘C:\~\bin\Debug\net6.0-windows’. 指定されたファイルが見つかりません。’」というエラーになってしまう。

そのため、.NET 6では以下のように修正する。

C#

    var processStartInfo = new ProcessStartInfo
    {
        UseShellExecute = true,
        FileName = "https://juraku-software.net"
    };

    System.Diagnostics.Process.Start(processStartInfo);

VB.NET

    Dim processStartInfo As New ProcessStartInfo With {
        .UseShellExecute = True,
        .FileName = "https://juraku-software.net"
    }
    System.Diagnostics.Process.Start(processStartInfo)

こういう実行時エラーが一番怖い・・・挙動を変えないで欲しかった・・・

【C#】フォーム上の全てのLabelの文字色を変更するにはControlsをOfType

フォーム自身(this)のControlsの中から、OfTypeを利用してLabelのみを抜き出せばOK

foreach (Label label in this.Controls.OfType<Label>())
{
    label.ForeColor = Color.Red;
}

また、例えば対象のラベル名がlabel1~label5である場合、以下のように名前でFindすることもできる。

for (int i = 1; i <= 5; i++)
{
    Control label = this.Controls.Find("label" + i, true).FirstOrDefault();
    if (label is Label)
    {
        label.ForeColor = Color.Red;
    }
}