xZu Posted December 14, 2007 Report Posted December 14, 2007 Salut!Nu am somn deci tre sa-mi fac de lucru 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)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.HeightEnd SubPrivate Sub Form_Unload(Cancel As Integer)' This unloads the project. EndEnd SubCam asa.. Quote
ÐÒ& Posted December 14, 2007 Report Posted December 14, 2007 ati inteles de ce se foloseste o a doua forma? Quote
tw8 Posted December 14, 2007 Report Posted December 14, 2007 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. Quote
xZu Posted December 14, 2007 Author Report Posted December 14, 2007 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 Quote