1

Konu: Picture = STR(.txtNo.Value)+"-1.JPG" , ;

ADD OBJECT image1 AS image WITH ;
        Anchor = 15, ;
        Picture = STR(.txtNo.Value)+"-1.JPG" , ;
        Stretch = 2, ;
        Left = 1210, ;
        Top =  9, ;
        Height = 84, ;
        Width = 120, ;
        Name = "Image1", ;

de hata veriyor.

       Picture = STR(.txtNo.Value)+"-1.JPG" , ;

satırını nasıl yazabilirim ?

2

Re: Picture = STR(.txtNo.Value)+"-1.JPG" , ;

Alltrim(STR(.txtNo.Value))+"-1.JPG" , ;
şeklinde deneseniz...

3

Re: Picture = STR(.txtNo.Value)+"-1.JPG" , ;

satır
        Picture = "1-1.JPG" , ;
şeklindeyken doğruçalışıyor.
      Picture = STR(.txtNo.Value)+"-1.JPG" , ;
veya
      Picture = Alltrim(STR(.txtNo.Value))+"-1.JPG" , ;
yapıldığında

(1940) Expression is not valid outside of  WITH/WNDWITH
(1924) OFORM is not an object

hatalarını veriyor.
Ama benim değişkene göre
      Picture = STR(.txtNo.Value)+"-1.JPG" , ;
kullanmam gerekitor.   

DOĞRU YAZIM FORMATI NEDİR?

4 Son düzenleyen, antepli (13.12.2010 00:52:35)

Re: Picture = STR(.txtNo.Value)+"-1.JPG" , ;

M_NO=ALLTRIM(STR(thisform.txtNo.Value))+"-1.JPG"
ara="'"+M_NO+"'"
m_res=SYS(2000,&ara)

ADD OBJECT image1 AS image WITH ;
        Anchor = 15, ;
        Picture = m_res , ;
        Stretch = 2, ;
        Left = 1210, ;
        Top =  9, ;
        Height = 84, ;
        Width = 120, ;
        Name = "Image1", ;

Bilgi Paylaşıldıkça Artar...!

5

Re: Picture = STR(.txtNo.Value)+"-1.JPG" , ;

Visual Fox Pro
ADD OBJECT image1 AS image WITH ; 

        Anchor = 15, ;
        Stretch = 2, ;
        Left = 1210, ;
        Top =  9, ;
        Height = 84, ;
        Width = 120
 
Procedure Image1.init
        this.Picture = STR(thisform.txtNo.Value)+"-1.JPG" 
endproc
 
Procedure txtNo.LostFocus
        thisform.Image1.Picture = STR(this.Value)+"-1.JPG" 
endproc

6

Re: Picture = STR(.txtNo.Value)+"-1.JPG" , ;

Çetin
Define Class myGrid as Grid
de
    Procedure AfterRowColChange
de
            Thisform.txtNo.Value=no
komutu ile txtno ya teni  değer ataması yapmaya bu sayede  ekrandaki JPG resmini  değiştirmek istiyorumm ama resim değişmiyor..

yeni  değeri almadığı için mi yapıyordur ?

7

Re: Picture = STR(.txtNo.Value)+"-1.JPG" , ;

Image ve Grid, soruyu anlamadim. Buradaki ornege bak:

http://www.universalthread.com/ViewPage … 6254413D3D

8 Son düzenleyen, onders (16.12.2010 08:55:29)

Re: Picture = STR(.txtNo.Value)+"-1.JPG" , ;

Çetin kod aşağğıda .
Kod şu an için sorunsuz calışıyor.
Benim yapmak istediğim :
Programda 2 grid var (myGrid-Üsteki grid)  ve (myGrid2-Alltaki grid)
- myGrid (üSTEKİ GRİD) kayıtlarına mouse ile gelindiğinde sağ taraftaki resmin İLGİLİ KAYIT RESMİ İLE DEĞİŞMESİ.

Gösterilecek resim  1. kayıt için (1-1.JPG) 2. kayıt için (2-1.JPG) .....
Veri tabanından okunan "no" değeri NUMERİC 3         

Resim   
    ADD OBJECT image2 AS image WITH ;
de gösteriliyor.
this.Picture = ALLTRIM(STR(thisform.txtNo.Value))+"-1.JPG"
değerini


GRID(myGrid) de " Thisform.txtNo.Value=no" komutunu kullanmama rağmen dereği değişkene atmıyor..

GRID(myGrid) üzerinde hareket ettikçe nasıl değiştirebilirim ?
Nereye hangi eklemeleri yapmam gerekir ?

TEŞEKKÜRLER.




Clear All
SET TALK OFF
SET NOTIFY OFF
ON ERROR DO HATA

Public oForm
oForm = Createobject("vekalet")
oForm.Show(1)

Define Class vekalet As Form
  DataSession = 2
  Top    = 2
  Left   = 10
  Height = 800 
  Width  = 1415
  Name   = "per1"
  Caption = "Vekalet Tanımlama"
  Icon = "BLUE.ico"
   

  orecord = .Null.

  Add Object lblNo As Label With ;
    left = 5, Top = 5,  Caption = "Sıra No       :", AutoSize=.T.
  Add Object lblfirmaadi As Label With ;
    left = 5, Top = 30, Caption = "Firma Adı   :", AutoSize=.T.

  Add Object lblilgili As Label With ;
    left = 5, Top = 55, Caption = "İlgili             :", AutoSize=.T.

  Add Object lbltelefon As Label With ;
    left = 5, Top = 80, Caption = "Telefon       :", AutoSize=.T.

  Add Object lbltarih As Label With ;
    left = 5, Top = 105, Caption = "Bitiş Tarihi :", AutoSize=.T.

  Add Object txtNo As myTextBox With ;
      Top = 2, ;
      left = 85, ;
      Width = 35, ;
      InputMask = "999", ;
      Enabled = .F.

          PROCEDURE txtNo.Init
                   SELE 1
                   Thisform.txtNo.Value=no
          ENDPROC


  Add Object txtfirmaadi As myTextBox With ;
      Top = 27, ;
      left = 85, ;
      Width = 150, ;
      InputMask = "XXXXXXXXXXXXXXXXXXXX", ;
      Enabled = .F.

  Add Object txtilgili As myTextBox With ;
      Top = 52, ;
      left = 85, ;
      Width = 150, ;
      InputMask = "XXXXXXXXXXXXXXXXXXXX", ;
      Enabled = .F.
   
  Add Object txttelefon As myTextBox With ;
      Top = 77, ;
      left = 85, ;
      Width = 150, ;
      InputMask = "XXXXXXXXXXXXXXX", ;
      Enabled = .F.

  Add Object txttarih As myTextBox With ;
      Top = 102, ;
      left = 85, ;
      Width = 75, ;
      InputMask = "99/99/9999", ;
      Enabled = .F.

    Add Object shpBorder2 as Shape with ;
        Top = 2, ;
        Left = 696, ;
        Height = 780, ;
        Width = 650, ;
        SpecialEffect = 0

    ADD OBJECT image2 AS image WITH ;
        Anchor = 15, ;
        Stretch = 2, ;
        Left = 700, ;
        Top =  9, ;
        Height = 770, ;
        Width = 640, ;
        Name = "Image2"

*        Picture = "1-1.JPG" , ;       

          PROCEDURE Image2.Init
                    this.Picture = ALLTRIM(STR(thisform.txtNo.Value))+"-1.JPG" 
          ENDPROC

Procedure txtNo.LostFocus
        thisform.Image2.Picture = STR(this.Value)+"-1.JPG" 
endproc


    Add Object shpBorder3 as Shape with ;
        Top = 380, ;
        Left = 2, ;
        Height = 2, ;
        Width = 575, ;
        SpecialEffect = 0

* ALT *
  Add Object lblAdi As Label With ;
    left = 5, Top = 390,  Caption = "Personel Adı        :", AutoSize=.T.
  Add Object lblSoyadi As Label With ;
    left = 5, Top = 415, Caption = "Personel Soyadı :", AutoSize=.T.

  Add Object lblfirma As Label With ;
    left = 5, Top = 440, Caption = "Firma                    :", AutoSize=.T.

  Add Object txtadi As myTextBox With ;
      Top = 387, ;
      left = 110, ;
      Width = 150, ;
      InputMask = "XXXXXXXXXXXXXXXXXXXX", ;
      Enabled = .F.

  Add Object txtsoyadi As myTextBox With ;
      Top = 412, ;
      left = 110, ;
      Width = 150, ;
      InputMask = "XXXXXXXXXXXXXXXXXXXX", ;
      Enabled = .F.

  Add Object txtfirma As myTextBox With ;
      Top = 437, ;
      left = 110, ;
      Width = 150, ;
      InputMask = "XXXXXXXXXXXXXXXXXXXX", ;
      Enabled = .F.

  ADD OBJECT txtfirma1 AS combobox WITH ;
      Top = 437, ;
      left = 270, ;
      Width = 150, ;   
      rowsourcetype=2,;
      rowsource="vekalet.firmaadi,no,ilgili",;
      boundcolumn=3,;
      columncount=3,;
      columnwidths="250,60,150",;
      Enabled = .F.
* ALT *



             
   Add Object cmdNew as CommandButton With ;
        Top = 2, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Yeni Kayıt', ;
        Enabled = .t.

    Add Object cmdSave as CommandButton With ;
        Top = 2, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Sakla', ;
        Visible = .f.

    Add Object cmdSave2 as CommandButton With ;
        Top = 2, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Sakla', ;
        Visible = .f.
       
    Add Object cmdEdit as CommandButton With ;
        Top = 32, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Düzelt', ;
        Enabled = .t.

    Add Object cmdCancel as CommandButton With ;
        Top = 32, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Vazgeç', ;
        Visible = .f.

    Add Object cmdUpdate as CommandButton With ;
        Top = 32, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Sakla', ;
        Visible = .f.

    Add Object cmdDelete as CommandButton With ;
        Top = 62, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Sil', ;
        Enabled = .t.

    Add Object cmdprint as CommandButton With ;
        Top = 92, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Vekalet Yazdır'

    Add Object cmdClose as CommandButton With ;
        Top = 122, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Kapat'



    Add Object cmdkodu as CommandButton With ;
        Top = 182, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Sıra-Sırala'

    Add Object cmdadi as CommandButton With ;
        Top = 212, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Adı-Sırala'

    Add Object cmdtarih as CommandButton With ;
        Top = 242, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Tarih-Sırala'


* ALT *
   Add Object cmdNew_2 as CommandButton With ;
        Top = 390, ;
        Left = 495, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Yeni Kayıt', ;
        Enabled = .t.

    Add Object cmdSave_2 as CommandButton With ;
        Top = 390, ;
        Left = 495, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Sakla', ;
        Visible = .f.

    Add Object cmdSave2_2 as CommandButton With ;
        Top = 390, ;
        Left = 495, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Sakla', ;
        Visible = .f.   

    Add Object cmdEdit_2 as CommandButton With ;
        Top = 420, ;
        Left = 495, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Düzelt', ;
        Enabled = .t.

    Add Object cmdCancel_2 as CommandButton With ;
        Top = 420, ;
        Left = 495, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Vazgeç', ;
        Visible = .f.   
       
    Add Object cmdDelete_2 as CommandButton With ;
        Top = 390, ;
        Left = 595, ;
        Height = 27, ;
        Width = 84, ;
        Caption = 'Sil', ;
        Enabled = .t.                 
* ALT *


    Add Object grdListe  as myGrid
    Add Object grdListe2 as myGrid2


    Procedure cmdNew.Click
        ppNew()
    EndProc

    Procedure cmdSave.Click
        ppSave()
    EndProc

    Procedure cmdSave2.Click
        ppSave2()
    EndProc

    Procedure cmdCancel.Click
        ppCancel()
    EndProc     

    Procedure cmdEdit.Click
        ppEdit()
    EndProc

    Procedure cmdDelete.Click
        ppDelete()
    EndProc   
   
    Procedure cmdClose.Click
*        CLOSE ALL   
        thisform.Release
    EndProc

    Procedure cmdkodu.Click
        ppkodu()
    EndProc   

    Procedure cmdadi.Click
        ppadi()
    EndProc   

    Procedure cmdtarih.Click
        pptarih()
    EndProc   

    Procedure cmdprint.Click
        ppPrint()
    EndProc


* ALT *
    Procedure cmdNew_2.Click
        ppNew_2()
    EndProc

    Procedure cmdSave_2.Click
        ppSave_2()
    EndProc

    Procedure cmdSave2_2.Click
        ppSave2_2()
    EndProc

    Procedure cmdCancel_2.Click
        ppCancel_2()
    EndProc     

    Procedure cmdEdit_2.Click
        ppEdit_2()
    EndProc

    Procedure cmdDelete_2.Click
        ppDelete_2()
    EndProc
* ALT *
     
  Procedure Load
    SET TALK OFF
    SET NOTIFY OFF
    SET DELE ON
    SET ESCAPE  OFF
    SET ECHO    OFF
    SET TALK    OFF
    SET DATE TO BRITI
    SET CENT ON
    set safe off
    PUBLIC re1

     SELE 2
     USE vekale INDEX vekale2,vekale1

     SELE 1
     USE vekalet INDEX vekalet3,vekalet1,vekalet2
     
     GO TOP
     REPLA gun WITH DATE()-tarih ALL
     GO TOP


  Endproc


Enddefine
******************************************************************
Define Class myTextBox as TextBox
******************************************************************
    Enabled = .f.
    DisabledForeColor = Rgb(0,0,0)
    SelectOnEntry = .t.
EndDefine

******************************************************************
Procedure ppNew
******************************************************************
    With oForm
*        APPEND BLANK
        .txtNo.Enabled         = .t.
        .txtNo.Value         = 0
        .txtfirmaadi.Enabled     = .t.
        .txtfirmaadi.Value         = SPACE(20)
        .txtilgili.Enabled     = .t.
        .txtilgili.Value         = SPACE(20)
        .txttelefon.Enabled     = .t.
        .txttelefon.Value     = SPACE(15)
        .txttarih.Enabled     = .t.
        .txttarih.Value     = CTOD("  /  /    ")       

        .cmdNew.Visible = .f.
        .cmdSave.Visible = .t.
        .cmdCancel.Visible = .t.       
        .cmdEdit.Visible = .f.
        .cmdDelete.Visible = .f.
        .cmdClose.Visible = .f.                       
        .cmdkodu.Visible = .f.
        .cmdadi.Visible = .f.
*        .grdListe.Enabled = .f.
        .txtNo.SetFocus()
    EndWith
EndProc


******************************************************************
Procedure ppNew_2
******************************************************************
    With oForm
        .txtadi.Enabled     = .t.
        .txtadi.Value         = SPACE(20)
        .txtsoyadi.Enabled     = .t.
        .txtsoyadi.Value     = SPACE(20)
        .txtfirma.Enabled     = .f.
        .txtfirma.Value     = SPACE(20)
        .txtfirma1.Enabled     = .t.

        .cmdNew_2.Visible = .f.
        .cmdSave_2.Visible = .t.
        .cmdCancel_2.Visible = .t.       
        .cmdEdit_2.Visible = .f.
        .cmdDelete_2.Visible = .f.
        .cmdClose.Visible = .f.                       
        .txtNo.SetFocus()
    EndWith
EndProc

******************************************************************
Procedure ppSave
******************************************************************
    With oForm
      SELE 1
     sakla1=RECNO()
        If .txtNo.Value > 0
         SET ORDER TO 2
         SEEK .txtNo.Value

          IF FOUND()
           MessageBox('Aynı Numaralı'+Chr(13)+'Kayıt Mevcut', 'Uyarı !!!!!')

          ELSE
           APPEND BLANK
           REPLA no          WITH .txtNo.Value 
           REPLA firmaadi     WITH .txtfirmaAdi.Value 
           REPLA ilgili     WITH .txtilgili.Value 
           REPLA telefon     WITH .txttelefon.Value
           REPLA tarih        WITH .txttarih.Value

          ENDIF
        EndIf

        SET ORDER TO 1

        .txtNo.Enabled = .f.
        .txtfirmaAdi.Enabled = .f.
        .txtilgili.Enabled = .f.
        .txttelefon.Enabled = .f.
        .txttarih.Enabled = .f.
       
        .cmdNew.Visible = .t.
        .cmdSave.Visible = .f.
        .cmdCancel.Visible = .f.       
        .cmdEdit.Visible = .t.
        .cmdDelete.Visible = .t.
        .cmdClose.Visible = .t.                       
        .cmdkodu.Visible = .t.
        .cmdadi.Visible = .t.


        .grdListe.Refresh()
        .grdListe.SetFocus()
       
    EndWith
EndProc

******************************************************************
Procedure ppSave_2
******************************************************************
    With oForm
            SELE 1
            sakla1=no
            sakla2=firmaadi
            sakla3=telefon
            sakla4=tarih
            sakla5=ilgili
     SELE 2
        If .txtadi.Value <> SPACE(20) .AND. .txtsoyadi.Value <> SPACE(20)
           APPEND BLANK
           REPLA adi         WITH .txtadi.Value 
           REPLA soyadi     WITH .txtsoyadi.Value

           REPLA no            WITH sakla1
           REPLA firmaadi    WITH sakla2
           REPLA telefon    WITH sakla3
           REPLA tarih        WITH sakla4
           REPLA ilgili    WITH sakla5
        EndIf

        .txtadi.Enabled = .f.
        .txtsoyadi.Enabled = .f.
        .txtfirma.Enabled = .f.
       
        .cmdNew_2.Visible = .t.
        .cmdSave_2.Visible = .f.
        .cmdCancel_2.Visible = .f.       
        .cmdEdit_2.Visible = .t.
        .cmdDelete_2.Visible = .t.
        .cmdClose.Visible = .t.                       
*        .cmdkodu.Visible = .t.
*        .cmdadi.Visible = .t.


        .grdListe2.Refresh()
        .grdListe2.SetFocus()
       
    EndWith
EndProc

******************************************************************
Procedure ppSave2
******************************************************************
    With oForm
     SELE 1
           REPLA ilgili     WITH .txtilgili.Value 
           REPLA firmaadi     WITH .txtfirmaAdi.Value 
           REPLA telefon     WITH .txttelefon.Value
           REPLA tarih        WITH .txttarih.Value

        .txtNo.Enabled = .f.
        .txtilgili.Enabled = .f.
        .txtfirmaAdi.Enabled = .f.
        .txttelefon.Enabled = .f.
        .txttarih.Enabled = .f.

         .cmdNew.Visible = .t.
         .cmdSave2.Visible = .f.
         .cmdCancel.Visible = .f.       
         .cmdEdit.Visible = .t.
         .cmdDelete.Visible = .t.
         .cmdClose.Visible = .t.                       
         .cmdkodu.Visible = .t.
         .cmdadi.Visible = .t.

         .grdListe.Refresh()
         .grdListe.SetFocus()
       
    EndWith
EndProc

******************************************************************
Procedure ppSave2_2
******************************************************************
    With oForm
            SELE 1
            sakla1=no
            sakla2=firmaadi
            sakla3=telefon
            sakla4=tarih
            sakla5=ilgili
     SELE 2
*         REPLA no  WITH .txtNo.Value 
           REPLA adi         WITH .txtadi.Value 
           REPLA soyadi     WITH .txtsoyadi.Value
*           REPLA firma        WITH .txtfirma.Value

           REPLA no            WITH sakla1
           REPLA firmaadi    WITH sakla2
           REPLA telefon    WITH sakla3
           REPLA tarih        WITH sakla4
           REPLA ilgili    WITH sakla5
*           REPLA sifre    WITH .txtSifre.Value

        .txtadi.Enabled = .f.
        .txtsoyadi.Enabled = .f.
        .txtfirma.Enabled = .f.



           
         .cmdNew_2.Visible = .t.
         .cmdSave2_2.Visible = .f.
         .cmdCancel_2.Visible = .f.       
         .cmdEdit_2.Visible = .t.
         .cmdDelete_2.Visible = .t.
         .cmdClose.Visible = .t.                       

         .grdListe2.Refresh()
         .grdListe2.SetFocus()
       
    EndWith
EndProc

******************************************************************
Procedure ppCancel
******************************************************************
    With oForm

        .txtNo.Enabled = .f.
        .txtilgili.Enabled = .f.
        .txtfirmaAdi.Enabled = .f.
        .txttelefon.Enabled = .f.
        .txttarih.Enabled = .f.

        .cmdNew.Visible = .t.
        .cmdSave.Visible = .f.
        .cmdSave2.Visible = .f.
        .cmdCancel.Visible = .f.       
        .cmdEdit.Visible = .t.
        .cmdDelete.Visible = .t.
        .cmdClose.Visible = .t.                       
        .cmdkodu.Visible = .t.
        .cmdadi.Visible = .t.

        .grdListe.Refresh()
        .grdListe.SetFocus()
       
    EndWith
EndProc

******************************************************************
Procedure ppCancel_2
******************************************************************
    With oForm

        .txtadi.Enabled = .f.
        .txtsoyadi.Enabled = .f.
        .txtfirma.Enabled = .f.

        .cmdNew_2.Visible = .t.
        .cmdSave_2.Visible = .f.
        .cmdSave2_2.Visible = .f.
        .cmdCancel_2.Visible = .f.       
        .cmdEdit_2.Visible = .t.
        .cmdDelete_2.Visible = .t.
        .cmdClose.Visible = .t.                       

        .grdListe2.Refresh()
        .grdListe2.SetFocus()
       
    EndWith
EndProc

******************************************************************
Procedure ppEdit
******************************************************************
    With oForm
     SELE 1
        .txtNo.Enabled             = .f.
        .txtNo.Value             = no
        .txtilgili.Enabled     = .t.
        .txtilgili.Value         = ilgili
        .txtfirmaAdi.Enabled     = .t.
        .txtfirmaAdi.Value         = firmaadi
        .txttelefon.Enabled     = .t.
        .txttelefon.Value         = telefon
        .txttarih.Enabled         = .t.
        .txttarih.Value         = tarih

        .cmdNew.Visible = .f.
        .cmdSave2.Visible = .t.
        .cmdCancel.Visible = .t.       
        .cmdEdit.Visible = .f.
        .cmdDelete.Visible = .f.
        .cmdClose.Visible = .f.                       
        .cmdkodu.Visible = .f.
        .cmdadi.Visible = .f.
        .txtfirmaAdi.SetFocus()
    EndWith
EndProc

******************************************************************
Procedure ppEdit_2
******************************************************************
    With oForm

     SELE 2
        .txtadi.Enabled     = .t.
        .txtadi.Value         = adi
        .txtsoyadi.Enabled     = .t.
        .txtsoyadi.Value     = soyadi
        .txtfirma.Enabled     = .f.
        .txtfirma.Value     = firmaadi
        .txtfirma1.Enabled     = .t.


        .cmdNew_2.Visible = .f.
        .cmdSave2_2.Visible = .t.
        .cmdCancel_2.Visible = .t.       
        .cmdEdit_2.Visible = .f.
        .cmdDelete_2.Visible = .f.
        .cmdClose.Visible = .f.                       
        .txtfirmaAdi.SetFocus()
    EndWith
EndProc

******************************************************************
Procedure ppDelete
******************************************************************
    With oForm
     SELE 1
*        If .tnHandle > 0
            m.lnResult = MessageBox('Silmek istediğinize'+Chr(13)+'eminmisiniz?', ;
                4+32+256, 'Silme Onayı')
            If lnResult = 6
               DELE
               MessageBox('Silme işlemi'+Chr(13)+'başarıyla tamamlandı', 64, 'Silme Onayı')

                .grdListe.Refresh()
                .grdListe.SetFocus()
            EndIf
*        EndIf
    EndWith
EndProc

******************************************************************
Procedure ppDelete_2
******************************************************************
    With oForm
     SELE 2
*        If .tnHandle > 0
            m.lnResult = MessageBox('Silmek istediğinize'+Chr(13)+'eminmisiniz?', ;
                4+32+256, 'Silme Onayı')
            If lnResult = 6
               DELE
               MessageBox('Silme işlemi'+Chr(13)+'başarıyla tamamlandı', 64, 'Silme Onayı')

                .grdListe2.Refresh()
                .grdListe2.SetFocus()
            EndIf
*        EndIf
    EndWith
EndProc

******************************************************************
Procedure ppkodu
******************************************************************
    With oForm
         SELE 1
         SET ORDER TO 2
         GO TOP
        .grdListe.Refresh()
        .grdListe.SetFocus()
    EndWith
EndProc

******************************************************************
Procedure ppadi
******************************************************************
    With oForm
         SELE 1
         SET ORDER TO 3
         GO TOP
        .grdListe.Refresh()
        .grdListe.SetFocus()
    EndWith
EndProc

******************************************************************
Procedure pptarih
******************************************************************
    With oForm
         SELE 1
         SET ORDER TO 1
         GO TOP
        .grdListe.Refresh()
        .grdListe.SetFocus()
    EndWith
EndProc

******************************************************************
Procedure ppprint
******************************************************************
    With oForm

          IF .txtNo.Value > 0
             yazdir = STR(.txtNo.Value)+"-1.JPG"

                   SET CONSOLE OFF
                   SET CONSOLE OFF
                   SET DEVICE TO PRINTER
                        REPORT FORM VEKALE PREVIEW NOCONSOLE
                   SET PRINTER TO
                   SET DEVICE TO SCREEN
                   SET PRINTER OFF
                   SET CONSOLE ON


          ELSE
            MessageBox('Önce FİRMA SEÇİMİ '+Chr(13)+'Yapınız !!!',48, 'Önce FİRMA SEÇİMİ Yapınız !!!')
          ENDIF

    EndWith
EndProc


******************************************************************
Define Class myGrid as Grid
******************************************************************
    Top = 135
    Left = 2
    Height = 238
    Width = 554
    ColumnCount = 6
    DeleteMark = .F.
    RecordMark = .t.
    ReadOnly = .T.
    RecordSource = "vekalet"
    ScrollBars = 2
    GridLineColor = Rgb(192,192,192)
   
    Procedure Init
        With this

            .Column1.Header1.Caption = 'Sıra'
            .Column1.Width = 30       
            .Column1.ControlSource = "vekalet.no"
            .Column1.dynamicForecolor =  "IIF(gun>0, RGB(255,0,0), RGB(0,0,0))"
           
            .Column2.Header1.Caption = 'Firma Adı'
            .Column2.Width = 150       
            .Column2.ControlSource = "vekalet.firmaadi"
            .Column2.dynamicForecolor =  "IIF(gun>0, RGB(255,0,0), RGB(0,0,0))"

            .Column3.Header1.Caption = 'İlgili Adı'
            .Column3.Width = 150       
            .Column3.ControlSource = "vekalet.ilgili"
            .Column3.dynamicForecolor =  "IIF(gun>0, RGB(255,0,0), RGB(0,0,0))"

            .Column4.Header1.Caption = 'Telefon'
            .Column4.Width = 120       
            .Column4.ControlSource = "vekalet.telefon"
            .Column4.dynamicForecolor =  "IIF(gun>0, RGB(255,0,0), RGB(0,0,0))"

            .Column5.Header1.Caption = 'Bitiş Tarihi'
            .Column5.Width = 70       
            .Column5.ControlSource = "vekalet.tarih"
            .Column5.dynamicForecolor =  "IIF(gun>0, RGB(255,0,0), RGB(0,0,0))"
           
            .Column6.Header1.Caption = 'Kalan'
            .Column6.Width = 40       
            .Column6.ControlSource = "vekalet.gun"
            .Column6.dynamicForecolor =  "IIF(gun>0, RGB(255,0,0), RGB(0,0,0))"

        EndWith
    this.SetAll('Enabled',.f.,'textbox')
    this.SetAll('DisabledForeColor',0,'textbox')

    EndProc
   
    Procedure AfterRowColChange
        Lparameters nColIndex
        DoDefault(nColIndex)
        With oForm

             SELE 1
            .txtno.Value         = No
            .txtfirmaadi.Value    = firmaadi
            .txtilgili.Value    = ilgili
            .txttelefon.Value     = telefon
            .txttarih.Value     = tarih

           Thisform.txtNo.Value=no

            SELE 2
            SET ORDER TO 1
            SEEK .txtfirmaadi.Value

            .grdListe2.Refresh()
            .grdListe2.SetFocus()


        .image2.Visible = .t.       

        EndWith
       Thisform.Refresh()
    EndProc
EndDefine


******************************************************************
Define Class myGrid2 as Grid
******************************************************************
*    Top = 62
    Top = 470
    Left = 2
    Height = 238
    Width = 633
    ColumnCount = 4
    DeleteMark = .F.
    RecordMark = .t.
    ReadOnly = .T.
    RecordSource = "vekale"
    ScrollBars = 3
    GridLineColor = Rgb(192,192,192)
   
 
    Procedure Init
        With this

            .Column1.Header1.Caption = 'Personel Adı'
            .Column1.Width = 150       
            .Column1.ControlSource = "vekale.adi"

            .Column2.Header1.Caption = 'Personel Soyadı'
            .Column2.Width = 150       
            .Column2.ControlSource = "vekale.soyadi"

            .Column3.Header1.Caption = 'Firma Adı'
            .Column3.Width = 150       
            .Column3.ControlSource = "vekale.firmaadi"

            .Column4.Header1.Caption = 'İlgili Adı'
            .Column4.Width = 150       
            .Column4.ControlSource = "vekale.ilgili"

        EndWith
    this.SetAll('Enabled',.f.,'textbox')
    this.SetAll('DisabledForeColor',0,'textbox')

    EndProc
   
    Procedure AfterRowColChange
        Lparameters nColIndex
        DoDefault(nColIndex)
        With oForm
            .txtfirma.Value        = firmaadi
            .txtadi.Value         = adi
            .txtsoyadi.Value     = soyadi
            .txtilgili.Value     = ilgili

        .image2.Visible = .t.       

        EndWith
       Thisform.Refresh()
    EndProc
EndDefine


PROCEDURE HATA
*? ERROR()
*? MESSAGE()
*WAIT
RETURN

9 Son düzenleyen, cetinbasoz (16.12.2010 11:31:41)

Re: Picture = STR(.txtNo.Value)+"-1.JPG" , ;

Calistiramayacagim kodu incelemek gibi bir huyum yok. Soruyu anlamak cok zor. Burada ornek var ona bak:

http://www.universalthread.com/ViewPage … 6254413D3D

10 Son düzenleyen, onders (16.12.2010 16:08:58)

Re: Picture = STR(.txtNo.Value)+"-1.JPG" , ;

oraya (GRID KISMINA) bir kontrol koydum.
"1-1.jpg"
"2-1.jpg"
"3-1.jpg"

değerlerini oluşturuyor. Ama progamın :

Visual Fox Pro
ADD OBJECT image2 AS image WITH ;

        Anchor = 15, ;
        Stretch = 2, ;
        Left = 700, ;
        Top =  9, ;
        Height = 770, ;
        Width = 640, ;
        Name = "Image2"
 
 
          PROCEDURE Image2.Init
                     this.Picture = ALLTRIM(STR(thisform.txtNo.Value))+"-1.JPG" 
          ENDPROC
 
Procedure txtNo.LostFocus
        thisform.Image2.Picture = STR(this.Value)+"-1.JPG" 
endproc

kısmında bir sorun olmalı. Çünkü 

Visual Fox Pro
PROCEDURE txtNo.Init

                   SELE 1
                   Thisform.txtNo.Value=no
          ENDPROC

program  başlaken ilk değeri dosyadan okuyor. sonra okuduğu değerin karşılığı olan JPG dosyayı ekranda gösterremiyor.

Benim düşüncem Grid kısmında değer ataması yapılırken ifade

Visual Fox Pro
thisform.txtNo.Value = NO

veya
.txtNo.Value = NO

dişında bir kodla okutulmalı ?

İlgine teşekkürler Gürkan

11

Re: Picture = STR(.txtNo.Value)+"-1.JPG" , ;

Visual Fox Pro
Procedure AfterRowColChange 

        Lparameters nColIndex
* ...
            .grdListe2.SetFocus()
 
        .image2.Picture = ALLTRIM(STR(thisform.txtNo.Value))+"-1.JPG"
 
        .image2.Visible = .t.       
* ...

12 Son düzenleyen, onders (17.12.2010 15:21:32)

Re: Picture = STR(.txtNo.Value)+"-1.JPG" , ;

Teşekkürler Çetin.

Son gönderdiğin düzeltmeden sonra

Program sorunsuz olarak çalışıyor.