Jump to content
xZu

[TUT]Image Viewer-VB6

Recommended Posts

Posted

Salut!

Nu am somn deci tre sa-mi fac de lucru :P asa ca o creeam un image viewer

Standard exe...avem nevoie de un buton (de preferat la captation --> Deschide) si de Microsoft Common Dialog (uitati-va la poza)

8f0ya7q.jpg

Apoi un dublu click pe form si punem codul

Private Sub Command1_Click()
' This is the filter for CommonDialog1. This simply tells the common dialog box to show the files stated
' You can also add more just follow the simple patteren.
CommonDialog1.Filter = "Pictures (*.bmp,*.gif,*.jpg)|*.bmp;*.gif;*.jpg"
' This loads the common dialog box with all of the filters in place so you can select your image.
CommonDialog1.ShowOpen
' This well load the image in the Picture1 box in form2.
Set Form2.Image1.Picture = LoadPicture(CommonDialog1.FileName)
' This will make form2 visiable so that we can see the image.
Form2.Show
' This will set the width of form2 to match the images width.
Form2.Width = Form2.Image1.Width
' This will set the height of form2 to match the images height.
Form2.Height = Form2.Image1.Height
' This sets the position of form2.
Form2.Left = Form1.Width
' This sets the position of form2.
Form2.Top = Form1.Height
End Sub

Private Sub Form_Unload(Cancel As Integer)
' This unloads the project.
End
End Sub

Cam asa..

Posted

Interesant. Interesant e ca tu numesti asa ceva tutorial.

Intr-un utorial trebuie sa explici ce faci, nu pui un printscreen si un cod care l-ai gasit pe Google, si gata, ai terminat tutorialul.

Citeste aici ce inseamna un tutorial.

Posted
Interesant. Interesant e ca tu numesti asa ceva tutorial.

Intr-un utorial trebuie sa explici ce faci, nu pui un printscreen si un cod care l-ai gasit pe Google, si gata, ai terminat tutorialul.

Citeste aici ce inseamna un tutorial.

Ok... data viitoare va fi un "tutorial" corect...

Nu prea aveam ce sa fac si ... in fine data vitoare va fi unul bun sa-l multumeasca si pe tw8 ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...