mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 13:05:38 +02:00
fix failure to restore full screen rdp window
This commit is contained in:
parent
cee860c2d4
commit
6cbfea8f69
2 changed files with 65 additions and 29 deletions
|
@ -1,7 +1,10 @@
|
|||
using System;
|
||||
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
using PersistentWindows.Common.WinApiBridge;
|
||||
using PersistentWindows.Common.Diagnostics;
|
||||
|
||||
namespace PersistentWindows.Common.Models
|
||||
{
|
||||
|
@ -55,7 +58,15 @@ namespace PersistentWindows.Common.Models
|
|||
public override string ToString()
|
||||
{
|
||||
//return string.Format("{0}.{1} {2}", ProcessId, HWnd.ToString("X8"), ProcessName);
|
||||
return string.Format("{0}.{1:x8} {2}", ProcessId, HWnd.ToInt64(), ProcessName);
|
||||
//return string.Format("process:{0:x4} hwnd:{1:x6} {2}", ProcessId, HWnd.ToInt64(), ProcessName);
|
||||
DataContractSerializer dcs = new DataContractSerializer(typeof(ApplicationDisplayMetrics));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
using (XmlWriter xw = XmlWriter.Create(sb))
|
||||
{
|
||||
dcs.WriteObject(xw, this);
|
||||
}
|
||||
string xml = sb.ToString();
|
||||
return xml;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue