Import from csv to dbf
Hi All,
Did anybdoy created a code that can import the specific fields from a CSV
file? I may need to deal with 8GB of csv files and I would rather import
fileds to several tables for normaliztion purpose as well.
Thanks,
Joe Tag: sound Tag: 241334
Saving preferences for .PRG editing
I have had trouble with this for quite a while VFP6 - VFP9. I want to set
editing preferences on .TXT and .PRG files such that when I open one to edit,
it will inherit the conditions specified in the dialog. I am using a
resource file (foxuser) and if I set the preferences on an individual file,
they are retained. I would rather not set every file in a type but rather
set defaults for that file type. I've clicked save preferences and Apply to
.PRG files but no matter what I do I can't make this global. Can anyone help
with this? Do I need to manually edit the foxuser file? Tag: sound Tag: 241333
Can I put a control on a VFP form that will display a JPG?
Any version of VFP including 9.0. I want to catalogue and manipulate
collections of JPGs using VFP. Flag for deletion, name change, possibly
other things. It's important to be able to have a good look at the JPGs,
and it would be convenient if I could resize them in doing so.
Dan Tag: sound Tag: 241328
SET NULL ON does not work with views
I have a case in which I want to create a non-updating view in which certain
fields should accept nulls, even though the corresponding fields in the
source table do not accept nulls.
It seems to me that SET NULL ON prior to creating the view ought to do the
trick, but it does not. I have to resort to using CAST or other tricks. Am I
misunderstanding the use of SET NULL? Tag: sound Tag: 241323
From Excel to VFP9 SP2
I am trying to import an Excel worksheet into VFP9 with the command "IMPORT
FROM xxx-sheet TYPE xls", but since my worksheet is in the format of Excel
2003, I get the error message "Microsoft Excel file format in invalid". The
same thing happens when worksheet was created with Excel 2007. It works fine
if sheet is saved in Excel 5.0/95 format. I don't want to open each Excel
file and have it saved with a "lower" format. How can I import from newer
Excel formats, such as 2003 or 2007 ? Tag: sound Tag: 241322
VFP9 Word 2003 merge problem
I have some code that merges data into a Word merge document and prints it
automatically. It works great on pcs with Word 2000. However my client has
some pcs with Word 2003 and although the code runs through with no errors,
gobbledygook prints where the merge fields are supposed to be.
Any clues as to how I fix this? I'm going to try getting them to save
separate versions of the merge documents in Word 2003 but I wondered if
there's any other suggestions. Shoulf the automation code work no matter
what version of Word the user has? I've posted some sample code below.
Regards,
Bernie Beattie
*******Sample code**********
local loword, lcfile, lcdatafile, lodoc, lodocactive, llerror, lcprinter
* Get user's choice of printer
lcPrinter = GETPRINTER()
IF EMPTY(lcPrinter)
WAIT WINDOW "no printer"
RETURN .F.
ENDIF
SET PRINTER TO NAME (lcPrinter)
TRY
loWord = CREATEOBJECT("word.application")
CATCH
WAIT WINDOW "word not instantiated"
llerror=.t.
ENDTRY
IF NOT llerror
* Now try to open the document
lcFile = "c:\cast\test2.doc"
TRY
loDoc = loWord.Documents.Open(lcFile)
CATCH
WAIT WINDOW "file not opened"
llerror=.t.
ENDTRY
ENDIF
lcDatafile = "c:\cast\data.txt"
IF NOT llerror
TRY
* Attach the data source
loDoc.MailMerge.OpenDataSource(lcDataFile)
* Run the mailmerge
loDoc.Mailmerge.Destination = 0 && send mailmerge to a new doc
loDoc.Mailmerge.Execute
* The mailmerge doc is now the active doc
loDocactive = loWord.ActiveDocument
* Go ahead and print it
loWord.ActivePrinter = lcPrinter
loDocactive.Printout()
CATCH TO loError
WAIT WINDOW "file not printed"
ENDTRY
ENDIF
* Close both documents (without prompting to save changes)
loDoc.Close(0)
loDocactive.Close(0) Tag: sound Tag: 241316
How to tell if an app is running.
Hi All. I am looking at integrating x-charge for credit card authorization.
It uses a simple call to it's exe along with some parameters. It's only
requirement is that you cannot have another session running. (VFP will hang
if it is) Is there a way to test to see if "xcharge.exe" is currently running?
TIA
Mike Tag: sound Tag: 241300
Storing a table in the exe
I want to include a free table as a read-only file within the exe. It has an
FPT file associated with it. Do I need to add the FPT file to the project,
or is vfp intelligent enough to include it if I simply add the .DBF file and
mark as Include. I note that I only have to include the DBC for the views
dbc rather than the DBT file as well, so presume it is the same for a table?
Sincerely
Stephen Tag: sound Tag: 241297
SET SKIP TO
Hi all,
I have 2 tables both with So_No field and index tag So_No.
1 is the Master file and the other is secondary table. Both have
duplicate or more records with the same So_No.
I have set the Master file, and SET RELATION So_No INTO Secondary.
My problem is, there are 2 fields that I need to insert into Master
table.
Example : -
Master File : 4 records of So_No = 1 and empty field of Image_No and
Text
Secondary File 4 records os So_No = 1 and vales of field of Image
and Text (different values).
I want to replace the Master.Image_No and Text with
Secondary.Image_No and Text.
Thanks.
Maxman Tag: sound Tag: 241296
True VFP multi-threading (MTmyVFP3)
A new version of MTmyVFP (True VFP multi-threading) using Calvin Hsia's
latest MT class including a few tweaks:
http://www.codeplex.com/mtmyvfp
There's still room for improvement, though. Instead of a count-down while
the thread(s) is going, a nice Progress bar like the one in VFPX could
probably be used. Also, it probably wouldn't take much to make this backward
compatible to VFP7. However I'll leave these improvements to others.
Calvin Hsia's original source and background info:
http://blogs.msdn.com/calvin_hsia/archive/2006/05/23/605465.aspx Tag: sound Tag: 241295
It's All Too Much
Hello and thanks for the help.
It has just dawned on me that I need a database of my forms, prgs, classes,
projects, etc.
I am a one man shop and I have this problem so I imagine that larger shops
have it worse than I do and I'm sure that someone must have solved the
problem.
What I'm dealing with is not being able to remember the name of the form,
program, report, project, class, etc. that I'm looking for even though I use
fairly descriptive names.
Is there a feature of VFP that I'm not using that would help me with this?
Is there some other tool that some of you are using to catalog your
development?
I don't think I need a VCS. The ones that I've looked at are more oriented
to managing versions and not cataloging software.
What, if anything, are you doing if you have a large number of code files
that you need to organize?
Thanks,
Jeff Tag: sound Tag: 241290
Modified Structure of DBF file
Hello,
I modified Structure of a DBF table by changing names of a few fields or
changing field type from Currency to Number for a few fields, the sequence of
fields was not changed. However as I browse the table the name changed fields
and Type changed fields are visible on the right. Their position is right as
previously if I see the structure by "Modify Structure", however visually in
browse mode the modified fields are visible on right.
I will look forward to your guidance for resetting the view to normal, so
that the fields appear in the same sequence in browse mode as in the Modify
structure mode.
With Rgards
S Bans Tag: sound Tag: 241282
Multiple monitor support
Trying to write a custom presentation application..
In a dual or multiple monitor system,
is it possible to direct a form to a specific monitor at runtime?
Any help appreciated
John Davy Tag: sound Tag: 241279
SQL Calling Methods
I am doing some grouping in SQL with the grouping determined by a
method call (because the grouping is user-defined and quite
arbitrary). So far, so good. Are there any pitfalls that I need to
watch for?
I do not need to do this, but is it still dangerous to move a
table pointer even if one restores it?
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices. Tag: sound Tag: 241275
CDO logs?
I am using CDO to send mail. Does anyone know the default mail server it
uses? Is there a log file associated with the messages? All of the mail I
sent is HTML and upon delivery a few of the href links are getting a blank
space before a character and an exclamation point after which breaks the
link. I notices this occurring after a K9 and a D3 combination. I am trying
to pinpoint where this is breaking. I did keep a text file of the html
messages that were sent and the characters in the text file are fine. I
would like to see the actual message as it went out. Tag: sound Tag: 241269
Visual Fox Pro 9 - Text is messed up.
I am trying to help a friend who is a developer. She is on version 9,
and has service pack 2. She is running on Vista. Any way her text on
the screen looked like it was "melting" for lack of a better term.
I've had her run a virus scan. It had none. The text on the left
side of the screen is fine, as the text goes across the screen it
droops lower on the screen. This is true of menus as well. Any help?
Thanks.
Lee Tag: sound Tag: 241264
progress bar
Hi
I have a large app with lots of pictures and pages. It takes 10 -15 seconds
to be visible. To keep users from clicking and clicking, I want to display a
progress bar.
My problem is if I run the program for the progress bar at start, the form
still doesn't show (10-15 sec) until after the progress bar is done.
How can I run both at the same time? I have a start program that calls the
form.
Thanks
Sherry Tag: sound Tag: 241258
Extracting user/password from ODBC *.ODC file?
We have several programs that connect to our backend SQL Server using VFP
6.0 as the front end. In each of these programs, we created a configuration
requirement to enter the ODBC data source name, the username and password
for the SQL connection, all of which is used in the connection string to the
SQL server. In an effort simplify the installation requirements for each
program, it would be nicer if we could just specify the data source name, or
perhaps select the ODBC *.odc file, then have the program itself get the
username/password from the *.odc file. Has anyone ever done this? Can anyone
provide code samples or links to same that would let us parse an *.odc file
or extract the username/password from a configured ODBC connection in VFP
6.0 some other way? Thanks. Tag: sound Tag: 241257
Totals under 500 using SQL
I have a table of donations, all random amounts but each one is under 10.00
I need to create a cursor that aggregates these into totals, each of which
must be under £500. In manual terms, go through the list, adding up each
donation with a calculator until the next donation would take it over £500,
then put the entry into the cursor then continue through the list. The
resulting cursor might have 8 records in it, each with a total of between
490 and 500. As a cherry on the cake it would be nice if the cursor also
showed how many donations had made up each total.
Is there any way these can be done via SQL - at the moment I am disappearing
down a black hole of do while, skips and exits
Sincerely
Stephen Tag: sound Tag: 241256
Embed Acrobat in a Form - DoVerb problems
When doing an AddObject with an olecontrol and I use the Acrobat reader so
that it is embedded in my form something strange has occurred. For some
reason, I cannot type in textboxes and I cannot type in combo boxes. I can
select using the down arrow of a combo box but I can't seem to typed. Is as
if the olecontrol as somehow locked the form. In fact, even if I place a
different form over that form and it is covering the Acrobat ole object, it
seems to disable the textboxes until I move the second form.
Has anyone else experienced anything like this with any OLE objects? I'm
still using VFP 6/sp3. Is there anything I can do or set or change so that
this does not happen? Perhaps there is another way to embed an acrobat
object in a form not using doverb or maybe some other way?
Thanks,
Mike Tag: sound Tag: 241243
VFP9: Parsing a String
Is there a function for parsing a comma-delimited string into an
array of substrings? I thought there was, but I can not find it in
the docs.
Example: "abc,,def,ghi," would return an array of elements:
"abc"
""
"def"
"ghi"
""
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices. Tag: sound Tag: 241242
padl() gaff refresher needed
I know I'm supposed to use transform(nVar, "@L 99") to turn 1 into "01"
instead of padl(nVar, 2, '0') .... but I just ran into "1." and I don't
remember what setting causes the padl() idea to fail.
Please remind me. Tag: sound Tag: 241239
Date field update
Sir,
I have a table with 2 fields as data type date.
I have to append the records from text file with date shown in the file as
01-JUN-2008.
I tried different date settings but date fileds are not updated and kept
blank only.
I tried with short date settings in the control panel also. Which shows the
date i want as 01-Jun-2008 but still the fields are not updated & has the
value blank.
This is very unusal as we may require the different date setting during the
programme execution.
Bankim Tag: sound Tag: 241236
Validating a DBC
After opening a DBC I issue:
VALIDATE DATABASE RECOVER
I got the message:
Tag not found (structural CDX). Do you want eliminate it or cancel
validation?
I realize that the father table primary key and a sister table CDX are lost.
How I can by code reindex these tables and rebuild the proper relations and
IR ?
Thanks.
Alejandro Fernandez Tag: sound Tag: 241233
DBC internal consistency error - FP crash
I got this immediately after issuing VALIDATE DATABASE (which reported no
problems). Now in the database designer, all the field names are shown as
"??". Before validating, everything seemed fine. Some "validation"!
Now I cannot get rid of the message, keeps popping up again after I click
OK. Nothing to do but kill FP with the Task Manager. Too bad too, because I
have unsaved changes in a prg file.
If anyone has advice, that's fine, but mostly I'm venting. Dammit!
VFP9SP2 Tag: sound Tag: 241231
Sub classing question (vfp 9 sp1)
I have subclassed all the base classes, and customized some of them.
Based on prior experience, however, it seems that I don't want to
build a new project with this set of classes, but rather, but rather
to sublcass them and create a new base set for the new project.
How do you do this without going one by one?
Thanks Tag: sound Tag: 241223
Local or not Local
There seems to be a gap in the Local implementation in VFP.
Thought it might be worth to share, at least I did not know about
it until Surinder Singh wrote about it in the foxite.com forum.
In VFP9 SP2 the following test indicates that content of a Local
variable declared in the calling procedure is visible for a
modalForm.control.ControlSource although IMO it should not.
Works with an SCX form, too:
* local_or_not_local.prg
LOCAL testLocal
testLocal = "local value"
testUndeclared = "undeclared/private"
LOCAL loForm as Form
loForm = CREATEOBJECT('TestForm')
loForm.Show(1)
Return
DEFINE CLASS TestForm as Form
ADD OBJECT txtTest as Textbox WITH ;
Left = 50, Top = 10, ControlSource = "m.testLocal"
ADD OBJECT cmdTest as CommandButton WITH ;
Left = 50, Top = 50, Height = 24, Caption = "Scope Test"
PROCEDURE cmdTest.Click
MESSAGEBOX( "VARTYPE(m.testLocal): " + VARTYPE(m.testLocal) )
MESSAGEBOX( "VARTYPE(m.testUndeclared): " + VARTYPE(m.testUndeclared) )
ENDPROC
ENDDEFINE
*
Regards
-Stefan Tag: sound Tag: 241213
textbox.nulldisplay is ignored in grid
I can't get textbox.nulldisplay to work if the textbox is in a grid column.
Actually, what I really want is to have column.nulldisplay, or a column
format code that addresses nulls, but there don't seem to be such things. Am
I out of luck? Tag: sound Tag: 241201
Container Toolbar
My boss actually had our container class docked on the toolbar and dropped
the appropriate container into our form.
How did she do this???
PSULionRP Tag: sound Tag: 241196
Copying an Existing Project
Bear with me here...Newbie on board...
What is the best way to copy an existing project in order to create a new
.PJX I have to do??? I want ALL the class libraries to get copied over to
this new project.
Is this done in FoxPro or through Windows Explorer???
Thanks.
PSULionRP Tag: sound Tag: 241191
Corrupted database in vfp 9 sp1
I have a database that is really just a set of definitions for an odbc
connection. That is, it has the connection and a few view
definitions.
If I try to open it, I get a message that it has become corrupted and
must be repaired before using. Unfortunately, since I can't open it,
I'm not quite sure how to go about repairing it! A quick search of
the help didn't turn anything up.
Is it worth worrying about, or is it better to just restore it from
yesterday?
Thanks Tag: sound Tag: 241187
print jpg in app
Hi
I have a very larg application. Looks like a book. Can I create code to
print a jpg when I right click the picture. If so how?
Thanks
Sherry Tag: sound Tag: 241185
New VFP project at Codeplex - DynamicDNS
New Visual Foxpro project at Codeplex called DynamicDNS:
If you've ever been stuck with a dynamic IP and wished you could assign
whatever the IP is to a static name, this may be the solution for you.
Also good examples of foxpro systray, timer, web page crawling and other
goodies.
All source code is included.
http://www.codeplex.com/ddns Tag: sound Tag: 241182
IF AND
Is the IF AND structure in Visual FoxPro valid???
Tell me I don't have to stack them...please...
Thanks in advance.
PSULionRP Tag: sound Tag: 241176
convert text file to unix
Sir,
I have created a text file in upload format with the help of VFP 5.00.
I have used set alternate command for file name.
File contents are generated with ? & ??.
Is the file generated is windows output file or dos output file.
& real need is
how can i convert the file in Unix as in one of the third party application
it requires the file to be in unix mode instead of dos.
Bankim Tag: sound Tag: 241169
Report Writer - Need a Summary at bottom of last page (VFP9.0 sp2)
Hi, I am producing an invoice form that may run into several pages and must
have a single remittance slip at the end of the last page
Is there a way to either make the summary band print at the end of the page,
or to only print the page footer on the last page?
- Or is there a better way?
As usual, any help would be appreciated...
Cheers,
John Davy Tag: sound Tag: 241166
Add Tab to existing Form
Learning by the seat of my pants here.
I have to add a tab to a form that already has a lot of tabs on it. How do I
add a new Tab???
I tried Form ==> New Property but when I added the Property Name it didn't
show up on the Properties.
Can anyone help me and if anyone has a crash course in Microsoft Visual
FoxPro, that would be awesome.
Thanks in advance.
PSULionRP Tag: sound Tag: 241163
copy to .... type and ms Access
Why wouldn't ms access be able to open xls's or dbf's that I create in VFP
via copy to ...type xls or type fox2x ?
--
-Lew
The workers took the robot for Maria. Tag: sound Tag: 241157
Retrieving header and body on server from VFP XMLHTTP post
I want to send data from VFP on the client to VFP on the server using
XMLHTTP. I have found plenty of samples for handling the server side with
PHP, but have not found any asp samples.
Could someone please let me know how I need to change the code in the asp
document to retrieve the header and body received from VFP.
Thanks in advance
John Pugh
Adelaide, South Australia
* VFP prg to test sending to a server and a response
LOCAL lc_body,lc_received,lc_response,lc_status, lc_target_href
LOCAL oHttp AS MSXML2.ServerXMLHTTP
oHttp = CREATEOBJECT('MSXML2.ServerXMLHTTP')
WITH oHttp
lc_target_href="http://localhost/ab5_com.asp"
.OPEN('POST', lc_target_href, 0)
.setRequestHeader('VfpRequest', TRANSFORM(DATETIME()))
* Load data into the body to be transferred
lc_body='this is a dummy XML file'
.SEND(lc_body)
lc_status= .StatusText
lc_response= .GetAllResponseHeaders()
lc_received= .ResponseText
MESSAGEBOX( lc_status,64,'status ')
MESSAGEBOX( lc_response,64,'response ')
MESSAGEBOX( lc_received,64,'received ')
ENDWITH
<% @ Language=VBScript %>
<%
' Title: ab5_com.asp
' Subtitle: Test receiving from and sending back to VFP
%>
<%
lc_test = Request.Form( "txtTest" )
lc_header="Retrieve header"
lc_body="Retrieve body"
lc_return="From asp: "&lc_header&lc_body
Response.Write( lc_return )
%> Tag: sound Tag: 241155
PLEASE! EXE automation: Fox or IIS problem ?
hi
i wrote these few lines:
define class MyTest as Custom OlePublic
hello= "hello"
function getHello()
return hello
endfunc
enddefine
i build the project (MyTest) as an EXE Com Server
and register it with : MyTest.exe /regserver
i can instantiate the com-server within VFP, with no problems
but when i try to do the same in ASP (with Server.CreateObject) :
the page seems hung on the client
and, on the server, the TaskManager shows that the .Exe is still loaded
that is, i have to kill "MyTest.exe"
this is
One year ago, this was easy... what happened ?
is this a Fox or IIS problem ??
thanks
ks Tag: sound Tag: 241151
Building with a project class
I have a project class in my project to make use
of project hooks when I do builds. I always check
the "recompile all files" option, so I receive a
"File proj_lib.vcx is in use and cannot be recomiled"
message whenever I build. This is not a real big
deal, I just hit the ignore button. But I was
wondering if there was an easy way to avoid this and
still do a "recompile all files".
I've tried variations on use of the CLEAR command,
but can't find anything that yields an error-free
build. I suspect it's all in the timing of things
since I have a good chunk of code that runs whenever
a build is done (forms run to collect build details,
tables are updated, printer info cleared from reports,
etc). Any insights?
-- TRW
_______________________________________
t i m . w i t o r t
_______________________________________ Tag: sound Tag: 241148
ProjectHook
Creating a ProjectHook and puting it in your project. I added some code that
runs each time I build the project. This works great as I often forgot to
run some code to set up some data tables before I compiled. The one hangup
is that the program runs when I run the Rebuild The Project and also when I
make up the Win32 Executable. Is there any code like an IF that I can put in
front of the program so that it only runs when I Rebuild The Project. I do
not need it to run when I build the exe file. It is not harming anything but
a time consumer to see the program run twice. Still using VFP8.
Thanks
TonySper Tag: sound Tag: 241142
Modify report in VFP 7, save, but it reverts
I'm modifying a report, making the simplest of changes, being changing
the font of a field expression from bold to regular, I save the report,
but when I reopen it or run it, the field is still bold. What could be
at play here?
Dan Tag: sound Tag: 241140
SQL Comments at last!
An annoyance I find in long sql statements is what I thought was the
inability to break long statements into sections for commenting. Having &&'d
comments off to the right of the code is annoying when there are many
windows open, etc... I have finally discovered that the following works:
select;
afield,;
anotherfield,;
; && Here is the second section of my code.
; && I think I can write as many comments
; && as I like!
evenathird field,;
; && etc
--
-Lew
The workers took the robot for Maria. Tag: sound Tag: 241135
Dynamic call to Excel for exploded pie chart
Does anyone know the paramaters for a dynamic call to Excel to create
an 3D exploded pie chart?
Currently I have the 3D pie chart working, but I'd rather have the 3D
exploded pie chart, but can't find the code anywhere. Perhaps it can't
be done dynamically?
i.e. The parameter call for the 3D pie is -4102,7,2,1,0,1 in the
following statement:
objxlsheet.chartobjects(1).chart.;
chartwizard(objxlsheet.range(objxlsheet.cells(1,1),objxlsheet.cells(pni,
2)),;
-4102,7,2,1,0,1,"","","","") Tag: sound Tag: 241131
Inputbox function suddenly not working on VFP9
I have VF9 and was using the inputbox function successfully till yesterday.
Now, it suddenly shows a message 'Program inputbox.prg does not exist' I
haven't made any programming changes. Any ideas?
Thanks
Zoom Tag: sound Tag: 241128
foxpro 9.0 problem
when SET REPORTBEHAVIOR 90
the report cannot show chinese at preveiw or printing
how can i solve this problem ?
-- Tag: sound Tag: 241126
VFPUG NYC meets 6/5
The Visual Foxpro Users Group of New York City meets Thursday, June 5, at 7
pm. in NYU's Silver building, NE corner of Washington Square, room #803. The
topic is "Using MS SQL from VFP". The speaker is Jay Berardinelli. Tell
guard you are going to the "computer club". Tag: sound Tag: 241123
Hi
Can I play a .wav sound on app opening.
I'm using vfp8.
What and where do I put the code?
The easiest way to just play one sound is probably to use the
sndPlaySound function. You can find an explanation of using it with
Foxpro here: http://www.news2news.com/vfp/?function=398
Alternatively, you could use a multimedia OCX to play sounds, but that
is probably overkill in this case.
sherry wrote:
> Hi
> Can I play a .wav sound on app opening.
> I'm using vfp8.
> What and where do I put the code?
>
> Thanks
> Sherry
Try the following either early in your main program or in your main
(opening) form.load event:
SET BELL TO "MySound.WAV"
?? CHR(7)
SET BELL TO
It should play as soon as the program starts.
If you want to delay it till your main form (if any) is open, use
the form.init event. That code doesn't run until after all of the
form's objects are created.
The code from Rush should have a little addition which is:
SET CONS ON
SET BELL TO "MySound.WAV"
?? CHR(7)
SET BELL TO
SET CONS OFF
greetings Gerhard
"Rush Strong" <rush.strong@[DELETEME]verizon.net> schrieb im Newsbeitrag
news:eTTHsTw1IHA.3920@TK2MSFTNGP02.phx.gbl...
> sherry wrote:
>> Hi
>> Can I play a .wav sound on app opening.
>> I'm using vfp8.
>> What and where do I put the code?
>>
>> Thanks
>> Sherry
>
> Try the following either early in your main program or in your main
> (opening) form.load event:
>
> SET BELL TO "MySound.WAV"
> ?? CHR(7)
> SET BELL TO
>
> It should play as soon as the program starts.
>
> If you want to delay it till your main form (if any) is open, use the
> form.init event. That code doesn't run until after all of the form's
> objects are created.
>
> - Rush
Hi
The other way worked fine...What is the SET CONS for?
Thanks
Sherry
"Gerhard Gentele" wrote:
> The code from Rush should have a little addition which is:
>
> SET CONS ON
> SET BELL TO "MySound.WAV"
> ?? CHR(7)
> SET BELL TO
> SET CONS OFF
>
> greetings Gerhard
>
>
>
> "Rush Strong" <rush.strong@[DELETEME]verizon.net> schrieb im Newsbeitrag
> news:eTTHsTw1IHA.3920@TK2MSFTNGP02.phx.gbl...
> > sherry wrote:
> >> Hi
> >> Can I play a .wav sound on app opening.
> >> I'm using vfp8.
> >> What and where do I put the code?
> >>
> >> Thanks
> >> Sherry
> >
> > Try the following either early in your main program or in your main
> > (opening) form.load event:
> >
> > SET BELL TO "MySound.WAV"
> > ?? CHR(7)
> > SET BELL TO
> >
> > It should play as soon as the program starts.
> >
> > If you want to delay it till your main form (if any) is open, use the
> > form.init event. That code doesn't run until after all of the form's
> > objects are created.
> >
> > - Rush
>
>
>