Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tool for selecting a bit map
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01022785
Message ID:
01023066
Vues:
13
This message has been marked as the solution to the initial question of the thread.
Terry here a small form just for test:
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN


	**************************************************
*-- Form:         form1 (d:\all_zapl\test.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   06/14/05 04:12:06 PM
*
DEFINE CLASS form1 AS form


	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT list1 AS listbox WITH ;
		Height = 238, ;
		Left = 3, ;
		MultiSelect = .T., ;
		Top = 3, ;
		Width = 211, ;
		Name = "List1"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 28, ;
		Left = 251, ;
		Height = 27, ;
		Width = 96, ;
		Caption = "Get pictures", ;
		Name = "Command1"


	ADD OBJECT command2 AS commandbutton WITH ;
		Top = 61, ;
		Left = 251, ;
		Height = 27, ;
		Width = 96, ;
		Caption = "Save to cursor", ;
		Name = "Command2"


	PROCEDURE command1.Click
		LOCAL lcFolder, lnNumFiles, laAdir[1], lnCnt
		LOCAL lcPict
		thisform.List1.Clear()
		lcFolder = GETDIR("","Choose","Choose folder with pictures")
		IF NOT EMPTY(lcFolder)
		   lcFolder = ADDBS(lcFolder)
		   lnNumFiles = ADIR(laAdir,lcFolder+"*.ICO")
		   FOR lnCnt = 1 TO lnNumFiles
		       lcPict = lcFolder+laAdir[lnCnt,1]
		       thisform.List1.AddItem(lcPict)
		       thisform.List1.Picture(lnCnt) = lcPict
		   NEXT
		ENDIF
	ENDPROC


	PROCEDURE command2.Click
		LOCAL lnCnt

		IF thisform.List1.ListCount # 0 && List Box is full wit something
		   IF USED("crsTest")
		      USE IN crsTest
		   ENDIF
		   CREATE CURSOR crsTest (PathToPicture M)
		   FOR lnCnt = 1 TO thisform.List1.ListCount
		       IF thisform.List1.Selected(lnCnt)
		          INSERT INTO crsTest VALUES (thisform.List1.List(lnCnt))
		       ENDIF
		   NEXT
		   GO TOP
		   BROW
		ENDIF
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform