Click here to Skip to main content
16,008,750 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to make floating button? Pin
baby_lotus6-Apr-07 16:18
baby_lotus6-Apr-07 16:18 
AnswerRe: How to make floating button? Pin
mysticmango23-Apr-07 18:48
mysticmango23-Apr-07 18:48 
Questionproblem with system.web.mail Pin
jmflanders6-Apr-07 7:07
jmflanders6-Apr-07 7:07 
AnswerRe: problem with system.web.mail Pin
MatrixCoder6-Apr-07 7:18
MatrixCoder6-Apr-07 7:18 
GeneralRe: problem with system.web.mail Pin
jmflanders6-Apr-07 7:28
jmflanders6-Apr-07 7:28 
GeneralRe: problem with system.web.mail Pin
MatrixCoder6-Apr-07 7:59
MatrixCoder6-Apr-07 7:59 
QuestionMy metafile code, what did I lose? Pin
astcws6-Apr-07 6:19
astcws6-Apr-07 6:19 
AnswerRe: My metafile code, what did I lose? Pin
Dave Kreskowiak6-Apr-07 10:31
mveDave Kreskowiak6-Apr-07 10:31 
There are so many problems with your code, I think I'll just rewrite it...
' Something to hold onto our memory stream
Private metaMemoryStream As New MemoryStream
 
Private Sub Button1_Click(blah, blah) Handles Button1.Click
    Using g As Graphics = Me.CreateGraphics()
        Dim hdc As IntPtr = g.GetHdc
        Using meta As New MetaFile(metaMemoryStream, hdc)
            Using metaGraphics As Graphics = Graphics.FromImage(meta)
                '
                ' Draw your stuff here...
                '
                metaGraphics.Draw...
                '
                '
                '
            End Using
            g.ReleaseHdc(hdc)
        End Using
    End Using
End Sub
 
Private Sub ShowMetaFile()
    ' VERY IMPORTANT!
    ' Make sure that we start at the beginning of the Memory Stream!!
    metaMemoryStream.Seek(0, SeekOrigin.Begin)
    PictureBox1.Image = Image.FromStream(metaMemoryStream)
End Sub



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: My metafile code, what did I lose? Pin
astcws6-Apr-07 12:51
astcws6-Apr-07 12:51 
QuestionC# or vb.net Java applet Pin
aerosmith2k16-Apr-07 4:35
aerosmith2k16-Apr-07 4:35 
AnswerRe: C# or vb.net Java applet Pin
Dave Kreskowiak6-Apr-07 4:42
mveDave Kreskowiak6-Apr-07 4:42 
GeneralRe: C# or vb.net Java applet Pin
aerosmith2k16-Apr-07 4:50
aerosmith2k16-Apr-07 4:50 
GeneralRe: C# or vb.net Java applet Pin
Dave Kreskowiak6-Apr-07 5:01
mveDave Kreskowiak6-Apr-07 5:01 
QuestionBeginners code Pin
Vinaya Kumar6-Apr-07 2:50
Vinaya Kumar6-Apr-07 2:50 
AnswerRe: Beginners code Pin
nlarson116-Apr-07 3:31
nlarson116-Apr-07 3:31 
GeneralRe: Beginners code Pin
Vinaya Kumar6-Apr-07 6:03
Vinaya Kumar6-Apr-07 6:03 
GeneralRe: Beginners code Pin
nlarson116-Apr-07 6:27
nlarson116-Apr-07 6:27 
GeneralRe: Beginners code Pin
Vinaya Kumar6-Apr-07 6:37
Vinaya Kumar6-Apr-07 6:37 
Questiondetach database Pin
MohamedAdam6-Apr-07 2:37
MohamedAdam6-Apr-07 2:37 
AnswerRe: detach database Pin
Dave Kreskowiak6-Apr-07 4:37
mveDave Kreskowiak6-Apr-07 4:37 
QuestionQuestion from SSTAB Pin
Kumaran21cen6-Apr-07 1:45
Kumaran21cen6-Apr-07 1:45 
AnswerRe: Question from SSTAB Pin
Xandip6-Apr-07 21:46
Xandip6-Apr-07 21:46 
GeneralRe: Question from SSTAB Pin
Kumaran21cen10-Apr-07 19:29
Kumaran21cen10-Apr-07 19:29 
QuestionWhy I can draw this image? This is my code. Pin
astcws6-Apr-07 0:09
astcws6-Apr-07 0:09 
AnswerRe: Why I can draw this image? This is my code. Pin
Dave Kreskowiak6-Apr-07 4:33
mveDave Kreskowiak6-Apr-07 4:33 

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.