e1_Resize (). Value = 0
VScroll1.Value = 0
Робить видимою смугу горизонтального скролінгу при деякому умови:
If Picture1.Width> Picture2.ScaleWidth - 17 Then.Max = Picture1.Width - Picture2.ScaleWidth + 17
HScroll1.Enabled = True
Інакше смуга горизонтального скролінгу невидима:
HScroll1.E nabled = FalseIfPicture1.Height> Picture2.ScaleHeight - 17 Then.Max = Picture1.Height - Picture2.ScaleHeight + 17.Enabled = True.Enabled = False
End IfSub
Наступні процедури реалізують команди меню
Файл, Виправлення, Зображення
Private Sub new_Click () Text1.Visible = True Then TextExitPicture9.Visible = True Then PictureExit.Picture = Nothing.BackColor = vbWhite.Width = 441.Height = 361 (1). BackColor = vbBlack ( 0). BackColor = vbWhite.Caption = "Точковий малюнок - GraphEdit" SubSub open_Click () Text1.Visible = True Then TextExitPicture9.Visible = True Then PictureExitError Resume Next.ShowOpenErr Then Exit Sub.Caption = CommonDialog1.FileTitle + "- GraphEdit ". Picture = LoadPicture (CommonDialog1.FileName) (1). BackColor = vbBlack (0). BackColor = vbWhiteSubSub save_Click ()
If Text1.Visible = True Then TextExitPicture9.Visible = True Then PictureExit.FileName = Left $ (Form1.Caption, Len (Form1.Caption) - 12) Error Resume Next.ShowSaveErr Then Exit SubCommonDialog1. FileName <> "" Then.Caption = CommonDialog1.FileTitle + "- GraphEdit" Picture1.image, CommonDialog1.FileNameIfSubSub print_Click () Text1.Visible = True Then TextExitPicture9.Visible = True Then PictureExit.PaintPicture Picture1.image, 0, 0.EndDocSubSub size_Click () . Text1.Text = Picture1.Width.Text2.Text = Picture1.Height.Show vbModalSubSub clear_Click () Text1.Visible = True Then TextExitPicture9.Visible = True Then PictureExit.Picture = Nothing.BackColor = Picture8 (0). BackColorSubSub copy_Click () Picture9.Visible = True Then.clear.SetData Picture9.imageIfSubSub cut_Click () Picture9.Visible = True Then.clear.SetData Picture9.image.Visible = FalseIfSubSub paste_Click () (0). Value = True.Picture = Clipboard.GetData (). Move -1,-1Picture1 . Width
Picture9.Visible = TrueSub
...