WPF finishing articles WPF uses ActiveX

Original: WPF finishing articles WPF uses ActiveX

WPF remote desktop functionality

First, developers using the command prompt

Enter their project files in the root directory

Enter aximp C: \ windows \ System32 \ mstscax.dll generate both a DLL

 

Increase the reference DLL to your project

 

Increased Forms DLL

XAML

Increase namespace xmlns: ax = "clr-namespace: AxMSTSCLib; assembly = AxMSTSCLib"


  
  
  1. <Grid>
  2. <WindowsFormsHost >
  3. <ax:AxMsTscAxNotSafeForScripting x:Name= "axm" Width= "1000" Height= "1000" />
  4. </WindowsFormsHost>
  5. </Grid>

Backstage


  
  
  1. axm.Server = "IP地址";
  2. axm.Connect();

effect

Guess you like

Origin www.cnblogs.com/lonelyxmas/p/12075803.html