{"id":1057,"date":"2020-12-27T10:21:57","date_gmt":"2020-12-27T01:21:57","guid":{"rendered":"https:\/\/www.typea.info\/blog\/?p=1057"},"modified":"2020-12-28T11:53:31","modified_gmt":"2020-12-28T02:53:31","slug":"jra_van_datalab_jvlink_vs2019_cs","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2020\/12\/27\/jra_van_datalab_jvlink_vs2019_cs\/","title":{"rendered":"JRA-VAN Datalab JV-Link \u3092 Visual Studio2019 C#\u3067\u4f7f\u7528\u3059\u308b"},"content":{"rendered":"<p>\u00a0<\/p>\n<p><a href=\"https:\/\/www.amazon.co.jp\/DIY%E7%AB%B6%E9%A6%AC%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0-JRA%E2%80%90VAN-Data-Lab-%E7%B7%A8-%E7%AB%A0%E5%A4%AA%E9%83%8E\/dp\/4861670225\/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=jra+van&amp;qid=1609030515&amp;sr=8-1&amp;linkCode=li2&amp;tag=typea09-22&amp;linkId=35c4cd79d6d76a7cbe8d2a863831bd13&amp;language=ja_JP\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"\/\/ws-fe.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=4861670225&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=typea09-22&amp;language=ja_JP\" border=\"0\" \/><\/a><\/p>\n<p>\u00a0<\/p>\n<p><a href=\"https:\/\/jra-van.jp\/dlb\/sdv\/index.html\">https:\/\/jra-van.jp\/dlb\/sdv\/index.html<\/a><\/p>\n<p>JRA-VAN \u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u3088\u3046\u3068\u3057\u3066\u3001JV-Link\u3092\u521d\u671f\u5316\u3059\u308b\u307e\u3067\u306b\u3001\u7d50\u69cb\u30cf\u30de\u3063\u305f\u306e\u3067\u3001\u624b\u9806\u3092\u30e1\u30e2\u3002<\/p>\n<h2>1.Windows Forms C#\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210<\/h2>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/01.project.png\"><img loading=\"lazy\" decoding=\"async\" title=\"01.project.png\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/01.project.png\" alt=\"01 project\" width=\"460\" height=\"297\" border=\"0\" \/><\/a><\/p>\n<h2>2.JVLink Class\u306e\u53c2\u7167\u8ffd\u52a0<\/h2>\n<h3>2.1 \u30c4\u30fc\u30eb\u30dc\u30c3\u30af\u30b9\u30a2\u30a4\u30c6\u30e0\u306e\u9078\u629e<\/h3>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/02.add_toolbox.png\"><img loading=\"lazy\" decoding=\"async\" title=\"02.add_toolbox.png\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/02.add_toolbox.png\" alt=\"02 add toolbox\" width=\"318\" height=\"338\" border=\"0\" \/><\/a><\/p>\n<h3>2.2 JVLink Class\u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u3066OK<\/h3>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/03.add_toolbox_dialog.png\"><img loading=\"lazy\" decoding=\"async\" title=\"03.add_toolbox_dialog.png\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/03.add_toolbox_dialog.png\" alt=\"03 add toolbox dialog\" width=\"495\" height=\"362\" border=\"0\" \/><\/a><\/p>\n<p>\u624b\u9806\u66f8\u901a\u308a\u306a\u3089\u3001\u3053\u308c\u3067\u3001\u30c4\u30fc\u30eb\u30dc\u30c3\u30af\u30b9\u306bJVLink \u306e\u30a2\u30a4\u30b3\u30f3\u304c\u8868\u793a\u3055\u308c\u3001\u30d5\u30a9\u30fc\u30e0\u306b\u914d\u7f6e\u3059\u308b\u3053\u3068\u3067\u3001\u52d5\u304b\u305b\u308b\u306f\u305a\uff08VB.NET\u306e\u5834\u5408)\u306a\u306e\u3060\u304c\u3001C#\u3067\u306f\u3001\u30c4\u30fc\u30eb\u30dc\u30c3\u30af\u30b9\u306bJVLink\u306e\u30a2\u30a4\u30b3\u30f3\u8868\u793a\u3055\u308c\u305a(\u5168\u3066\u8868\u793a\u306b\u3059\u308b\u3068\u3001\u5229\u7528\u4e0d\u53ef\u72b6\u614b\u3067\u6de1\u8272\u8868\u793a\u3055\u308c\u308b\u304c\u3001\u30d5\u30a9\u30fc\u30e0\u30c7\u30b6\u30a4\u30ca\u306b\u30c9\u30ed\u30c3\u30d7\u3067\u304d\u306a\u3044\u72b6\u614b)\u306a\u306e\u3067\u3001SDK\u4ed8\u5c5e\u306eVB\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u3001\u52d5\u4f5c\u78ba\u8a8d\u3059\u308b\u3002<br \/>\u7d50\u679c\u3001C#\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u3082\u540c\u69d8\u306e\u5bfe\u5fdc\u3092\u3059\u308b<\/p>\n<p>\u00a0<\/p>\n<h2>3.VB2005\u7528\u306e\u30b5\u30f3\u30d7\u30eb\u3092VB2019\u3067\u52d5\u304b\u3059<\/h2>\n<p>\u30bf\u30fc\u30b2\u30c3\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u305f\u3081\u3001\u3001<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/04.err_target.png\"><img loading=\"lazy\" decoding=\"async\" title=\"04.err_target.png\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/04.err_target.png\" alt=\"04 err target\" width=\"512\" height=\"261\" border=\"0\" \/><\/a><\/p>\n<p>\u30c4\u30fc\u30eb\u3068\u6a5f\u80fd\u3092\u53d6\u5f97\u304b\u3089\u3001\u500b\u5225\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u9078\u629e\u3057\u3001<\/p>\n<p>\u00a0<br \/>\n<a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/05.insetall_target_fw.png\"><img loading=\"lazy\" decoding=\"async\" title=\"05.insetall_target_fw.png\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/05.insetall_target_fw.png\" alt=\"05 insetall target fw\" width=\"404\" height=\"303\" border=\"0\" \/><\/a><\/p>\n<p>.NET Framework 4.6.1 Targeting Pack \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/06.install_target_fw_dialog.png\"><img loading=\"lazy\" decoding=\"async\" title=\"06.install_target_fw_dialog.png\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/06.install_target_fw_dialog.png\" alt=\"06 install target fw dialog\" width=\"487\" height=\"260\" border=\"0\" \/><\/a><\/p>\n<p>\u3055\u3089\u306b\u3001\u69cb\u6210\u30d7\u30ed\u30d1\u30c6\u30a3\u304b\u3089\u3001\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u3001x86\u306b\u5909\u66f4\u3059\u308b<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/07.targetplatform.png\"><img loading=\"lazy\" decoding=\"async\" title=\"07.targetplatform.png\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/07.targetplatform.png\" alt=\"07 targetplatform\" width=\"599\" height=\"422\" border=\"0\" \/><\/a><\/p>\n<p>\u3053\u308c\u3067\u3001\u6dfb\u4ed8\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u52d5\u304f\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n<h2>4.\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u53c2\u7167\u8ffd\u52a0<\/h2>\n<p>JVLink\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u3001\u3069\u3046\u3084\u3089\u3001VB6\u3067\u4f5c\u6210\u3055\u308c\u305f\u3082\u306e\u3063\u307d\u3044\u3002\u6b63\u3057\u304f\u30d3\u30eb\u30c9\u3055\u308c\u308b\u3068\u3001.NET\u7528\u306e\u30e9\u30c3\u30d1\u30fc\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u751f\u6210\u3055\u308c\u308b\u3088\u3046\u306a\u306e\u3060\u304c\u3001\u4eca\u56de\u753b\u9762\u306bJVLink\u30aa\u30d6\u30b8\u30a7\u30a8\u30af\u30c8\u3092\u914d\u7f6e\u3067\u304d\u306a\u304f\u3001\u30d3\u30eb\u30c9\u304c\u3067\u304d\u306a\u3044\u306e\u3067\u3001\u304a\u305d\u3089\u304f\u30d3\u30eb\u30c9\u3059\u308b\u3068\u751f\u6210\u3055\u308c\u308b\u3067\u3042\u308d\u3046\u3001\u4ee5\u4e0b\u306e2\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u751f\u6210\u3055\u308c\u306a\u3044\u3002<\/p>\n<p>SDK\u306b\u6dfb\u4ed8\u3055\u308c\u3066\u3044\u308bVB2005\u306e\u30b5\u30f3\u30d7\u30eb\u4e2d\u306b\u8fd4\u9084\u5f8c\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u542b\u307e\u308c\u308b\u305f\u3081\u3001\u4eca\u56de\u306eC#\u7248\u3067\u3082\u3001\u305d\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u53c2\u7167\u3059\u308b\u3002<\/p>\n<p>\u307e\u305f\u3001\u30ed\u30fc\u30ab\u30eb\u306b\u30b3\u30d4\u30fc\u3092\u300c\u306f\u3044\u300d\u306b\u3057\u3066\u304a\u304f\u3002<\/p>\n<ul>\n<li>AxInterop.JVDTLabLib<\/li>\n<li>Interop.JVDTLabLib<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"08.assembly.png\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/08.assembly.png\" alt=\"08 assembly\" width=\"600\" height=\"594\" border=\"0\" \/><\/p>\n<h2>5.\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306e\u5b9f\u88c5<\/h2>\n<p>\u52d5\u4f5c\u78ba\u8a8d\u7528\u306b\u30dc\u30bf\u30f3\u3092\u4e00\u3064\u753b\u9762\u306b\u843d\u3068\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/09.form_design.png\"><img loading=\"lazy\" decoding=\"async\" title=\"09.form_design.png\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/09.form_design.png\" alt=\"09 form design\" width=\"599\" height=\"407\" border=\"0\" \/><\/a><\/p>\n<p>\u00a0<\/p>\n<p>\u30d5\u30a9\u30fc\u30e0\u306e\u30b3\u30fc\u30c9\u306b\u3001SDK\u306eVB\u30b5\u30f3\u30d7\u30eb\u306e\u30b3\u30fc\u30c9\u3092\u53c2\u7167\u3057\u3066\u3001JVLink\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u5185\u5bb9\u3092\u79fb\u690d\u3059\u308b\u3002<\/p>\n<p>\u672c\u6765\u3001\u753b\u9762\u306b\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u8cbc\u308a\u4ed8\u3051\u308b\u5f62\u3060\u3068\u3001InitializeComponent\u306e\u4e2d\u306b\u3001IDE\u304c\u81ea\u52d5\u751f\u6210\u3059\u308b\u306e\u3060\u308d\u3046\u304c\u3001\u305d\u3053\u306b\u66f8\u304f\u3068\u6d88\u3048\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u547c\u3073\u51fa\u3057\u524d\u306b\u540c\u3058\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u3002this.Contorols.Add\u306e\u884c\u304c\u306a\u3044\u3068\u3001OCX\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u6e96\u5099\u304c\u6574\u308f\u306a\u3044\u3046\u3061\u306b\u3001Form Loaded\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3088\u3046\u3067\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3001\u3057\u3070\u3089\u304f\u306f\u307e\u3063\u305f\u3002<\/p>\n<p>\u00a0<\/p>\n<pre>\u4f8b\u5916\u304c\u30b9\u30ed\u30fc\u3055\u308c\u307e\u3057\u305f: 'System.Windows.Forms.AxHost.InvalidActiveXStateException' (AxInterop.JVDTLabLib.dll \u306e\u4e2d)\n\u73fe\u6642\u70b9\u3067\u306f\u30e1\u30bd\u30c3\u30c9 'JVInit' \u3092\u547c\u3073\u51fa\u305b\u307e\u305b\u3093\u3002\n<\/pre>\n<p>\u00a0<\/p>\n<pre class=\"prettyprint\">using System;\nusing System.Diagnostics;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\nusing AxJVDTLabLib;\n\nnamespace JRA_VAN_PROTO\n{\n    public partial class Form1 : Form\n    {\n        private AxJVLink jVLink = new AxJVDTLabLib.AxJVLink();\n        private System.Resources.ResourceManager resources;\n\n        public Form1()\n        {\n            resources = new System.Resources.ResourceManager(this.GetType());\n            jVLink.Location = new System.Drawing.Point(0, 0);\n            jVLink.Name = \"jVLink\";\n            jVLink.OcxState = (System.Windows.Forms.AxHost.State)resources.GetObject($\"{jVLink.Name}.OcxState\");\n            jVLink.Size = new System.Drawing.Size(10, 10);\n            this.Controls.Add(jVLink);\n\n            InitializeComponent();\n        }\n\n        private void button1_Click(object sender, EventArgs e)\n        {\n            jVLink.JVSetUIProperties();\n        }\n\n        private void Form1_Load(object sender, EventArgs e)\n        {\n            try\n            {\n                var ret = jVLink.JVInit(\"UNKNOWN\");\n                Debug.WriteLine($\"RET={ret}\");\n            } \n            catch (Exception exception)\n            {\n                Debug.WriteLine(exception);\n            }\n        }\n    }\n}\n<\/pre>\n<p>\u00a0<\/p>\n<h2>6.\u5b9f\u884c<\/h2>\n<p>\u30ed\u30fc\u30c9\u3068\u521d\u671f\u5316\u3001\u30c0\u30a4\u30a2\u30ed\u30b0\u306e\u8868\u793a\u304c\u3067\u304d\u305f\u3002\u3081\u3067\u305f\u3057\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/10.run_jvlink.png\"><img loading=\"lazy\" decoding=\"async\" title=\"10.run_jvlink.png\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2020\/12\/10.run_jvlink.png\" alt=\"10 run jvlink\" width=\"599\" height=\"439\" border=\"0\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 https:\/\/jra-van.jp\/dlb\/sdv\/index.html JRA-VAN \u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u3088\u3046\u3068\u3057\u3066\u3001JV-Link\u3092\u521d\u671f\u5316\u3059\u308b\u307e\u3067\u306b\u3001\u7d50\u69cb\u30cf\u30de\u3063\u305f\u306e\u3067\u3001\u624b\u9806\u3092\u30e1\u30e2\u3002 1. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1059,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[140],"tags":[],"class_list":["post-1057","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jra-van"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1057","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1057"}],"version-history":[{"count":5,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1057\/revisions"}],"predecessor-version":[{"id":1386,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1057\/revisions\/1386"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media\/1059"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}