回答編集履歴
2
WindowsのAPI関数についてコードを追加
answer
CHANGED
@@ -13,4 +13,35 @@
|
|
13
13
|
'URLを指定して起動中のIE取得
|
14
14
|
(後略)
|
15
15
|
|
16
|
-
私は試しておりませんが、やってみる価値はあると思います。
|
16
|
+
私は試しておりませんが、やってみる価値はあると思います。
|
17
|
+
|
18
|
+
<追記>
|
19
|
+
WindowsのAPI関数を64bitと32bitのどちらでも呼び出しできる記述を
|
20
|
+
以下に示します。ただし、よく理解しないままにAPI関数を使うことは
|
21
|
+
お勧めしません。
|
22
|
+
```VBA
|
23
|
+
'API関数
|
24
|
+
#If VBA7 And Win64 Then
|
25
|
+
Private Declare PtrSafe Function FindWindowEx Lib "User32" Alias "FindWindowExA" ( _
|
26
|
+
ByVal hWndParent As LongPtr, _
|
27
|
+
ByVal hWndChildAfter As Long, _
|
28
|
+
ByVal lpszClass As String, _
|
29
|
+
ByVal lpszWindow As String) As LongPtr
|
30
|
+
Private Declare PtrSafe Function ShowWindow Lib "User32" ( _
|
31
|
+
ByVal hWnd As Long, _
|
32
|
+
ByVal nCmdShow As Long) As LongPtr
|
33
|
+
'FindWindowExの戻り値を入れる変数
|
34
|
+
Dim hNavBar As LongPtr
|
35
|
+
#Else
|
36
|
+
Private Declare Function FindWindowEx Lib "User32" Alias "FindWindowExA" ( _
|
37
|
+
ByVal hWndParent As Long, _
|
38
|
+
ByVal hWndChildAfter As Long, _
|
39
|
+
ByVal lpszClass As String, _
|
40
|
+
ByVal lpszWindow As String) As Long
|
41
|
+
Private Declare Function ShowWindow Lib "User32" ( _
|
42
|
+
ByVal hWnd As Long, _
|
43
|
+
ByVal nCmdShow As Long) As Long
|
44
|
+
'FindWindowExの戻り値を入れる変数
|
45
|
+
Dim hNavBar As Long
|
46
|
+
#End If
|
47
|
+
```
|
1
表現修正
answer
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
WindowsServer 2012R2 64bit
|
5
5
|
|
6
6
|
下記サイトが参考なると思いましたが、実行させるために
|
7
|
-
64bit
|
7
|
+
64bit用のAPI関数を準備する必要があります。
|
8
8
|
https://www.ka-net.org/blog/?p=7697
|
9
9
|
|
10
10
|
まずは、上記サイトにある、以下の関数を参考にして、
|