forked from dotnet/dotnet-api-docs
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathComputer.xml
More file actions
445 lines (387 loc) · 21.6 KB
/
Copy pathComputer.xml
File metadata and controls
445 lines (387 loc) · 21.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
<Type Name="Computer" FullName="Microsoft.VisualBasic.Devices.Computer">
<TypeSignature Language="C#" Value="public class Computer : Microsoft.VisualBasic.Devices.ServerComputer" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi Computer extends Microsoft.VisualBasic.Devices.ServerComputer" />
<TypeSignature Language="DocId" Value="T:Microsoft.VisualBasic.Devices.Computer" />
<TypeSignature Language="VB.NET" Value="Public Class Computer
Inherits ServerComputer" />
<TypeSignature Language="F#" Value="type Computer = class
 inherit ServerComputer" />
<TypeSignature Language="C++ CLI" Value="public ref class Computer : Microsoft::VisualBasic::Devices::ServerComputer" />
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Core</AssemblyName>
<AssemblyVersion>10.0.4.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Forms</AssemblyName>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Microsoft.VisualBasic.Devices.ServerComputer</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides properties for manipulating computer components such as audio, the clock, the keyboard, the file system, and so on.</summary>
<remarks>
<format type="text/markdown"><|
|Download a file|[How to: Download a File](/dotnet/visual-basic/developing-apps/programming/computer-resources/how-to-download-a-file)|
|Upload a file|[How to: Upload a File](/dotnet/visual-basic/developing-apps/programming/computer-resources/how-to-upload-a-file)|
|Create a registry key|[How to: Create a Registry Key and Set Its Value](/dotnet/visual-basic/developing-apps/programming/computer-resources/how-to-create-a-registry-key-and-set-its-value)|
|Access the Clipboard|[Storing Data to and Reading from the Clipboard](/dotnet/visual-basic/developing-apps/programming/computer-resources/storing-data-to-and-reading-from-the-clipboard)|
## Examples
This example uses the `My.Computer.Name` property to display the name of the computer on which the code runs.
:::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class1.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="T:Microsoft.VisualBasic.Devices.Audio" />
<altmember cref="T:Microsoft.VisualBasic.MyServices.ClipboardProxy" />
<altmember cref="T:Microsoft.VisualBasic.Devices.Clock" />
<altmember cref="T:Microsoft.VisualBasic.MyServices.FileSystemProxy" />
<altmember cref="T:Microsoft.VisualBasic.Devices.ComputerInfo" />
<altmember cref="T:Microsoft.VisualBasic.Devices.Keyboard" />
<altmember cref="T:Microsoft.VisualBasic.Devices.Mouse" />
<altmember cref="T:Microsoft.VisualBasic.Devices.Network" />
<altmember cref="T:Microsoft.VisualBasic.MyServices.RegistryProxy" />
<altmember cref="T:Microsoft.VisualBasic.Devices.ServerComputer" />
<related type="Article" href="/dotnet/visual-basic/language-reference/objects/">Objects (Visual Basic)</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Computer ();" />
<MemberSignature Language="ILAsm" Value=".method public specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.VisualBasic.Devices.Computer.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 Computer();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Core</AssemblyName>
<AssemblyVersion>10.0.4.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Forms</AssemblyName>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:Microsoft.VisualBasic.Devices.Computer" /> class.</summary>
<remarks>
<format type="text/markdown"><
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Audio">
<MemberSignature Language="C#" Value="public Microsoft.VisualBasic.Devices.Audio Audio { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.VisualBasic.Devices.Audio Audio" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.Devices.Computer.Audio" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Audio As Audio" />
<MemberSignature Language="F#" Value="member this.Audio : Microsoft.VisualBasic.Devices.Audio" Usage="Microsoft.VisualBasic.Devices.Computer.Audio" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::VisualBasic::Devices::Audio ^ Audio { Microsoft::VisualBasic::Devices::Audio ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Core</AssemblyName>
<AssemblyVersion>10.0.4.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Forms</AssemblyName>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.VisualBasic.Devices.Audio</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an object that provides properties for methods for playing sounds.</summary>
<value>The <see langword="My.Computer.Audio" /> object for the computer.</value>
<remarks>
<format type="text/markdown"><.
]]></format>
</remarks>
<altmember cref="T:Microsoft.VisualBasic.Devices.Audio" />
<related type="Article" href="/dotnet/visual-basic/language-reference/objects/">Objects (Visual Basic)</related>
</Docs>
</Member>
<Member MemberName="Clipboard">
<MemberSignature Language="C#" Value="public Microsoft.VisualBasic.MyServices.ClipboardProxy Clipboard { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.VisualBasic.MyServices.ClipboardProxy Clipboard" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.Devices.Computer.Clipboard" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Clipboard As ClipboardProxy" />
<MemberSignature Language="F#" Value="member this.Clipboard : Microsoft.VisualBasic.MyServices.ClipboardProxy" Usage="Microsoft.VisualBasic.Devices.Computer.Clipboard" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::VisualBasic::MyServices::ClipboardProxy ^ Clipboard { Microsoft::VisualBasic::MyServices::ClipboardProxy ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Core</AssemblyName>
<AssemblyVersion>10.0.4.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Forms</AssemblyName>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.VisualBasic.MyServices.ClipboardProxy</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an object that provides methods for manipulating the Clipboard.</summary>
<value>The <see langword="My.Computer.Clipboard" /> object for the computer.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property provides easy access to the <xref:Microsoft.VisualBasic.MyServices.ClipboardProxy> object.
This property is available only for non-server applications.
## Availability by Project Type
|Project type|Available|
|------------------|---------------|
|Windows Forms Application|**Yes**|
|Class Library|**Yes**|
|Console Application|**Yes**|
|Windows Forms Control Library|**Yes**|
|Web Control Library|No|
|Windows Service|**Yes**|
|Web Site|No|
## Examples
This example reads text from the Clipboard into the string `textOnClipboard`.
:::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Computer/Clipboard/Class1.vb" id="Snippet6":::
This example fails if there is no text on the Clipboard.
]]></format>
</remarks>
<altmember cref="T:Microsoft.VisualBasic.MyServices.ClipboardProxy" />
<related type="Article" href="/dotnet/visual-basic/language-reference/objects/">Objects (Visual Basic)</related>
<related type="Article" href="/dotnet/visual-basic/developing-apps/programming/computer-resources/storing-data-to-and-reading-from-the-clipboard">Storing Data to and Reading From the Clipboard</related>
</Docs>
</Member>
<Member MemberName="Keyboard">
<MemberSignature Language="C#" Value="public Microsoft.VisualBasic.Devices.Keyboard Keyboard { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.VisualBasic.Devices.Keyboard Keyboard" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.Devices.Computer.Keyboard" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Keyboard As Keyboard" />
<MemberSignature Language="F#" Value="member this.Keyboard : Microsoft.VisualBasic.Devices.Keyboard" Usage="Microsoft.VisualBasic.Devices.Computer.Keyboard" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::VisualBasic::Devices::Keyboard ^ Keyboard { Microsoft::VisualBasic::Devices::Keyboard ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Core</AssemblyName>
<AssemblyVersion>10.0.4.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Forms</AssemblyName>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.VisualBasic.Devices.Keyboard</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an object that provides properties for accessing the current state of the keyboard, such as what keys are currently pressed, and provides a method to send keystrokes to the active window.</summary>
<value>The <see langword="My.Computer.Keyboard" /> object for the computer.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property provides easy access to the `My.Computer.Keyboard` object. For more information, see <xref:Microsoft.VisualBasic.Devices.Keyboard> object.
## Availability by Project Type
|Project type|Available|
|------------------|---------------|
|Windows Forms Application|**Yes**|
|Class Library|**Yes**|
|Console Application|**Yes**|
|Windows Forms Control Library|**Yes**|
|Web Control Library|No|
|Windows Service|**Yes**|
|Web Site|No|
## Examples
This example uses the `My.Computer.Keyboard.CtrlKeyDown` property to determine if the computer's CTRL key is currently pressed.
:::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class2.vb" id="Snippet36":::
]]></format>
</remarks>
<altmember cref="T:Microsoft.VisualBasic.Devices.Keyboard" />
<related type="Article" href="/dotnet/visual-basic/language-reference/objects/">Objects (Visual Basic)</related>
</Docs>
</Member>
<Member MemberName="Mouse">
<MemberSignature Language="C#" Value="public Microsoft.VisualBasic.Devices.Mouse Mouse { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.VisualBasic.Devices.Mouse Mouse" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.Devices.Computer.Mouse" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Mouse As Mouse" />
<MemberSignature Language="F#" Value="member this.Mouse : Microsoft.VisualBasic.Devices.Mouse" Usage="Microsoft.VisualBasic.Devices.Computer.Mouse" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::VisualBasic::Devices::Mouse ^ Mouse { Microsoft::VisualBasic::Devices::Mouse ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Core</AssemblyName>
<AssemblyVersion>10.0.4.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Forms</AssemblyName>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.VisualBasic.Devices.Mouse</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an object that provides properties for getting information about the format and configuration of the mouse installed on the local computer.</summary>
<value>The <see langword="My.Computer.Mouse" /> object for the computer.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property provides easy access to the `My.Computer.Mouse` object. For more information, see <xref:Microsoft.VisualBasic.Devices.Mouse> object.
This property is available only for non-server applications.
## Availability by Project Type
|Project type|Available|
|------------------|---------------|
|Windows Forms Application|**Yes**|
|Class Library|**Yes**|
|Console Application|**Yes**|
|Windows Forms Control Library|**Yes**|
|Web Control Library|No|
|Windows Service|**Yes**|
|Web Site|No|
## Examples
This example uses the `My.Computer.Mouse.WheelExists` and `My.Computer.Mouse.WheelScrollLines` properties to determine if the mouse has a scroll wheel and how much to scroll when it rotates.
:::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class2.vb" id="Snippet26":::
]]></format>
</remarks>
<altmember cref="T:Microsoft.VisualBasic.Devices.Mouse" />
<related type="Article" href="/dotnet/visual-basic/language-reference/objects/">Objects (Visual Basic)</related>
</Docs>
</Member>
<Member MemberName="Screen">
<MemberSignature Language="C#" Value="public System.Windows.Forms.Screen Screen { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Forms.Screen Screen" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.Devices.Computer.Screen" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Screen As Screen" />
<MemberSignature Language="F#" Value="member this.Screen : System.Windows.Forms.Screen" Usage="Microsoft.VisualBasic.Devices.Computer.Screen" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Windows::Forms::Screen ^ Screen { System::Windows::Forms::Screen ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic.Forms</AssemblyName>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.Screen</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.Windows.Forms.Screen" /> object that represents the computer's primary display screen.</summary>
<value>A <see cref="T:System.Windows.Forms.Screen" /> object that represents the computer's primary screen.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `My.Computer.Screen` property provides functionality similar to the <xref:System.Windows.Forms.Screen.PrimaryScreen> property.
## Availability by Project Type
|Project type|Available|
|------------------|---------------|
|Windows Forms Application|**Yes**|
|Class Library|**Yes**|
|Console Application|**Yes**|
|Windows Forms Control Library|**Yes**|
|Web Control Library|No|
|Windows Service|**Yes**|
|Web Site|No|
## Examples
This example uses the <xref:System.Windows.Forms.Screen.WorkingArea> property of the `My.Computer.Screen` property to determine the working area of the computer's primary display, and then resizes the form to fill the working area.
:::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class1.vb" id="Snippet10":::
This example needs to run in a Windows Forms application.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.Screen" />
<altmember cref="P:System.Windows.Forms.Screen.PrimaryScreen" />
<related type="Article" href="/dotnet/visual-basic/language-reference/objects/">Objects (Visual Basic)</related>
</Docs>
</Member>
</Members>
</Type>