Author Topic: include file  (Read 626 times)

0 Members and 1 Guest are viewing this topic.

Offline cgunawan

  • Newbie
  • *
  • Posts: 15
include file
« on: January 16, 2018, 12:28:31 PM »
Siang rekan-rekan,

saya mau tnya nih.

gimana cara ny spy #include <filename> bs di jlnkan di form?

di form load sy tulis
#INCLUDE "test.h"

saat mau di save error  "missing #ENDIF

kira2 knp ya?

Thanks & Regards,
Christian

Offline foxy

  • Fox-id M.V.P
  • Hero Member
  • *
  • Posts: 3.605
    • Foxy Land
Re: include file
« Reply #1 on: January 16, 2018, 02:37:19 PM »
ya, isi test.h nya apa? missing #endif nya ada di sono
This post is provided as is. Feel free to use all the codes and information, however understand that I don't have any obligations to fix any bug(s) or follow up this subject.

Offline cgunawan

  • Newbie
  • *
  • Posts: 15
Re: include file
« Reply #2 on: January 16, 2018, 03:14:27 PM »
kang Foxy,
isi test.h adalah define dan bbrp function.

sy cb pindahkan isi form.load ke file prg. dan jlnkan tdk error. outpunya keluar.

1 lg nh kang, d luar pertanyaan di atas.

bagaiman cr nya spy #define dan declare yg sy tulis di form.load bs terbaca di button1.click?

contoh  di form.load
==============

#DEFINE GENERIC_READ     2147483648
#DEFINE GENERIC_WRITE     1073741824
#DEFINE INTERNET_INVALID_PORT_NUMBER 0
#DEFINE INTERNET_OPEN_TYPE_DIRECT  1
#DEFINE INTERNET_OPEN_TYPE_PROXY  3
#DEFINE INTERNET_DEFAULT_FTP_PORT  21
#DEFINE INTERNET_FLAG_ASYNC    268435456
#DEFINE INTERNET_FLAG_FROM_CACHE  16777216
#DEFINE INTERNET_FLAG_OFFLINE   16777216
#DEFINE INTERNET_FLAG_CACHE_IF_NET_FAIL 65536
#DEFINE INTERNET_OPEN_TYPE_PRECONFIG 0
#DEFINE FTP_TRANSFER_TYPE_ASCII   1
#DEFINE FTP_TRANSFER_TYPE_BINARY  2
#DEFINE INTERNET_SERVICE_FTP   1
#DEFINE INTERNET_SERVICE_GOPHER   2
#DEFINE INTERNET_SERVICE_HTTP   3
#DEFINE FILE_ATTRIBUTE_NORMAL   128


DECLARE INTEGER InternetOpen IN WININET.DLL;
 STRING  sAgent,;
 INTEGER lAccessType,;
 STRING  sProxyName,;
 STRING  sProxyBypass,;
 STRING  lFlags

di button1.click()
===========
sAgent = "vfp6"
sProxyName = CHR(0)
sProxyBypass = CHR(0)
lFlags = 0
hOpen = InternetOpen (sAgent, INTERNET_OPEN_TYPE_DIRECT, sProxyName, sProxyBypass, lFlags)


saat run mncul error "variable INTERNET_OPEN_TYPE_DIRECT tidak di kenali"

tks byk atas bantuannya


Offline foxy

  • Fox-id M.V.P
  • Hero Member
  • *
  • Posts: 3.605
    • Foxy Land
Re: include file
« Reply #3 on: January 16, 2018, 07:43:40 PM »
monggo dibaca lagi help file VFP pak....


Jadi jawabannya: it is by design alias udah dari sononya begono pak....  :icon_biggrin:

(maka nya disediakan directive include; jadi constant itu bisa di define di file .h, lalu di "include" di form/class)

hth,
foxy
This post is provided as is. Feel free to use all the codes and information, however understand that I don't have any obligations to fix any bug(s) or follow up this subject.

Offline cgunawan

  • Newbie
  • *
  • Posts: 15
Re: include file
« Reply #4 on: January 18, 2018, 12:25:24 PM »
tks byk kang atas info nya..

Offline jihin

  • Full Member
  • *
  • Posts: 68
Re: include file
« Reply #5 on: January 19, 2018, 01:35:02 AM »
untuk include file bisa terbaca di seluruh elemen from, include filenya di masukan di menu form - include file

semoga bisa membantu.

s