·您的位置: 首页 » 资源教程 » 编程开发 » ASP.NET » .net中窗体的调整

.net中窗体的调整

类别: ASP.NET教程  评论数:0 总得分:0
Private r As RectangleF

 

    Private m_image As Image = Image.FromFile(\"g:/picture.bmp\")

 

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Try

            r = New RectangleF(0, 0, Me.ClientSize.Width, Me.ClientSize.Height)

        Catch ex As Exception

            MessageBox.Show(ex.Message)

        End Try

    End Sub

 

    Private Sub mydrawimage()

        Try

            Dim g As Graphics = Me.CreateGraphics

            g.DrawImage(m_image, r)

            g.Dispose()

        Catch ex As Exception

 

        End Try

    End Sub

    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint

 

        mydrawimage()

 

    End Sub

 

    Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize

 

        r = New RectangleF(0, 0, Me.ClientSize.Width, Me.ClientSize.Height)

 

        mydrawimage()

    End Sub

-= 资 源 教 程 =-
文 章 搜 索
关键词:
类型:
范围:
纯粹空间 softpure.com
Copyright © 2006-2008 暖阳制作 版权所有
QQ: 15242663 (拒绝闲聊)  Email: faisun@sina.com
 纯粹空间 - 韩国酷站|酷站欣赏|教程大全|资源下载|免费博客|美女壁纸|设计素材|技术论坛   Valid XHTML 1.0 Transitional
百度搜索 谷歌搜索 Alexa搜索 | 粤ICP备19116064号-1