Click here to Skip to main content
16,019,140 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Código para validar cpf no Access xp Pin
Andy_L_J20-Oct-10 21:55
Andy_L_J20-Oct-10 21:55 
GeneralRe: Código para validar cpf no Access xp Pin
Dave Kreskowiak21-Oct-10 2:07
mveDave Kreskowiak21-Oct-10 2:07 
QuestionKey Tracking Using API not working Pin
greendragons20-Oct-10 7:49
greendragons20-Oct-10 7:49 
AnswerRe: Key Tracking Using API not working Pin
DaveAuld20-Oct-10 8:41
professionalDaveAuld20-Oct-10 8:41 
GeneralRe: Key Tracking Using API not working Pin
greendragons20-Oct-10 8:58
greendragons20-Oct-10 8:58 
GeneralRe: Key Tracking Using API not working Pin
Dave Kreskowiak20-Oct-10 9:53
mveDave Kreskowiak20-Oct-10 9:53 
GeneralRe: Key Tracking Using API not working Pin
greendragons20-Oct-10 10:10
greendragons20-Oct-10 10:10 
QuestionMetafile Dimension Problems. Pin
markW34518-Oct-10 22:52
markW34518-Oct-10 22:52 
Hi In the code below It will create a metafile in c:\test\myfile.emf
It should be a image size of 5cm * 5cm
With a vertical line inside of 2cm.

No problem, if I view this in MS word
But in ms paint its all wrong and way to large.

So if I change the line
Dim gr As Graphics = ps.CreateMeasurementGraphics()

to
Dim gr As Graphics = Me.CreateGraphics()

This time paint is OK and MS Word 2000 is ok,
But MS word 2007 reports the line as 2.69 cm.
So does Adobe Illustrator

If I create the same metafile in Adobe Illustrator its perfect for all programs, so it must be possible in VB I hope

Any thoughts

Thanks

Mark

Dim mf As Metafile
        Dim ps As New PrinterSettings()


        'Dim gr As Graphics = ps.CreateMeasurementGraphics()
        Dim gr As Graphics = Me.CreateGraphics()



        gr.PageUnit = System.Drawing.Imaging.MetafileFrameUnit.Millimeter
        gr.PageScale = 1

        Dim me_hdc As IntPtr = gr.GetHdc

        mf = New Metafile("c:\test\myfile.emf", me_hdc, New Rectangle(0, 0, 50.0F, 50.0F), MetafileFrameUnit.Millimeter, EmfType.EmfOnly)

        gr.ReleaseHdc(me_hdc)
        gr.Dispose()

        g = Graphics.FromImage(mf)
        g.PageUnit = System.Drawing.Imaging.MetafileFrameUnit.Millimeter

        g.PageScale = 1

        g.FillRectangle(Brushes.Black, 0.0F, 0.0F, 1.0F, 20.0F)

        g.Dispose()

QuestionFree Pc Status? Pin
jahan00716-Oct-10 12:33
jahan00716-Oct-10 12:33 
AnswerRe: Free Pc Status? Pin
Dave Kreskowiak16-Oct-10 16:05
mveDave Kreskowiak16-Oct-10 16:05 
AnswerRe: Free Pc Status? Pin
Ray Cassick17-Oct-10 5:09
Ray Cassick17-Oct-10 5:09 
GeneralRe: Free Pc Status? Pin
jahan00717-Oct-10 14:24
jahan00717-Oct-10 14:24 
QuestionVB.NET Pin
harshdamania16-Oct-10 4:10
harshdamania16-Oct-10 4:10 
AnswerRe: VB.NET Pin
Dave Kreskowiak16-Oct-10 7:09
mveDave Kreskowiak16-Oct-10 7:09 
AnswerRe: VB.NET Pin
Bernhard Hiller22-Oct-10 4:06
Bernhard Hiller22-Oct-10 4:06 
QuestionExtend Standard Context menu Pin
P$YCH015-Oct-10 2:58
P$YCH015-Oct-10 2:58 
AnswerRe: Extend Standard Context menu Pin
Eddy Vluggen15-Oct-10 4:55
professionalEddy Vluggen15-Oct-10 4:55 
GeneralRe: Extend Standard Context menu Pin
P$YCH015-Oct-10 5:30
P$YCH015-Oct-10 5:30 
GeneralRe: Extend Standard Context menu Pin
Richard MacCutchan15-Oct-10 6:04
mveRichard MacCutchan15-Oct-10 6:04 
QuestionRe: Extend Standard Context menu Pin
P$YCH015-Oct-10 6:44
P$YCH015-Oct-10 6:44 
AnswerRe: Extend Standard Context menu Pin
Eddy Vluggen15-Oct-10 7:32
professionalEddy Vluggen15-Oct-10 7:32 
NewsRe: Extend Standard Context menu Pin
P$YCH015-Oct-10 8:42
P$YCH015-Oct-10 8:42 
GeneralRe: Extend Standard Context menu Pin
Eddy Vluggen15-Oct-10 10:48
professionalEddy Vluggen15-Oct-10 10:48 
GeneralRe: Extend Standard Context menu Pin
P$YCH015-Oct-10 20:01
P$YCH015-Oct-10 20:01 
GeneralRe: Extend Standard Context menu Pin
Richard MacCutchan15-Oct-10 23:08
mveRichard MacCutchan15-Oct-10 23:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.