史萊姆論壇

返回   史萊姆論壇 > 綜合討論二區 > 生活話題、日常閒聊、喇勒唬爛灌水區
忘記密碼?
論壇說明

歡迎您來到『史萊姆論壇』 ^___^

您目前正以訪客的身份瀏覽本論壇,訪客所擁有的權限將受到限制,您可以瀏覽本論壇大部份的版區與文章,但您將無法參與任何討論或是使用私人訊息與其他會員交流。若您希望擁有完整的使用權限,請註冊成為我們的一份子,註冊的程序十分簡單、快速,而且最重要的是--註冊是完全免費的!

請點擊這裡:『註冊成為我們的一份子!』


 
 
主題工具 顯示模式
舊 2017-06-28, 09:20 PM   #3 (permalink)
版區管理員
 
魔術王子 的頭像
榮譽勳章
UID - 115097
在線等級: 級別:43 | 在線時長:2021小時 | 升級還需:91小時級別:43 | 在線時長:2021小時 | 升級還需:91小時級別:43 | 在線時長:2021小時 | 升級還需:91小時
註冊日期: 2004-01-13
住址: 魔術學園
文章: 3071
精華: 0
現金: 15318 金幣
資產: 2678958 金幣
預設

有這麼好用的語法喔
這是用vb 2008完全不用引用API
PHP 語法:
        Me.Hide()
        
Dim dt As Double My.Computer.Clock.TickCount
        
While My.Computer.Clock.TickCount dt 1000
            My
.Application.DoEvents()
        
End While
        
Dim g As Graphics
        Dim bmp 
As Bitmap
        bmp 
= New Bitmap(My.Computer.Screen.Bounds.WidthMy.Computer.Screen.Bounds.Height)
        
Graphics.FromImage(bmp)
        
g.CopyFromScreen(New Point(00), New Point(00), New Size(My.Computer.Screen.Bounds.WidthMy.Computer.Screen.Bounds.Height))
        
g.Dispose()
        
'Dim i As Integer = 1
        '
While (My.Computer.FileSystem.FileExists(My.Computer.FileSystem.SpecialDirectories.Desktop "\ToyAide" ".jpg"))
        
' i += 1
        ' 
End While
        
' bmp.Save(My.Computer.FileSystem.SpecialDirectories.Desktop & "\ToyAide" & i & ".jpg")
        '
PictureBox1.Image bmp
        Me
.Show()
        
PictureBox1.Image bmp 
當然這是從網路上找到的,另外.NET還有圖片翻轉功能
PHP 語法:
        If PictureBox1.Image IsNot Nothing Then
            Dim Img 
As Image PictureBox1.Image
            Img
.RotateFlip(RotateFlipType.Rotate270FlipNone)
            
PictureBox1.Image Img
            Img 
Nothing
            ImageSize
()
        
End If 
再附加尺寸縮小語法
PHP 語法:
        ' If My.Computer.Clipboard.ContainsImage Then
        ' 
Get the scale factor.
        
Dim scale_factor As Single 0.5 'Single.Parse(txtScale.Text)

        ' 
Get the source bitmap.
        
Dim bm_source As New Bitmap(PictureBox1.Image)

        
' Make a bitmap for the result.
        Dim bm_dest As New Bitmap(CInt(bm_source.Width * scale_factor), CInt(bm_source.Height * scale_factor))

        ' 
Make a Graphics object for the result Bitmap.
        
Dim gr_dest As Graphics Graphics.FromImage(bm_dest)

        
' Copy the source image into the destination bitmap.
        gr_dest.DrawImage(bm_source, 0, 0, bm_dest.Width + 1, bm_dest.Height + 1)

        ' 
Display the result.
        
' My.Computer.Clipboard.SetImage(bm_dest)
        ' 
PictureBox1.Image My.Computer.Clipboard.GetImage
        
'PictureBox1.Image = bm_dest
        '  
End If
        
PictureBox1.Image bm_dest
        ImageSize
() 
魔術王子 目前離線  
送花文章: 1542, 收花文章: 1584 篇, 收花: 3939 次
回覆時引用此帖
向 魔術王子 送花的會員:
mini (2017-06-28)
感謝您發表一篇好文章
 



發表規則
不可以發文
不可以回覆主題
不可以上傳附加檔案
不可以編輯您的文章

論壇啟用 BB 語法
論壇啟用 表情符號
論壇啟用 [IMG] 語法
論壇禁用 HTML 語法
Trackbacks are 禁用
Pingbacks are 禁用
Refbacks are 禁用

相似的主題
主題 主題作者 討論區 回覆 最後發表
請問有能介紹一下電腦硬體裝修"乙級技術士內容 editer0246 硬體疑難使用問題討論區 7 2003-09-02 05:00 PM
有沒有辦法"網路"控制 vincent3358 一般電腦疑難討論區 0 2003-08-30 02:36 PM
求助一台"完全能破防烤"的燒錄器 geneming 硬體疑難使用問題討論區 8 2003-08-30 01:13 PM


所有時間均為台北時間。現在的時間是 09:08 PM


Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2025, Jelsoft Enterprises Ltd.


SEO by vBSEO 3.6.1