diff --git a/HLCt/Parts/~$START.SLDPRT b/HLCt/Parts/~$START.SLDPRT deleted file mode 100644 index b07f2ee..0000000 Binary files a/HLCt/Parts/~$START.SLDPRT and /dev/null differ diff --git a/Wardrobe/GUI/Individual.vb b/Wardrobe/GUI/Individual.vb index 47bd2ee..4c2ba7a 100644 --- a/Wardrobe/GUI/Individual.vb +++ b/Wardrobe/GUI/Individual.vb @@ -1,7 +1,6 @@ - +Imports Word = Microsoft.Office.Interop.Word Public Class Individual - Public Shared filepath As String '= "C:\Users\Anton\Documents\Exjobb" - 'Public Shared filepath As String = "C:\Users\xperd\Documents" + Public Shared filepath As String Sub Load_GUI() ' Initialize GUI @@ -258,7 +257,21 @@ Public Class Individual ' ---------------------------------- Export GUI ---------------------------------- ' --- When export GUI button is pressed --- Private Sub Button_Export_GUI_Click(sender As Object, e As EventArgs) Handles Button_Export_GUI.Click + 'Dim startPoint As New Point(Me.Left + Panel_Grating.Left, Me.Top + Panel_Grating.Top) + Dim startPoint As New Point + startPoint = Panel_Grating.PointToScreen(Point.Empty) + Dim tempImg As New Bitmap(Panel_Grating.Width - 1, Panel_Grating.Height - 1) + Dim test As Graphics = Graphics.FromImage(tempImg) + test.CopyFromScreen(startPoint, New Point(0, 0), tempImg.Size) + tempImg.Save(filepath & "\Screenshot.png", Imaging.ImageFormat.Png) + + + Dim doc As Word.Document = New Word.Document() + doc.Content.Text = "Hello World" + doc.Content.InlineShapes.AddPicture(filepath & "\Screenshot.png") + doc.ExportAsFixedFormat(filepath & "\myfilename.pdf", Word.WdExportFormat.wdExportFormatPDF) + doc.Close(False) End Sub ' ---------------------------------- Back to main menu ---------------------------------- diff --git a/Wardrobe/Wardrobe.vbproj b/Wardrobe/Wardrobe.vbproj index b3c4169..32d4dfe 100644 --- a/Wardrobe/Wardrobe.vbproj +++ b/Wardrobe/Wardrobe.vbproj @@ -170,6 +170,15 @@ False True + + {00020905-0000-0000-C000-000000000046} + 8 + 7 + 0 + primary + False + True + {83A33D31-27C5-11CE-BFD4-00400513BB57} 28