Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
VB.NET
Graphics/GDI+
send emf to clipboard
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="LaLue, post: 183469, member: 55386"] I have written a program with which the user can draw different objects (lines, shapes, font signs). One function is to select objects and send them as an emf file to the clipboard. The relevant code is : . mf = New Metafile(MetafileName, hdc, rectSelected, MetafileFrameUnit.Pixel) Dim gMetaFile As Graphics = Graphics.FromImage(mf) gMetaFile.PageUnit = GraphicsUnit.Pixel Call DrawObjects(gMetaFile, SelectedScreenObjects) ‘ draw the selected objects FileCollection.Add(MetafileName) Clipboard.SetFileDropList(FileCollection) I am working with Win7 and everythings works fine, which means that if I paste the objects e.g. into MS-Word the objects are correctly shown. But as I started to test the program with Win10, and copy/pasted the same objects to MS-Word a much bigger empty rectangle was shown. For the x,y-position of the selection frame (a rectangle which touches the outmost pixels of the selected objects) I used the left upper corner of the drawing surface (a picture box). I noticed that in Win10 you always have to use the left upper corner of the selection frame (x,y-Position = 0,0). After having changed this the objects appear if copy/paste to MS-Word. But still the width and height of the rectangle is much bigger as it should be. I tried to use other graphics unit than GraphicsUnit.Pixel, but this does change nothing. Would be grateful for any help. [/QUOTE]
Insert quotes…
Verification
Post reply
VB.NET
Graphics/GDI+
send emf to clipboard
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom