From 011d2d25ee6739addf8a201dec618c871aff7f82 Mon Sep 17 00:00:00 2001 From: ulf Date: Sun, 8 Sep 2013 14:39:48 +0200 Subject: [PATCH] v 1.12 --- Preview.cs | 58 ++++++++++------- PreviewHandler.Designer.cs | 125 ++++++++++++++++++++++++------------- PreviewHandler.cs | 59 ++++++++++++----- Win32api.cs | 2 +- preview toy.csproj | 2 +- preview toy.v11.suo | Bin 100352 -> 97792 bytes 6 files changed, 165 insertions(+), 81 deletions(-) diff --git a/Preview.cs b/Preview.cs index d5b93da..4e43fc6 100644 --- a/Preview.cs +++ b/Preview.cs @@ -23,6 +23,7 @@ namespace PreviewToy public IntPtr sourceWindow; private DwmApi.DWM_THUMBNAIL_PROPERTIES m_ThumbnailProperties; private bool has_been_set_up = false; + private bool thumbnail_has_been_set_up = false; private PreviewToyHandler spawner; private bool hide = false; @@ -52,7 +53,6 @@ namespace PreviewToy this.spawner = spawner; InitializeComponent(); - SetUp(); this.Text = title; @@ -186,20 +186,32 @@ namespace PreviewToy { if (has_been_set_up) { - m_ThumbnailProperties.rcDestination = new DwmApi.RECT(0, 0, ClientRectangle.Right, ClientRectangle.Bottom); - DwmApi.DwmUpdateThumbnailProperties(m_hThumbnail, m_ThumbnailProperties); + if (DwmApi.DwmIsCompositionEnabled()) + { + if (thumbnail_has_been_set_up == false) + { + this.SetUpThumbnail(); + } + m_ThumbnailProperties.rcDestination = new DwmApi.RECT(0, 0, ClientRectangle.Right, ClientRectangle.Bottom); + DwmApi.DwmUpdateThumbnailProperties(m_hThumbnail, m_ThumbnailProperties); + } + else + { + thumbnail_has_been_set_up = false; + } Size overlay_size = this.render_area.Size; - overlay_size.Width -= 2*5; - overlay_size.Height -= 2*5; + overlay_size.Width -= 2 * 5; + overlay_size.Height -= 2 * 5; Point overlay_location = this.Location; - overlay_location.X += 5 + (this.Size.Width - this.render_area.Size.Width)/2; - overlay_location.Y += 5 + (this.Size.Height - this.render_area.Size.Height) - (this.Size.Width - this.render_area.Size.Width)/2; + overlay_location.X += 5 + (this.Size.Width - this.render_area.Size.Width) / 2; + overlay_location.Y += 5 + (this.Size.Height - this.render_area.Size.Height) - (this.Size.Width - this.render_area.Size.Width) / 2; this.overlay.Size = overlay_size; this.overlay.Location = overlay_location; this.overlay.TopMost = this.TopMost; + } } @@ -226,22 +238,26 @@ namespace PreviewToy this.overlay.Hide(); } - public void SetUp() + private void SetUpThumbnail() { - m_hThumbnail = DwmApi.DwmRegisterThumbnail(this.Handle, sourceWindow); + if (DwmApi.DwmIsCompositionEnabled() && !thumbnail_has_been_set_up) + { + m_hThumbnail = DwmApi.DwmRegisterThumbnail(this.Handle, sourceWindow); - m_ThumbnailProperties = new DwmApi.DWM_THUMBNAIL_PROPERTIES(); - m_ThumbnailProperties.dwFlags = DwmApi.DWM_THUMBNAIL_PROPERTIES.DWM_TNP_VISIBLE - + DwmApi.DWM_THUMBNAIL_PROPERTIES.DWM_TNP_OPACITY - + DwmApi.DWM_THUMBNAIL_PROPERTIES.DWM_TNP_RECTDESTINATION - + DwmApi.DWM_THUMBNAIL_PROPERTIES.DWM_TNP_SOURCECLIENTAREAONLY; - m_ThumbnailProperties.opacity = 255; - m_ThumbnailProperties.fVisible = true; - m_ThumbnailProperties.fSourceClientAreaOnly = true; - m_ThumbnailProperties.rcDestination = new DwmApi.RECT(0, 0, ClientRectangle.Right, ClientRectangle.Bottom); - - DwmApi.DwmUpdateThumbnailProperties(m_hThumbnail, m_ThumbnailProperties); - + m_ThumbnailProperties = new DwmApi.DWM_THUMBNAIL_PROPERTIES(); + m_ThumbnailProperties.dwFlags = DwmApi.DWM_THUMBNAIL_PROPERTIES.DWM_TNP_VISIBLE + + DwmApi.DWM_THUMBNAIL_PROPERTIES.DWM_TNP_OPACITY + + DwmApi.DWM_THUMBNAIL_PROPERTIES.DWM_TNP_RECTDESTINATION + + DwmApi.DWM_THUMBNAIL_PROPERTIES.DWM_TNP_SOURCECLIENTAREAONLY; + m_ThumbnailProperties.opacity = 255; + m_ThumbnailProperties.fVisible = true; + m_ThumbnailProperties.fSourceClientAreaOnly = true; + m_ThumbnailProperties.rcDestination = new DwmApi.RECT(0, 0, ClientRectangle.Right, ClientRectangle.Bottom); + + DwmApi.DwmUpdateThumbnailProperties(m_hThumbnail, m_ThumbnailProperties); + + thumbnail_has_been_set_up = true; + } } private void Preview_Load(object sender, EventArgs e) diff --git a/PreviewHandler.Designer.cs b/PreviewHandler.Designer.cs index cb0ae19..08da05b 100644 --- a/PreviewHandler.Designer.cs +++ b/PreviewHandler.Designer.cs @@ -63,16 +63,21 @@ namespace PreviewToy this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.panel1 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel(); - this.label3 = new System.Windows.Forms.Label(); + this.zoom_anchor_lable = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.panel3 = new System.Windows.Forms.Panel(); + this.panel5 = new System.Windows.Forms.Panel(); this.previews_check_listbox = new System.Windows.Forms.CheckedListBox(); this.label1 = new System.Windows.Forms.Label(); + this.panel4 = new System.Windows.Forms.Panel(); + this.aero_status_label = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.previewToyMainBindingSource)).BeginInit(); this.flowLayoutPanel1.SuspendLayout(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.panel3.SuspendLayout(); + this.panel5.SuspendLayout(); + this.panel4.SuspendLayout(); this.SuspendLayout(); // // option_hide_active @@ -82,9 +87,9 @@ namespace PreviewToy this.option_hide_active.CheckState = System.Windows.Forms.CheckState.Checked; this.option_hide_active.Location = new System.Drawing.Point(3, 3); this.option_hide_active.Name = "option_hide_active"; - this.option_hide_active.Size = new System.Drawing.Size(81, 17); + this.option_hide_active.Size = new System.Drawing.Size(184, 17); this.option_hide_active.TabIndex = 1; - this.option_hide_active.Text = "Hide Active"; + this.option_hide_active.Text = "Hide preview of active EVE client"; this.option_hide_active.UseVisualStyleBackColor = true; this.option_hide_active.CheckedChanged += new System.EventHandler(this.option_hide_active_CheckedChanged); // @@ -93,11 +98,11 @@ namespace PreviewToy this.option_hide_all_if_not_right_type.AutoSize = true; this.option_hide_all_if_not_right_type.Checked = true; this.option_hide_all_if_not_right_type.CheckState = System.Windows.Forms.CheckState.Checked; - this.option_hide_all_if_not_right_type.Location = new System.Drawing.Point(3, 26); + this.option_hide_all_if_not_right_type.Location = new System.Drawing.Point(3, 49); this.option_hide_all_if_not_right_type.Name = "option_hide_all_if_not_right_type"; - this.option_hide_all_if_not_right_type.Size = new System.Drawing.Size(210, 17); + this.option_hide_all_if_not_right_type.Size = new System.Drawing.Size(242, 17); this.option_hide_all_if_not_right_type.TabIndex = 2; - this.option_hide_all_if_not_right_type.Text = "Hide all if active window not EVE client"; + this.option_hide_all_if_not_right_type.Text = "Hide previews if active window not EVE client"; this.option_hide_all_if_not_right_type.UseVisualStyleBackColor = true; this.option_hide_all_if_not_right_type.CheckedChanged += new System.EventHandler(this.option_hide_all_if_noneve_CheckedChanged); // @@ -106,11 +111,11 @@ namespace PreviewToy this.option_unique_layout.AutoSize = true; this.option_unique_layout.Checked = true; this.option_unique_layout.CheckState = System.Windows.Forms.CheckState.Checked; - this.option_unique_layout.Location = new System.Drawing.Point(3, 49); + this.option_unique_layout.Location = new System.Drawing.Point(3, 72); this.option_unique_layout.Name = "option_unique_layout"; - this.option_unique_layout.Size = new System.Drawing.Size(161, 17); + this.option_unique_layout.Size = new System.Drawing.Size(185, 17); this.option_unique_layout.TabIndex = 3; - this.option_unique_layout.Text = "Unique layout for each client"; + this.option_unique_layout.Text = "Unique layout for each EVE client"; this.option_unique_layout.UseVisualStyleBackColor = true; this.option_unique_layout.CheckedChanged += new System.EventHandler(this.option_unique_layout_CheckedChanged); // @@ -122,9 +127,9 @@ namespace PreviewToy this.option_sync_size.Location = new System.Drawing.Point(1, 3); this.option_sync_size.Name = "option_sync_size"; this.option_sync_size.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.option_sync_size.Size = new System.Drawing.Size(113, 17); + this.option_sync_size.Size = new System.Drawing.Size(108, 17); this.option_sync_size.TabIndex = 4; - this.option_sync_size.Text = "Syncronize Resize"; + this.option_sync_size.Text = "Syncronize resize"; this.option_sync_size.UseVisualStyleBackColor = true; this.option_sync_size.CheckedChanged += new System.EventHandler(this.option_sync_size_CheckedChanged); // @@ -133,12 +138,12 @@ namespace PreviewToy this.option_always_on_top.AutoSize = true; this.option_always_on_top.Checked = true; this.option_always_on_top.CheckState = System.Windows.Forms.CheckState.Checked; - this.option_always_on_top.Location = new System.Drawing.Point(90, 3); + this.option_always_on_top.Location = new System.Drawing.Point(3, 26); this.option_always_on_top.Name = "option_always_on_top"; this.option_always_on_top.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.option_always_on_top.Size = new System.Drawing.Size(92, 17); + this.option_always_on_top.Size = new System.Drawing.Size(137, 17); this.option_always_on_top.TabIndex = 8; - this.option_always_on_top.Text = "Always on top"; + this.option_always_on_top.Text = "Previews always on top"; this.option_always_on_top.UseVisualStyleBackColor = true; this.option_always_on_top.CheckedChanged += new System.EventHandler(this.option_always_on_top_CheckedChanged); // @@ -147,19 +152,19 @@ namespace PreviewToy this.option_show_thumbnail_frames.AutoSize = true; this.option_show_thumbnail_frames.Checked = true; this.option_show_thumbnail_frames.CheckState = System.Windows.Forms.CheckState.Checked; - this.option_show_thumbnail_frames.Location = new System.Drawing.Point(99, 172); + this.option_show_thumbnail_frames.Location = new System.Drawing.Point(99, 195); this.option_show_thumbnail_frames.Name = "option_show_thumbnail_frames"; this.option_show_thumbnail_frames.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.option_show_thumbnail_frames.Size = new System.Drawing.Size(142, 17); + this.option_show_thumbnail_frames.Size = new System.Drawing.Size(127, 17); this.option_show_thumbnail_frames.TabIndex = 9; - this.option_show_thumbnail_frames.Text = "Show Thumbnail Frames"; + this.option_show_thumbnail_frames.Text = "Show preview frames"; this.option_show_thumbnail_frames.UseVisualStyleBackColor = true; this.option_show_thumbnail_frames.CheckedChanged += new System.EventHandler(this.option_show_thumbnail_frames_CheckedChanged); // // forum_url // this.forum_url.AutoSize = true; - this.forum_url.Location = new System.Drawing.Point(3, 305); + this.forum_url.Location = new System.Drawing.Point(149, 4); this.forum_url.Name = "forum_url"; this.forum_url.Size = new System.Drawing.Size(94, 13); this.forum_url.TabIndex = 10; @@ -206,7 +211,7 @@ namespace PreviewToy this.option_show_overlay.AutoSize = true; this.option_show_overlay.Checked = true; this.option_show_overlay.CheckState = System.Windows.Forms.CheckState.Checked; - this.option_show_overlay.Location = new System.Drawing.Point(3, 172); + this.option_show_overlay.Location = new System.Drawing.Point(3, 195); this.option_show_overlay.Name = "option_show_overlay"; this.option_show_overlay.RightToLeft = System.Windows.Forms.RightToLeft.No; this.option_show_overlay.Size = new System.Drawing.Size(90, 17); @@ -316,7 +321,7 @@ namespace PreviewToy // // option_zoom_factor // - this.option_zoom_factor.Location = new System.Drawing.Point(3, 22); + this.option_zoom_factor.Location = new System.Drawing.Point(9, 28); this.option_zoom_factor.Name = "option_zoom_factor"; this.option_zoom_factor.Size = new System.Drawing.Size(28, 20); this.option_zoom_factor.TabIndex = 24; @@ -332,13 +337,12 @@ namespace PreviewToy this.flowLayoutPanel1.Controls.Add(this.panel2); this.flowLayoutPanel1.Controls.Add(this.option_show_overlay); this.flowLayoutPanel1.Controls.Add(this.option_show_thumbnail_frames); - this.flowLayoutPanel1.Controls.Add(this.label1); - this.flowLayoutPanel1.Controls.Add(this.previews_check_listbox); - this.flowLayoutPanel1.Controls.Add(this.forum_url); + this.flowLayoutPanel1.Controls.Add(this.panel5); + this.flowLayoutPanel1.Controls.Add(this.panel4); this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(252, 328); + this.flowLayoutPanel1.Size = new System.Drawing.Size(252, 349); this.flowLayoutPanel1.TabIndex = 25; // // panel1 @@ -346,40 +350,40 @@ namespace PreviewToy this.panel1.Controls.Add(this.option_sync_size); this.panel1.Controls.Add(this.option_sync_size_x); this.panel1.Controls.Add(this.option_sync_size_y); - this.panel1.Location = new System.Drawing.Point(3, 72); + this.panel1.Location = new System.Drawing.Point(3, 95); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(246, 26); this.panel1.TabIndex = 26; // // panel2 // - this.panel2.Controls.Add(this.label3); this.panel2.Controls.Add(this.label2); this.panel2.Controls.Add(this.panel3); + this.panel2.Controls.Add(this.zoom_anchor_lable); this.panel2.Controls.Add(this.option_zoom_on_hover); this.panel2.Controls.Add(this.option_zoom_factor); - this.panel2.Location = new System.Drawing.Point(3, 104); + this.panel2.Location = new System.Drawing.Point(3, 127); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(246, 62); this.panel2.TabIndex = 27; // - // label3 + // zoom_anchor_lable // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(132, 25); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(40, 13); - this.label3.TabIndex = 30; - this.label3.Text = "anchor"; + this.zoom_anchor_lable.AutoSize = true; + this.zoom_anchor_lable.Location = new System.Drawing.Point(134, 31); + this.zoom_anchor_lable.Name = "zoom_anchor_lable"; + this.zoom_anchor_lable.Size = new System.Drawing.Size(41, 13); + this.zoom_anchor_lable.TabIndex = 30; + this.zoom_anchor_lable.Text = "Anchor"; // // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(37, 25); + this.label2.Location = new System.Drawing.Point(43, 31); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(64, 13); + this.label2.Size = new System.Drawing.Size(37, 13); this.label2.TabIndex = 29; - this.label2.Text = "Zoom factor"; + this.label2.Text = "Factor"; // // panel3 // @@ -392,17 +396,26 @@ namespace PreviewToy this.panel3.Controls.Add(this.option_zoom_anchor_S); this.panel3.Controls.Add(this.option_zoom_anchor_E); this.panel3.Controls.Add(this.option_zoom_anchor_SW); - this.panel3.Location = new System.Drawing.Point(178, 3); + this.panel3.Location = new System.Drawing.Point(182, 3); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(60, 57); this.panel3.TabIndex = 28; // + // panel5 + // + this.panel5.Controls.Add(this.previews_check_listbox); + this.panel5.Controls.Add(this.label1); + this.panel5.Location = new System.Drawing.Point(3, 218); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(246, 100); + this.panel5.TabIndex = 31; + // // previews_check_listbox // this.previews_check_listbox.FormattingEnabled = true; - this.previews_check_listbox.Location = new System.Drawing.Point(3, 208); + this.previews_check_listbox.Location = new System.Drawing.Point(3, 18); this.previews_check_listbox.Name = "previews_check_listbox"; - this.previews_check_listbox.Size = new System.Drawing.Size(246, 94); + this.previews_check_listbox.Size = new System.Drawing.Size(240, 79); this.previews_check_listbox.TabIndex = 28; this.previews_check_listbox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.checkedListBox1_SelectedIndexChanged2); this.previews_check_listbox.SelectedIndexChanged += new System.EventHandler(this.checkedListBox1_SelectedIndexChanged); @@ -410,18 +423,35 @@ namespace PreviewToy // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(3, 192); + this.label1.Location = new System.Drawing.Point(3, 0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(151, 13); this.label1.TabIndex = 29; this.label1.Text = "Previews (check to force hide)"; - this.label1.Click += new System.EventHandler(this.label1_Click); + // + // panel4 + // + this.panel4.Controls.Add(this.aero_status_label); + this.panel4.Controls.Add(this.forum_url); + this.panel4.Location = new System.Drawing.Point(3, 324); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(246, 21); + this.panel4.TabIndex = 30; + // + // aero_status_label + // + this.aero_status_label.AutoSize = true; + this.aero_status_label.Location = new System.Drawing.Point(3, 4); + this.aero_status_label.Name = "aero_status_label"; + this.aero_status_label.Size = new System.Drawing.Size(35, 13); + this.aero_status_label.TabIndex = 0; + this.aero_status_label.Text = "label4"; // // PreviewToyHandler // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(252, 328); + this.ClientSize = new System.Drawing.Size(252, 349); this.Controls.Add(this.flowLayoutPanel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -441,6 +471,10 @@ namespace PreviewToy this.panel2.PerformLayout(); this.panel3.ResumeLayout(false); this.panel3.PerformLayout(); + this.panel5.ResumeLayout(false); + this.panel5.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); this.ResumeLayout(false); } @@ -474,9 +508,12 @@ namespace PreviewToy private Panel panel2; private Label label2; private Panel panel3; - private Label label3; + private Label zoom_anchor_lable; private CheckedListBox previews_check_listbox; private Label label1; + private Panel panel4; + private Label aero_status_label; + private Panel panel5; } diff --git a/PreviewHandler.cs b/PreviewHandler.cs index dac812f..f2e5999 100644 --- a/PreviewHandler.cs +++ b/PreviewHandler.cs @@ -12,6 +12,8 @@ using System.Windows.Threading; using System.Xml.Linq; using System.Linq; +using System.IO; + namespace PreviewToy { @@ -118,6 +120,13 @@ namespace PreviewToy option_show_overlay.Checked = Properties.Settings.Default.show_overlay; + // disable/enable zoom suboptions + option_zoom_factor.Enabled = Properties.Settings.Default.zoom_on_hover; + foreach (var kv in zoom_anchor_button_map) + { + kv.Value.Enabled = Properties.Settings.Default.zoom_on_hover; + } + load_layout(); } @@ -222,21 +231,27 @@ namespace PreviewToy private void load_layout() { - XElement rootElement = XElement.Load("layout.xml"); - foreach (var el in rootElement.Elements()) + if (File.Exists("layout.xml")) { - Dictionary inner = new Dictionary(); - foreach (var inner_el in el.Elements()) + XElement rootElement = XElement.Load("layout.xml"); + foreach (var el in rootElement.Elements()) { - inner[ParseXElement(inner_el)] = new Point(Convert.ToInt32(inner_el.Element("x").Value), Convert.ToInt32(inner_el.Element("y").Value)); + Dictionary inner = new Dictionary(); + foreach (var inner_el in el.Elements()) + { + inner[ParseXElement(inner_el)] = new Point(Convert.ToInt32(inner_el.Element("x").Value), Convert.ToInt32(inner_el.Element("y").Value)); + } + unique_layouts[ParseXElement(el)] = inner; } - unique_layouts[ParseXElement(el)] = inner; } - rootElement = XElement.Load("flat_layout.xml"); - foreach (var el in rootElement.Elements()) + if (File.Exists("flat_layout.xml")) { - flat_layout[ParseXElement(el)] = new Point(Convert.ToInt32(el.Element("x").Value), Convert.ToInt32(el.Element("y").Value)); + XElement rootElement = XElement.Load("flat_layout.xml"); + foreach (var el in rootElement.Elements()) + { + flat_layout[ParseXElement(el)] = new Point(Convert.ToInt32(el.Element("x").Value), Convert.ToInt32(el.Element("y").Value)); + } } } @@ -376,6 +391,8 @@ namespace PreviewToy entry.Value.hover_zoom = Properties.Settings.Default.zoom_on_hover; entry.Value.show_overlay = Properties.Settings.Default.show_overlay; } + + DwmApi.DwmIsCompositionEnabled(); } @@ -434,6 +451,17 @@ namespace PreviewToy spawn_and_kill_previews(); refresh_thumbnails(); if (ignoring_size_sync.ElapsedMilliseconds > 500) { ignoring_size_sync.Stop(); }; + + if(DwmApi.DwmIsCompositionEnabled()) + { + aero_status_label.Text = "AERO is ON"; + aero_status_label.ForeColor = Color.Black; + } + else{ + aero_status_label.Text = "AERO is OFF"; + aero_status_label.ForeColor = Color.Red; + } + } @@ -570,6 +598,14 @@ namespace PreviewToy Properties.Settings.Default.zoom_on_hover = option_zoom_on_hover.Checked; Properties.Settings.Default.Save(); refresh_thumbnails(); + option_zoom_factor.Enabled = Properties.Settings.Default.zoom_on_hover; + if (is_initialized) + { + foreach (var kv in zoom_anchor_button_map) + { + kv.Value.Enabled = Properties.Settings.Default.zoom_on_hover; + } + } } private void option_show_overlay_CheckedChanged(object sender, EventArgs e) @@ -630,10 +666,5 @@ namespace PreviewToy refresh_thumbnails(); } - private void label1_Click(object sender, EventArgs e) - { - - } - } } \ No newline at end of file diff --git a/Win32api.cs b/Win32api.cs index 6c5f649..4dd3ab8 100644 --- a/Win32api.cs +++ b/Win32api.cs @@ -43,7 +43,7 @@ namespace PreviewToy [DllImport("dwmapi.dll", PreserveSig = false)] public static extern void DwmQueryThumbnailSourceSize(IntPtr hThumbnail, out Size size); - + [StructLayout(LayoutKind.Sequential)] public class DWM_THUMBNAIL_PROPERTIES { diff --git a/preview toy.csproj b/preview toy.csproj index 97619fe..738632a 100644 --- a/preview toy.csproj +++ b/preview toy.csproj @@ -28,7 +28,7 @@ false true 0 - 1.11.0.0 + 1.12.0.0 false true true diff --git a/preview toy.v11.suo b/preview toy.v11.suo index 51bc1c22c89bc24983ca7ac5cdf13b81ad817ffe..ee89207e1905d69a52bdd1bb2313ea7f5cd0f24e 100644 GIT binary patch delta 4967 zcmc(j3s}@u7Qp}K&kWB28D2g>UXlXxOcw=F1|dU5WB}1xQYOK~jfXt4&}0yMZDcTq zxSCn+WSHoh_&3IUBr5Bp4AW|Bzcp94hqb+Q!(Fx3*>i>&rPlqv-M;A03{eJ~sA; z0I{ElAd-o2VmI*%B9hoc6!KIfDZvv>rg$Q5QH2;LQR*L55=ij~B9!nXQivHu6fuU# zB4P<@dLx9{^W!N_|506rJ)hdD_tidV&*aR5ye_2c#Pt{h_Y#gVQY7+@wK8un?{XY|>a>-4RBe&9!+lcMNZwZ#tD-`b}y6k!0Bc9Mi4nIhV z14IwO4G&R#nCL}_9P0T7rQWpHTvrl3X9F6w;TS$KPko$$Gmo%rqsgk zux?5Ntj5bz8l2g9f&lB&rn|vCl(tFi{G1R>kloa*qw|!jS{HYdX4C&^!DuWPq6`VW z>lJ=DM;4%o*Idzc3dwy{U3;t}2f!4i>~{*j}3m4#HRp zMl^=&ur+TaZpayhh7X6Ey8OI{{W5Fn6DxG6K&l{CUvL3r))Ynot6*2_F3?PZ3_RNoIr@p63*W=x)p#^tphsZ?=lpn+nItpk{g z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