cds
发表于 2005-5-29 15:08:00
咋的勒??钱包掉了?失恋啦??
烟囱天
发表于 2005-5-29 15:19:00
老大怎么了呀
会飞的蚂蚁
发表于 2005-5-29 15:19:00
失恋?
烟囱天
发表于 2005-5-29 15:31:00
合乎
煎饼
发表于 2005-5-29 19:41:00
摇摆
发表于 2005-5-29 19:57:00
袄。。
02510115
发表于 2005-5-29 20:46:00
<P>难道又是。。。</P>
摇摆
发表于 2005-5-29 20:46:00
失恋?
1w
发表于 2005-5-29 20:51:00
今天和老婆吵架也郁闷```
蓝雨霖
发表于 2005-5-29 20:52:00
<P>汗~</P>
韧天烬
发表于 2005-5-29 20:56:00
<P>吵架?</P><P>偶还8知道吵架怎么吵</P>
煎饼
发表于 2005-5-29 20:57:00
<B>以下是引用<I>摇摆</I>在2005-5-29 20:46:54的发言:</B>
失恋?
鬼恋
1w
发表于 2005-5-29 20:58:00
<B>以下是引用<I>韧天烬</I>在2005-5-29 20:56:40的发言:</B>
<P>吵架?</P>
<P>偶还8知道吵架怎么吵</P>
没 她不理我我也不理她
煎饼
发表于 2005-5-29 20:58:00
<P>Private Declare Function SelectObject& Lib "GDI32" (ByVal hDC As Long, ByVal hObject As Long)
Private Declare Function DeleteObject& Lib "GDI32" (ByVal hObject As Long)
Private Declare Function CreateBitmap& Lib "GDI32" (ByVal nWidth As Long, ByVal nHeight As Long, ByVal nPlanes As Long, ByVal nBitCount As Long, lpBits As Any)
Private Declare Function CreatePatternBrush& Lib "GDI32" (ByVal hbitmap As Long)
Dim a As Integer
Dim f As String</P><P>'清除当前画板
Private Sub clear_Click()
a = MsgBox("是否保存文件?", vbYesNo, "请确认")
If a = 6 Then
CommonDialog1.Filter = "组态文件|*.zt|所有文件|*.*"
CommonDialog1.Action = 2
f$ = CommonDialog1.FileName
If f$ <> "" Then
SavePicture Form1.Picture1(0).Image, f$
End If
End If
'重置
Form2.Label1.Caption = "新建文件"
If pictureno > 0 Then
For i = 1 To pictureno
Unload Form1.Picture2(i)
Next i
End If
indexno = -1
copyno = -1
pictureno = 0
End Sub
'图形复制
Private Sub copy_Click()
Form2.Label1.Caption = "复制"
'确定有选择
If indexno >= 0 Then
copyno = indexno
End If
End Sub</P><P>
'图形剪切
Private Sub cut_Click()
Form2.Label1.Caption = "剪切"
'确定有选择
If indexno >= 0 Then
Form1.Picture2(indexno).Visible = False
copyno = indexno
End If
End Sub
'退出程序
Private Sub exit_Click()
Form2.Label1.Caption = "退出"
a = MsgBox("是否保存文件?", vbYesNo, "请确认")
If a = 6 Then
CommonDialog1.Filter = "bmp文件|*.bmp|所有文件|*.*"
CommonDialog1.Action = 2
f$ = CommonDialog1.FileName
If f$ <> "" Then
SavePicture Form1.Picture1(0).Image, f$
End If
End If
dl = DeleteObject(newbrush)
dl = DeleteObject(oldbrush)
End
End Sub</P><P>'打印操作
Private Sub m1b8_Click(index As Integer)
Form2.Label1.Caption = "打印"
Printer.Print Form1.Picture1
End Sub</P><P>'全选
Private Sub m2b7_Click()
Form2.Label1.Caption = "清除"
If pictureno > 0 Then
For i = 1 To pictureno
Unload Form1.Picture2(i)
Next i
indexno = -1
copyno = -1
pictureno = 0
End If
End Sub
'颜料盒,工具箱的隐藏和显示
Private Sub m3b1_Click()
m3b1.Checked = Not m3b1.Checked
Form3.Visible = Not Form3.Visible
If Form3.Visible = True Then
Form2.Label1.Caption = "显示工具箱"
Else: Form2.Label1.Caption = "隐藏工具箱"
End If
End Sub</P><P>Private Sub m3b2_Click()
m3b2.Checked = Not m3b2.Checked
Form2.Visible = Not Form2.Visible
If Form3.Visible = True Then
Form2.Label1.Caption = "显示颜料盒"
Else: Form2.Label1.Caption = "隐藏颜料盒"
End If
End Sub</P><P>
'自定义颜色
Private Sub m5_Click()
Form2.Label1.Caption = "自定义颜色"
CommonDialog1.ShowColor
Form2.Picture11.BackColor = CommonDialog1.Color
End Sub
'子窗体的初值
Private Sub MDIForm_Load()
Form1.Width = Form1.Picture1(0).Width
Form1.Height = Form1.Picture1(0).Height</P><P>Form2.Top = Form1.Picture1(0).Top + Form1.Picture1(0).Height
Form3.Left = Form1.Picture1(0).Left + Form1.Picture1(0).Width + 100
Form3.Top = Form1.Picture1(0).Top + 100</P><P>MDIForm1.Width = Form1.Picture1(0).Width + Form3.Picture1.Width + 400
MDIForm1.Height = Form1.Picture1(0).Height + Form2.Height + 860</P><P>Form2.Left = MDIForm1.Width + Form1.Picture1(0).Left - Form1.Picture1(0).Width
'Form2.Width = Form1.Picture1(0).Width
'各窗体的属性</P><P>Form1.Visible = True
Form2.Visible = True
Form3.Visible = True</P><P>indexno = -1
copyno = -1
pictureno = 0</P><P>'前景,背景颜色初值
Curcolor = Form2.Picture11.BackColor
Curbkcolor = Form2.Picture10.BackColor
Huabi = 1
MDIForm1.WindowState = 0</P><P>hbitmap& = CreateBitmap(8, 8, 1, 1, ARRY(1))
newbrush& = CreatePatternBrush(hbitmap)</P><P>Curcolor = RGB(0, 0, 0)
Curbkcolor = RGB(255, 255, 255)
End Sub
'窗体的关闭
Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer)
a = MsgBox("是否保存文件?", vbYesNo, "请确认")
If a = 6 Then
CommonDialog1.Filter = "bmp文件|*.bmp|所有文件|*.*"
CommonDialog1.Action = 2
f$ = CommonDialog1.FileName
If f$ <> "" Then
SavePicture Form1.Picture1(0).Image, f$
End If
End If
dl = DeleteObject(newbrush)
dl = DeleteObject(oldbrush)</P><P>End Sub
'窗体变形后的布局
'Private Sub MDIForm_Resize()
'Form2.Width = Form3.Width + Form1.Width
'Form2.Left = 0
'Form3.Left = 0
'Form3.Top = 0
'Form1.Left = Form3.Width
'Form1.Top = 0
'End Sub</P><P>Private Sub MDIForm_Unload(Cancel As Integer)
End
End Sub
'打开新文件
Private Sub open_Click()
a = MsgBox("是否保存文件?", vbYesNo, "请确认")
If a = 6 Then
CommonDialog1.Filter = "bmp文件|*.bmp|所有文件|*.*"
CommonDialog1.Action = 2
f$ = CommonDialog1.FileName
If f$ <> "" Then
SavePicture Form1.Picture1(0).Image, f$
End If
End If
Form2.Label1.Caption = "打开文件"
On Error Resume Next
CommonDialog1.Filter = "bmp文件|*.bmp|jpg文件|*.jpg|所有文件|*.*"
CommonDialog1.Action = 1
f$ = CommonDialog1.FileName
If f$ <> "" Then
Form1.Picture1(0).Picture = LoadPicture(f$)</P><P>End If
End Sub</P><P>'粘贴操作
Private Sub plst_Click()
If copyno <> -1 Then
pictureno = pictureno + 1
Load Form1.Picture2(pictureno)
Form1.Picture2(pictureno).Left = Form1.Picture1(0).Left
Form1.Picture2(pictureno).Top = Form1.Picture1(0).Top
Form1.Picture2(pictureno).Visible = True
Form1.Picture2(pictureno).AutoRedraw = True
Form1.Picture2(pictureno).AutoSize = True
Form1.Picture2(pictureno).Appearance = 0
Form1.Picture2(pictureno).BorderStyle = 0</P><P>Form1.Picture2(pictureno).Picture = LoadPicture("c:\picture" & Str(copyno) & ".bmp")
Form1.Picture1(0).ZOrder (1)
End If
SavePicture Form1.Picture2(pictureno).Image, "c:\picture" & Str(pictureno) & ".bmp"
End Sub</P><P>'保存文件
Private Sub save_Click()
Form2.Label1.Caption = "保存文件"
CommonDialog1.Filter = "bmp文件|*.bmp|所有文件|*.*"
CommonDialog1.Action = 2
f$ = CommonDialog1.FileName
If f$ <> "" Then
SavePicture Form1.Picture1(0).Image, f$
End If
End Sub</P><P>Private Sub shuxing_Click()
Form2.Label1.Caption = "属性"
Form4.Show
End Sub</P>
1w
发表于 2005-5-29 21:01:00
老大我们看不懂
薄荷七星
发表于 2005-5-29 21:04:00
好长的代码~~~~
韧天烬
发表于 2005-5-29 21:04:00
呵呵。只有老大看得懂
水婷
发表于 2005-5-29 21:20:00
鼠标转了N圈
舞爱瞳瞳
发表于 2005-5-30 12:04:00
这个你自帮吧~
莫洛克丫头
发表于 2005-5-30 12:13:00
<P>很多时候都是别人帮不了的, 只有自己慢慢承受,不过会过去的,煎饼!</P><P>深呼吸!!!!!!</P>