how to print a calendar and bar graph on a VFP report
Hi,
I need to generate a report from VFP8 that will looks like a Project gant
chart report... has somebody developed a similar graphic report?
I have no trouble with all the logic of what to send to printer on each
printable page, but I am not sure how to locate graphic objects into the
printable área.. please note that there should be a variable number of
graphical objects on the same line of the report
I would appreciate any idea to start with or a sample report somebody did.
thanks and bestregards
Oscar Taboada Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209366
REPORT FORM xxx TO FILE yyy ASCII (VFP6)
Outputting from a report to a file is accomplished with the above statement,
it is true. But I'd like some improvements:
1) if I'm still designing the report, I want to MODIFY REPORT and then print
from one of the menu pads in the Report Designer - either from Preview, or
with Report / Run Report. But I can't see any way to express the equivalent
of "TO FILE ASCII" from either of these locations. Do I need to go to the
Command Window to print to a file?
2) ASCII loses all formatting, such as fonts, bold/italic, lines. But if I
leave out ASCII, I get a Postscript file that seems very hard to work with.
I want to email the file, and for the recipient to bring it into his
wordprocessor (MS Word, e.g).. Is there any way to output a DOC file from a
report?
--
Peter Rooney
magnetix@ix.netcom.com Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209355
Seeing chinese characters in VFP
Hi:
Does someone knows what are the fonts and libraries for displaying these
characters?
Thanks.
Alejandro Fernandez Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209354
custom columns/headers
I have subclassed grid , column & header classes as :
>> my.vcx
define class mygrid as grid
memberclass="mycolumn"
memberclasslibrary="this.prg"
procedure init
set step on && just to be sure we are getting here
endproc
procedure error(x,y,z)
set step on && just to be sure we aren't getting here
endproc
enddefine
>> my.prg
define class mycolumn as column
headerclass="myheader"
headerclasslibrary="this.prg"
procedure init
set step on && just to be sure we are getting here
endproc
procedure error(x,y,z)
set step on && just to be sure we aren't getting here
endproc
enddefine
define class myheader as header
procedure init
set step on && just to be sure we are getting here
endproc
procedure error(x,y,z)
set step on && just to be sure we aren't getting here
endproc
enddefine
when i use mygrid everything seems to be ok
- all of the init()s get hit
- none of the error()s get hit
but - the column header captions are always blank.
if i change the mycolumn class to use the standard header , the captions
re-appear.
I assume that I am missing some small detail here but I don't see what it
is.
Any suggestions ?
Gerry Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209351
OptionGroup button size
Jeez, I am upgrading my VFP 7 application to VFP 9 and what the heck
happened to the size of the radio buttons on the OptionGroup. I can
hardly see them. I had to bump the font size to 11 before they were
actually selectable. Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209339
VFP9 OLEDB Bug?
Trying to connect to a database using VFP9, VFPOLEDB provider and I
am getting an error
OLE IDispatch exception code 0 from Provider: Catastrophic failure..
I can connect to other databases.
I have validated the database.
I can open every table in the database via code.
I have Googled it but hardly any hits. Has anyone else experienced this
error?
MDAC is up to date. Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209323
Installshield Express
I'm using the Installshield Express 5.0 vfp limited edition.
It actually built the project.msi file - it claims successfully. If I click
on the test the installation I get an error "Error reading setup
initalization file" and returns to the test screen. What am I missing?????
Any help is welcome. Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209321
bindevent() requires source event code ?
vfp9
I have a control that is added to a form , in it's INIT() method it issues
BIND.EVENT(this.parent,"Destroy",this,"OnDestroy")
if there is any code at all ( even a single "*" ) in the forms
form.Destroy() method, the control.OnDestroy() delegate is called as
expected
however if the form.Destroy() method is empty the delegate is never called
why does the source object have to override the event in order for bound
events to fire ?
anyone have a generic work around that would not required dummy Destroy()
code to exist ? If I am going to have to add this dummy code I might as
well just call control.OnDestroy() myself.
Gerry Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209318
Is there any functions to find # of tables in DBC?
Is there any function available to find # of tables in the DBC or how to
find each table in DBC. Reason I need this is, I have to change size of
particular field in all table in database. Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209315
stupid errors
In this multi-user (usually no more than a dozen or so) file server app, I
sometimes get errors that seem to make no sense. For instance, a line like
this got a "file in use" error:
INSERT INTO mytable VALUES (1, 2, "abcd")
Nowhere in the app is mytable locked or opened exclusively. There are no
FoxPro users who might have opened the table in FoxPro, and there are no
other processes that access the tables.
This particular process has been operating for more than a year without
error, now this. I occasionally - maybe once every month or two - get
unexpected errors like this in other procs. Anyone have an idea what's going
on?
Could network issues be causing this?
Most data access in this app uses views or sometimes tables directly, but
buffered. But there are a few cases, like this one, where data contention is
so unexpected that I didn't bother buffering and just access the table
directly. For crying out loud, how can a simple INSERT fail, if nothing is
locking the table? (There might be an occasional APPEND, but it would be
short, no more than a handful of records.)
REPROCESS is set to 0.
Why is this happening? Do I have to start buffering everything? Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209310
AutoFit not working
VFP8 SP1 on XP Pro SP1
I have a form with a grid on it. In code, the grid is
configured to display the contents of a table that is
selected by the user. Part of this configuration process
is to use checkboxes for fields that are logicals. Using
code like this:
WITH myGrid.Columns[curCol]
.AddObject("chkVal","CHECKBOX")
.CurrentControl = "chkVal"
.Sparse = .F.
.chkVal.Caption = ""
.AutoFit()
ENDWITH
This works fine with the exception of the call to AutoFit().
The column's width remains much wider that required for the
header caption or the checkbox. Refreshing the grid does not
help. Nor does removing the default "Text1" control in
the column before calling AutoFit(). Nor does reducing the
Width property of the chkVal checkbox to 30.
Is there something else that needs to be done to get this to
work? I am successfully using AutoFit() on other columns
that just have the default textbox in them, but when the
checkbox is substituted, it's not workin'.
-- TRW
_______________________________________
t r w 7
at
i x dot n e t c o m dot c o m
_______________________________________ Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209309
Data reapperaing
I have a part of our program that modifies a bunch of records, adds records
to a table and deletes records from another table. I have this all wrapped
in a transaction. I had a customer that said that everything worked fine
and the records were deleted from one table and were added to the other
table like it should, and all other modifications on other tables went
through fine. Yet when he went into that screen later he noticed that the
records that were deleted before had reappeared. The other tables in the
transaction didn't change. Just the records that were deleted came back.
They are running the program on a Windows XP Pro and the database is located
on a Windows Server 2003. I can't find anything in the code that would be
causing this issue. Is there a possible Server 2003 setting that is
buffering file writes and it somehow got lost? The program that is
currently at this site is written in VFP 8 SP1 but will be updated soon to
VFP 9.
--
TIA
Altman
VFP9 Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209303
Grid stalling?
Using VFP 8, sp1
The following select statement runs in 0 to .02 seconds for any value of
lcsearchvar, and shows as fully optimized (using sys(3054)):
SELECT Ldf101.caseno, Ldf101.casenam, Ldf101.casetyp, Ldf101.trnstyp,;
Ldf101.reascod, Ldf101.trnsdat, Ldf101.localof, Ldf101.unitid,;
Ldf101.wkrid, Ldf101.authno;
FROM t:\ldftables\ldf101;
WHERE Ldf101.casenam = ( ?m.lcsearchvar );
ORDER BY Ldf101.casenam;
INTO CURSOR ccaseview
I'm using the cursor to populate a grid with 8 rows.
If m.lcsearchvar = "SMITH" it returns 1000+ records and the grid refreshes
quickly.
If m.lcsearchvar = "TIFFANY" it returns 4 records and the application stalls
and then starts.
If m.lcsearchvar = "WADSWORTH" it returns 7 (not 8, oddly) records and the
grid refreshes quickly.
If m.lcsearchvar = "GOBBLEDEGOOK" it returns 0 records and the application
stalls and then starts.
Any idea why this would be happening? It seems to be grid related.
Thanks,
Dave Tiffany Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209302
Problem reading Fox 2.6a table in Fox 8
Weird problem: I'm working for a company that uses a vendor-supported
application that's based on Fox 2.6a tables. I use Fox 8, and I've
never had any problem browsing the 2.6a tables. Until today.
Occasionally a table will get corrupted; we call the vendor, and they
fix it. They did that for us this morning, and the application can now
access the table -- but I can't open it in Fox 8, I still get a message
that the table has become corrupted and needs to be repaired. But the
weirdest thing is that I can browse the table via Fox 6!
Can anyone explain how a Fox table could look OK to Fox 2.6a and Fox 6
but not to Fox 8?
Thanks for your help! Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209297
re-inventing the wheel / Tab order & Validating
Has anyone got any code for cleaning duplicate records out of a table
(and willing to share!!)?
Save me re-inventing the wheel.
I have just finished a program to help with our stocktake next week. In
a procedural language like foxplus it would be really easy to write, but
as I am trying to learn VFP.....
I have to collect the following data:
Sheet_No
Order_No built-up from prefix, order, version, item
customer
Location
Quantity
Last_Operation
I have set validation code and tab orders and added three buttons to the
form:
report+maint no tab order
quit no tab order
save last in tab order
The thing is - if i leave my the validation code for the sheet_no text
box the buttons on the form are not accessible, so the reports and
maintenance button is not available until all of the textboxs are
validated. But if I comment it out then the buttons become available.
What am I doing wrong?
E.g.
thisform.prefix.valid code:
Tprefix=ALLTRIM(thisform.prefix.Value)
DO case
CASE Tprefix="M"
RETURN 1
CASE Tprefix="W"
RETURN 1
CASE Tprefix="S"
RETURN 1
OTHERWISE
RETURN 0
ENDCASE
Buttons are un-clickable at this point.
THX
Steve Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209295
VFP8 cursorschema/file structure order issue
I am having problems with file structure field order and cursorschema
definitions. I want to be able to issue select statements without naming all
the fields e.g. select * from table1, but the cursorfill gets an error if the
field order in the table structure doesn't exactly match the order of the
fields in the cursorschema. We have written the cursorschema statements
based on the order of the fields in our test data but some of the client
sites have the fields in a slightly different order due to problems with
converting yonks ago so the system crashes. Why is VFP8 so particular about
the field order anyway?
Is there any way of programmatically changing the order of fields in the
table structure or do I have to go down the route of appending their data
into correctly ordered table structures?
Thanks for any help.
Bernie Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209294
Capturing Signatures
From a handheld device we are capturing signatures and storing them as a
series of drawing points.
These vectors will be stored in a memo field.
What we need to do is create an image from these vectors for display in a
web page ideally using a com object to create them on the fly.
Does anyone know of any way of doing this or any third party tools which can
do this.
Thanks in advance
Dave Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209284
Find files
Hi,
How can I write an application that will locate all files owened by a
specific user in Windows XP.
I believe that I need
1. find my SID
2. find files owened by that SID
Can anybody help me.
Demetrios, Greece Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209283
Need parameterized INSERT query
Does anyone know how to get VFP7 to support a parameterized INSERT
statement?
Something like this:
liValue1 = 1
liValue2 = 2
INSERT INTO Table (iField1, iField2) VALUES (?liValue1, ?liValue2)
I need to do it this way through OLEDB so I can thwart SQL Injection
attacks.
Thanks! Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209282
=?Utf-8?Q?Sender=E2=80=99s_Email_Address_is_Missin?=
I have run the following code and itâ??s fine for Outlook Express. But for
Outlook, the senderâ??s email address is missing. How to put it
programmatically? TIA.
SessisonObject..SignOn()
SessisonObject.NewSession=.T.
MessageObject.SessionID= SessisonObject .SessionID
MessageObject.Compose
MessageObject.MsgSubject=â??Testâ??
MessageObject.RecipDisplayName=â??Visual FoxProâ??
MessageObject.RecipAddress=â??vfp@microsoft.comâ??
MessageObject. MsgNoteText=â??Helloâ??
MessageObject.Send()
SessisonObject..SignOff() Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209277
Save a report as HTML in VFP9
How to save a report as an HTML file.
and what are the options to e-mail the report in VFP9?
Thanks, Eugene Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209275
Assign method cannot be recursive?
I noticed that an assign method will not allow itself to
be called while it is in the call stack (i.e. cannot be
recursive in any way). I don't see this mentioned in the
documentation for assign methods. Is this a known restriction?
In my case, a property's value gets changed which causes
a series of other methods to run and update various tables
and controls on a form. During the course of these updates,
the original property may get changed to a new value, but
the assign method does not get called. I can work around
this, and it is an odd case where this would need to be
supported, but it is not completely out of line to need
this to work.
-- TRW
_______________________________________
t r w 7
at
i x dot n e t c o m dot c o m
_______________________________________ Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209259
Can we rely on CTOD()'s empty date feature?
It is handy to use CTOD() on a text date entry to see if the
entered date is valid or not. CTOD() returns an empty date
if an invalid date is passed:
? CTOD("23/67/823928")
But I noticed that this behavior is not documented in the
help file in VFP6, VFP8, VFP9. I tend to be leary of relying
on bahavior that is not documented.
-- TRW
_______________________________________
t r w 7
at
i x dot n e t c o m dot c o m
_______________________________________ Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209252
Recover utility New V4.0b release
Last week we released new version 4.0b of Recover table repair
utility. It handles VFP9 new field types and some other improvements.
A number have asked when it will be available.
-----------------------------------------------------------------
Paul Lee ........... Abri Technologies ......... http://abri.com/
'Recover' - top rated FoxPro file repair utility.
----------------------------------------------------------------- Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209249
Menu Error (Memo file Missing / Invalid)
While creating Menu in Fox 2. through following command
Crea menu temp
I am able to design the menu. But when i say save to the menu or generate
the menu it gives me following errors
'Memo file missing / Invalid '
& sometimes it gives me the error 'file not open'
What am i doing wrong.
Thanks Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209239
GDI+
Hi !
Can someone help me to draw a vertical text ?
I've already "translated" some commands from .NET, using GDIPDRAWSTRING,
with vertical alignment using SetFormatFlags
GdipCreateStringFormat with the parameter of 2 -
#define GDIPLUS_STRINGFORMATFLAGS_DirectionVertical 2
But I need the vertical text in another direction...
I used the example below to translate to VFP, there u can see the image I'm
getting.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdicpp/GDIPlus/GDIPlusreference/flatstringformat.asp Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209237
SQL Select - exclusion list
I have 2 cursors
cursor1 contains a list of keys
cursor2 contains another list of keys
the key in both cursors is the very same format
I want to create another cursor cursor3
Which contains keys in cursor1 that are not in cursor2
This is the code.
It has always worked up to now.
Why does it not work in VFP9?
SELECT * FROM cursor1 ;
WHERE (curkey NOT in (SELECT WTAKEY FROM cursor2) );
INTO CURSOR cursor3 Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209231
Using VarBinary for API Structures
In the May 2004 VFP Letter, it is mentioned that we can use Var Binary data
type for Win32 API Structures. Does any body have further info on it?
The link to the letter is
http://msdn.microsoft.com/vfoxpro/letters/05112004/ Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209230
Preview COM DLL problem
I have got a COM DLL (written in VB) to enable me to preview the Text
Control word processor components from within vfp.
The preview.dll is stored in c:\printpreview and I have registered it
successfully with regsvr32.exe c:\printpreview\preview.dll
My vfp project is stored in M:\SAMPLE with the forms in M:\SAMPLE\FORMS
In the form I have put the two lines in the click method of a commandbutton:
lopreview = createobject("preview.txtpreview")
lopreview.display(thisform.txtcontrol1)
and it fails with the error 'class definition not found'.
This is the first time I have tried to do anything with DLLs so I am
sure I have missed something fairly basic.
Can anybody help please?
Many thanks
Stephen Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209227
delete outlook appointment
This is a multi-part message in MIME format.
------=_NextPart_000_0014_01C52F88.E7C7DCE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi all,
I have a problem when I'm trying to delete an appoint from Outlook =
through Foxpro. Here's the code I'm using :=20
oOutlook =3D CREATEOBJECT('Outlook.Application')
oNameSpace =3D oOutlook.getNameSpace('MAPI')
oAppts =3D oNameSpace.getDefaultFolder(9)
cString =3D 'My apppointment'
oDelAppt =3D oAppts.Items.Find(cString)
IF (TYPE('oDelAppt') =3D 'O') AND !ISNULL(oDelAppt)
oDelAppt.Delete() <----- Error
ENDIF
When I issu the 'delete()' command I get an error 'Parameter is not =
optional'.
I've tried this on Foxpro 8 & Foxpro 9 with Oulook 2003.
Any ideas ?
greetings
Xavier
------=_NextPart_000_0014_01C52F88.E7C7DCE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<P><FONT face=3DArial size=3D2>Hi all,</FONT></P>
<P><FONT face=3DArial size=3D2>I have a problem when I'm trying to =
delete an appoint=20
from Outlook through Foxpro. Here's the code I'm using : </FONT></P>
<P><FONT face=3DArial size=3D2> oOutlook =3D=20
CREATEOBJECT('Outlook.Application')<BR> oNameSpace =3D =
oOutlook.getNameSpace('MAPI')<BR> oAppts =3D=20
oNameSpace.getDefaultFolder(9)</FONT></P>
<P><FONT face=3DArial size=3D2> cString =3D 'My=20
apppointment'</FONT></P>
<P><FONT face=3DArial size=3D2> oDelAppt =3D=20
oAppts.Items.Find(cString)<BR> IF (TYPE('oDelAppt') =
=3D 'O') AND=20
!ISNULL(oDelAppt)<BR> =
oDelAppt.Delete()=20
<----- Error<BR> ENDIF</FONT></P>
<P><FONT face=3DArial size=3D2>When I issu the 'delete()' command =
I get an=20
error 'Parameter is not optional'.<BR>I've tried this on Foxpro 8 & =
Foxpro 9=20
with Oulook 2003.</FONT></P>
<P><FONT face=3DArial size=3D2>Any ideas ?</FONT></P>
<P><FONT face=3DArial size=3D2>greetings<BR>Xavier</FONT></P>
<P><FONT face=3DArial size=3D2></FONT> </P>
<P><FONT face=3DArial size=3D2></FONT> </P>
<P><FONT face=3DArial size=3D2></FONT> </P></DIV></BODY></HTML>
------=_NextPart_000_0014_01C52F88.E7C7DCE0-- Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209226
March VFUG Newsletter is Now Online (Free!)
The March edition of the VFUG.Org Newsletter -- a great free resource
for all VFP developers -- is now online. If you did not get an email
copy, feel free to log on www.VFUG.Org and select the "Newsletters"
section.
You can also specify in your VFUG user profile if you want the VFUG
Newsletter delivered straight to you mailbox every month -- free!
--
~ Thomas O'Hare ~
President, RedTile, Inc. -- DBA: RedTile Software
Web, Wireless, Network, Database & Systems Software
407-295-9148 http://www.RedTile.Com/ or http://www3.RedTile.Com/
Operations Manager, Virtual FoxPro User Group
Tom@VFUG.Org http://www.VFUG.Org/ or http://www3.VFUG.Org/ Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209221
Does a method exist?
How can I tell whether a method exists in an object?
I have a process that is passed a form as a variable and I want to run a
particular method if it exists on the form.
Running TYPE("MyForm.MyMethod") return "U" even if the method exists.
I could probably just instantiate the method and handle the erorr if it
doesnt exist but there must be a more elegant way?
Any ideas?
Cheers
David Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209220
VFUG News Ticker Full Release Now Online!
The VFUG News Ticker (VNT) is meant to be an extremely easy and very
cool way of keeping up with Forum posts on VFUG.Org -- all for free!!!!
VNT is written in 100% VFP and is extremely easy to install and use
(just un-zip and and run!).
VNT makes use of the TCP network and Web resources -- IOW, an
integration of web services that encompass the full power of VFP, the
native TCP network stack and Web Pages located on VFUG.Org.
All that is required to use VNT is is an account on VFUG.Org and VFP 8
or 9 runtime.
Try VNT once and you love it! Testimonials from actual VFUG Members who
used VNT:
==============
I just finished downloading it and i loved it. I don't know the entire
usage of this application, but i find it great espacially when it is
completely built in vfp (i am not that good a programmer). Now that i
have seen it in action for five min. and viewed some of the threads, i
thought of a suggestion. Instead of showing multiple entries of a same
thread why not show it once. VFUG has been a great help and thanks for
everything.
Thanks, Jitendra Shahani
===============
I just downloaded the News Ticker and I think it looks great! Great work
Tom! I see plenty of potential here.
Keith Bonin
--
Enjoy!
~ Thomas O'Hare ~
President, RedTile, Inc. -- DBA: RedTile Software
Web, Wireless, Network, Database & Systems Software
407-295-9148 http://www.RedTile.Com/ or http://www3.RedTile.Com/
Operations Manager, Virtual FoxPro User Group
Tom@VFUG.Org http://www.VFUG.Org/ or http://www3.VFUG.Org/ Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209216
Data relations
Hello
I have a database with parent and child records in different records. I want
to take the parent record and put child names on the same record. What is the
best way to do that? The reason why is I'm meging the data to a print stream
that doesn't support realation data.
Thanks Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209213
VFP7: Better way to Edit:Update/Delete Transaction Records
How I do it now :
At the moment I copy the selected record to the temp/cursor file and after
the user delete or update the record, I will delete all the selected records
in the transaction file and append all the record from temp/cursor again.
I have found it's a very stupid and no efficiency way to do it in VFP.Is
there any better solution for me to do it?
I am using free table for the program.
Sorry for my english. Maybe I can use following example to make it more
clear
Transaction file (Sales.DBF)
InvNo
InvDate
InvAcno
InvQty
InvPrice
InvAmt
When user press "Edit/Delete" button (I will copy the selected record to
temp/cursor file)
e.g. InvNo. IV10001 (total records are 5 for this InvNo.) copied to
temp/cursor named "tmptrans"
When use press "Save" button (I will delete all the selected record in
Sales.DBF and appen from temp/cursor file again)
e.g.
Select Sales.DBF
Delete for InvNo="IV1001"
Appen from tmptrans (Only 4 records added coz 1 record deleted in
temp/cursor by user)
Thanks for any input.
Enuz Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209209
OpenSource Contact Manager like ACT! or Goldmine based on VFP?
Anyone know of a Contact Manager similar in features to ACT! or
Goldmine based on Visual FoxPro?
Source Code would be ideal.
John "J.J." Jackson Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209198
Invisible button issue
Here is a bit of an off-the-wall problem. I have an app converted from FPW
to VFP. In FPW, if you set focus to an invisible button and press Enter, it
fires the buttons valid code. In VFP, it gets weird:
Condition one. The form has been run and focus has NOT been set to a
non-invisible button. Set focus to invisible button, press Enter. Button
click method fires, focus goes to next object.
Contition two. The form has been run and focus HAS been set to a
non-invisible button. Set focus to invisible button, press Enter. The cliick
method of the Visible button you last set focus to fires - specifically,
focus goes to the last visible button you set focus to, and fires the click
method of that button.
So - has anyone had any experience in this area? I would like the click
method of the invisible button to fire when I set focus to it and press the
Enter key. The docs are pretty sparse about the visible property, so I'm
playing with this to see if there is an easy fix. Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209197
GDIPLUS not working within mtdll com server
Has anyone managed to get any class within _gdiplus.vcx to work within
a
MTDLL.
I have done a short test program that works fine from the command line
but
if you then build a MTDLL around it then it no longer works. I have
been
running filemon.exe to check what is going on and where gdiplus.dll is
being
loaded from the problem seems to be in that direction. Fox command
line
seems to use gdiplus.dll from the Microsoft Shared/FVP dir. However
when
running from the MTDLL it seems to access mtdll from
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.2180_x-ww_522f9f82.
I've include the sample program below.
To test it:
1) Make sure you have a jpg in c:\windows\web\wallpaper\azul.jpg (xp)
2) Copy to code below to test.prg
3) run test.prg
4) MODIFY COMMAND c:\gditest.txt
Notice imageheight is displayed
Test as MTDLL
Create a project called test, add test.prg
Build as MTDLL
To test call from fox command line:
lo = CREATEOBJECT("test.testgdi")
?lo.gdifunc()
MODIFY COMMAND c:\gditest.txt
Notice imageheight is NOT displayed
Anyone have any ideas??
Thanks
* Test GDIPLUS in MTDLL
lo = CREATEOBJECT("testgdi")
lo.gdifunc
RETURN
DEFINE CLASS testgdi as custom OLEPUBLIC
FUNCTION gdifunc
SET SAFETY OFF
*
* Set classlib to ffc _gdiplus.vcx
* Make sure _gdiplus points to your dir
*
SET CLASSLIB TO libs\_gdiplus
lo= createobject("gpimage")
*
* Malke sure lc points to a file
*
lc = "C:\WINDOWS\Web\Wallpaper\azul.jpg"
lo.CreateFromFile(lc)
*
* Send the image height to a file for inspection
*
SET ALTERNATE TO c:\gditest.txt
SET ALTERNATE ON
?lo.ImageHeight
SET ALTERNATE TO
ENDFUNC
ENDDEFINE
--
Miguel Villax
Director
MIGG Systems Limited Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209190
Grabbing an email Address from a Form
Article: 179728 of microsoft.public.fox.programmer.exchange
Thread-Topic: Grabbing an email Address from a Form
thread-index: AcUr28q9KCKFV5O1T9S1jFs1pPUUfA==
X-WBNR-Posting-Host: 206.29.98.226
From: =?Utf-8?B?VG9t?= <Tom@discussions.microsoft.com>
Subject: Grabbing an email Address from a Form
Date: Fri, 18 Mar 2005 08:59:04 -0800
Lines: 25
Message-ID: <F3C056F1-CCF4-4639-874F-568BC1DBAE15@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.fox.programmer.exchange
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: news.btopenworld.com!btnet-feed3!news-peer0-test!btnet!newshosting.com!nx02.iad01.newshosting.com!news.alt.net!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: news.btopenworld.com microsoft.public.fox.programmer.exchange:179728
hello, i am fairly new to all this. i have a contact form in a app we have. i
want to grab the email address from the form and open up Outlook, have the
address already in the .to and outlook just waiting for the user to input
something in the Body and to send it. currently my code goes some of the way
but not all.
oOutlook = createobject("Outlook.Application")
#Define olFolderdisplaynormal 0
oNameSpace = oOutlook.GetNameSpace("MAPI")
oExplorer = oOutlook.Explorers.add (oNameSpace.Folders[1],
olFolderDisplayNormal)
oExplorer.Activate()
#define olMailItem 0
oMailitem = oOutlook.createitem(olMailitem)
WITH oMailitem
.subject = "This is my Test Button"
.to = ("what do i put here??? ")
endwith
oMailItem.save()
i have tried the _miscbtn class in vfp6 and it does it, only it places the
entire form contents in the Body of the message. its easy to pull addresses
from the contacts folder but i cant from my form.
thank you in advance for your help.
Tom Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209184
Re: Grabbing an email Address from a Form
Article: 179837 of microsoft.public.fox.programmer.exchange
From: "Fred Taylor" <ftaylor@mvps.org!REMOVE>
References: <F3C056F1-CCF4-4639-874F-568BC1DBAE15@microsoft.com> <64012719-9E6A-410C-981F-9B584CC20FC4@microsoft.com> <eHhxRQdLFHA.3184@TK2MSFTNGP09.phx.gbl> <e0H8ifdLFHA.1396@TK2MSFTNGP10.phx.gbl> <9D44133E-26DA-49CD-A56D-2C399F3346DC@microsoft.com>
Subject: Re: Grabbing an email Address from a Form
Date: Mon, 21 Mar 2005 14:20:33 -0700
Lines: 97
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-Antivirus: avast! (VPS 0511-1, 03/17/2005), Outbound message
X-Antivirus-Status: Clean
Message-ID: <eVC3QvlLFHA.2492@TK2MSFTNGP14.phx.gbl>
Newsgroups: microsoft.public.fox.programmer.exchange
NNTP-Posting-Host: cpe-66-1-71-238.az.sprintbbd.net 66.1.71.238
Path: news.btopenworld.com!btnet-feed3!news-peer0-test!btnet!newshosting.com!nx01.iad01.newshosting.com!130.191.3.6.MISMATCH!newshub.sdsu.edu!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
Xref: news.btopenworld.com microsoft.public.fox.programmer.exchange:179837
This is the code I use:
olMailItem = 0
oOutLookObject = CreateObject("Outlook.Application")
oEmailItem = oOutLookObject.CreateItem(olMailItem)
With oEmailItem
.To = "somebody@anywhere.com"
.CC = "somebodyelse@aywhere.com"
.BCC = "newperson@anywhere.com"
.Attachments.Add("c:\somefile.txt")
.Subject = "This is the Subject"
.Send()
ENDWITH
oOutLookObject=null
--
Fred
Microsoft Visual FoxPro MVP
"Tom" <Tom@discussions.microsoft.com> wrote in message
news:9D44133E-26DA-49CD-A56D-2C399F3346DC@microsoft.com...
> using the .send() will send it right away, However it continues to send
> messages while you are typing in the Body.
>
> so i have to use the .display, and the user clicks on send, if outlook is
> closed the message goes to the outbox and waits until they open it. thats
> the
> problem.
>
> what about this, if Outlook is closed should i open it and leave it open?
> right now if its open, i create anothe instance of it then close it when
> im
> done. is there no way to set some of the advanced e-mail props from code?
>
> thanks again
>
> Tom
>
>
> "Fred Taylor" wrote:
>
>> I don't think you have to press "Send", but you do have to click "OK",
>> that
>> someother program is trying to send mail. You can't do it undetected
>> behind
>> the scenes anymore, at least not since Office 2K/Sp2?
>>
>> --
>> Fred
>> Microsoft Visual FoxPro MVP
>>
>>
>> "Paul Pedersen" <no-reply@swen.com> wrote in message
>> news:eHhxRQdLFHA.3184@TK2MSFTNGP09.phx.gbl...
>> >I think with the newer versions of Outlook, it's no longer possible to
>> >tell
>> >it to Send, even if Outlook is running. You have to get the user to
>> >click
>> >the Send button on Outlook. Someone tell me if I'm wrong.
>> >
>> > I think this was done for security reasons - there were too many
>> > viruses &
>> > such hijacking Outlook and sending emails without the users consent.
>> >
>> >
>> >
>> >
>> > "Tom" <Tom@discussions.microsoft.com> wrote in message
>> > news:64012719-9E6A-410C-981F-9B584CC20FC4@microsoft.com...
>> >> aOk i answered my own question with the Following Code.
>> >>
>> >> oOutlook = createobject("Outlook.Application")
>> >> #define olMailItem 0
>> >> oMailitem = oOutlook.createitem(olMailitem)
>> >> WITH oMailitem
>> >> .to = lagstat.pemail
>> >> endwith
>> >> oMailitem.display
>> >>
>> >> However it raised another. when a person sends in the above code, and
>> >> outlook is not open, it waits to actually send the item untill they
>> >> open
>> >> up
>> >> outlook. i need the mails to send when the user hits the send button,
>> >> even if
>> >> Outllok is Closed.
>> >>
>> >> Thanks again.
>> >
>> >
>>
>>
>> Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209183
Re: Grabbing an email Address from a Form
Article: 179821 of microsoft.public.fox.programmer.exchange
Thread-Topic: Grabbing an email Address from a Form
thread-index: AcUuKiaOu+RN7UA4QZqoIsSDLTnOZw==
X-WBNR-Posting-Host: 206.29.98.226
From: =?Utf-8?B?VG9t?= <Tom@discussions.microsoft.com>
References: <F3C056F1-CCF4-4639-874F-568BC1DBAE15@microsoft.com> <64012719-9E6A-410C-981F-9B584CC20FC4@microsoft.com> <eHhxRQdLFHA.3184@TK2MSFTNGP09.phx.gbl> <e0H8ifdLFHA.1396@TK2MSFTNGP10.phx.gbl>
Subject: Re: Grabbing an email Address from a Form
Date: Mon, 21 Mar 2005 07:25:02 -0800
Lines: 64
Message-ID: <9D44133E-26DA-49CD-A56D-2C399F3346DC@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.fox.programmer.exchange
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: news.btopenworld.com!btnet-feed3!news-peer0-test!btnet!newshosting.com!nx02.iad01.newshosting.com!news.alt.net!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: news.btopenworld.com microsoft.public.fox.programmer.exchange:179821
using the .send() will send it right away, However it continues to send
messages while you are typing in the Body.
so i have to use the .display, and the user clicks on send, if outlook is
closed the message goes to the outbox and waits until they open it. thats the
problem.
what about this, if Outlook is closed should i open it and leave it open?
right now if its open, i create anothe instance of it then close it when im
done. is there no way to set some of the advanced e-mail props from code?
thanks again
Tom
"Fred Taylor" wrote:
> I don't think you have to press "Send", but you do have to click "OK", that
> someother program is trying to send mail. You can't do it undetected behind
> the scenes anymore, at least not since Office 2K/Sp2?
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "Paul Pedersen" <no-reply@swen.com> wrote in message
> news:eHhxRQdLFHA.3184@TK2MSFTNGP09.phx.gbl...
> >I think with the newer versions of Outlook, it's no longer possible to tell
> >it to Send, even if Outlook is running. You have to get the user to click
> >the Send button on Outlook. Someone tell me if I'm wrong.
> >
> > I think this was done for security reasons - there were too many viruses &
> > such hijacking Outlook and sending emails without the users consent.
> >
> >
> >
> >
> > "Tom" <Tom@discussions.microsoft.com> wrote in message
> > news:64012719-9E6A-410C-981F-9B584CC20FC4@microsoft.com...
> >> aOk i answered my own question with the Following Code.
> >>
> >> oOutlook = createobject("Outlook.Application")
> >> #define olMailItem 0
> >> oMailitem = oOutlook.createitem(olMailitem)
> >> WITH oMailitem
> >> .to = lagstat.pemail
> >> endwith
> >> oMailitem.display
> >>
> >> However it raised another. when a person sends in the above code, and
> >> outlook is not open, it waits to actually send the item untill they open
> >> up
> >> outlook. i need the mails to send when the user hits the send button,
> >> even if
> >> Outllok is Closed.
> >>
> >> Thanks again.
> >
> >
>
>
> Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209182
Re: Grabbing an email Address from a Form
Article: 179823 of microsoft.public.fox.programmer.exchange
Thread-Topic: Grabbing an email Address from a Form
thread-index: AcUuKwGFZk9aur75Q6ucPbckQ/fxMw==
X-WBNR-Posting-Host: 206.29.98.226
From: =?Utf-8?B?VG9t?= <Tom@discussions.microsoft.com>
References: <F3C056F1-CCF4-4639-874F-568BC1DBAE15@microsoft.com> <64012719-9E6A-410C-981F-9B584CC20FC4@microsoft.com> <eHhxRQdLFHA.3184@TK2MSFTNGP09.phx.gbl> <e0H8ifdLFHA.1396@TK2MSFTNGP10.phx.gbl> <9D44133E-26DA-49CD-A56D-2C399F3346DC@microsoft.com>
Subject: Re: Grabbing an email Address from a Form
Date: Mon, 21 Mar 2005 07:31:09 -0800
Lines: 70
Message-ID: <B40A4DD4-DDAE-4A99-98C3-84EE5953C6F5@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.fox.programmer.exchange
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: news.btopenworld.com!btnet-feed3!news-peer0-test!btnet!newshosting.com!nx02.iad01.newshosting.com!newspeer.monmouth.com!HSNX.atgi.net!news-hog.berkeley.edu!ucberkeley!enews.sgi.com!msrnewsc1!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: news.btopenworld.com microsoft.public.fox.programmer.exchange:179823
One other question, how can i ensure that the text entered is a valid e-mail.
anyway to set the property of my text box to know? johndoe@ddd.com?
"Tom" wrote:
> using the .send() will send it right away, However it continues to send
> messages while you are typing in the Body.
>
> so i have to use the .display, and the user clicks on send, if outlook is
> closed the message goes to the outbox and waits until they open it. thats the
> problem.
>
> what about this, if Outlook is closed should i open it and leave it open?
> right now if its open, i create anothe instance of it then close it when im
> done. is there no way to set some of the advanced e-mail props from code?
>
> thanks again
>
> Tom
>
>
> "Fred Taylor" wrote:
>
> > I don't think you have to press "Send", but you do have to click "OK", that
> > someother program is trying to send mail. You can't do it undetected behind
> > the scenes anymore, at least not since Office 2K/Sp2?
> >
> > --
> > Fred
> > Microsoft Visual FoxPro MVP
> >
> >
> > "Paul Pedersen" <no-reply@swen.com> wrote in message
> > news:eHhxRQdLFHA.3184@TK2MSFTNGP09.phx.gbl...
> > >I think with the newer versions of Outlook, it's no longer possible to tell
> > >it to Send, even if Outlook is running. You have to get the user to click
> > >the Send button on Outlook. Someone tell me if I'm wrong.
> > >
> > > I think this was done for security reasons - there were too many viruses &
> > > such hijacking Outlook and sending emails without the users consent.
> > >
> > >
> > >
> > >
> > > "Tom" <Tom@discussions.microsoft.com> wrote in message
> > > news:64012719-9E6A-410C-981F-9B584CC20FC4@microsoft.com...
> > >> aOk i answered my own question with the Following Code.
> > >>
> > >> oOutlook = createobject("Outlook.Application")
> > >> #define olMailItem 0
> > >> oMailitem = oOutlook.createitem(olMailitem)
> > >> WITH oMailitem
> > >> .to = lagstat.pemail
> > >> endwith
> > >> oMailitem.display
> > >>
> > >> However it raised another. when a person sends in the above code, and
> > >> outlook is not open, it waits to actually send the item untill they open
> > >> up
> > >> outlook. i need the mails to send when the user hits the send button,
> > >> even if
> > >> Outllok is Closed.
> > >>
> > >> Thanks again.
> > >
> > >
> >
> >
> > Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209181
Re: Grabbing an email Address from a Form
Article: 179808 of microsoft.public.fox.programmer.exchange
From: "Fred Taylor" <ftaylor@mvps.org!REMOVE>
References: <F3C056F1-CCF4-4639-874F-568BC1DBAE15@microsoft.com> <64012719-9E6A-410C-981F-9B584CC20FC4@microsoft.com> <eHhxRQdLFHA.3184@TK2MSFTNGP09.phx.gbl>
Subject: Re: Grabbing an email Address from a Form
Date: Sun, 20 Mar 2005 22:36:10 -0700
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-Antivirus: avast! (VPS 0511-1, 03/17/2005), Outbound message
X-Antivirus-Status: Clean
Message-ID: <e0H8ifdLFHA.1396@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.fox.programmer.exchange
NNTP-Posting-Host: cpe-66-1-71-238.az.sprintbbd.net 66.1.71.238
Path: news.btopenworld.com!btnet-feed3!news-peer0-test!btnet!newshosting.com!nx02.iad01.newshosting.com!130.191.3.6.MISMATCH!newshub.sdsu.edu!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: news.btopenworld.com microsoft.public.fox.programmer.exchange:179808
I don't think you have to press "Send", but you do have to click "OK", that
someother program is trying to send mail. You can't do it undetected behind
the scenes anymore, at least not since Office 2K/Sp2?
--
Fred
Microsoft Visual FoxPro MVP
"Paul Pedersen" <no-reply@swen.com> wrote in message
news:eHhxRQdLFHA.3184@TK2MSFTNGP09.phx.gbl...
>I think with the newer versions of Outlook, it's no longer possible to tell
>it to Send, even if Outlook is running. You have to get the user to click
>the Send button on Outlook. Someone tell me if I'm wrong.
>
> I think this was done for security reasons - there were too many viruses &
> such hijacking Outlook and sending emails without the users consent.
>
>
>
>
> "Tom" <Tom@discussions.microsoft.com> wrote in message
> news:64012719-9E6A-410C-981F-9B584CC20FC4@microsoft.com...
>> aOk i answered my own question with the Following Code.
>>
>> oOutlook = createobject("Outlook.Application")
>> #define olMailItem 0
>> oMailitem = oOutlook.createitem(olMailitem)
>> WITH oMailitem
>> .to = lagstat.pemail
>> endwith
>> oMailitem.display
>>
>> However it raised another. when a person sends in the above code, and
>> outlook is not open, it waits to actually send the item untill they open
>> up
>> outlook. i need the mails to send when the user hits the send button,
>> even if
>> Outllok is Closed.
>>
>> Thanks again.
>
> Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209180
RE: Grabbing an email Address from a Form
Article: 179756 of microsoft.public.fox.programmer.exchange
Thread-Topic: Grabbing an email Address from a Form
thread-index: AcUsAYEiHph53JROQwaiesOZAkaJew==
X-WBNR-Posting-Host: 206.29.98.226
From: =?Utf-8?B?VG9t?= <Tom@discussions.microsoft.com>
References: <F3C056F1-CCF4-4639-874F-568BC1DBAE15@microsoft.com>
Subject: RE: Grabbing an email Address from a Form
Date: Fri, 18 Mar 2005 13:29:02 -0800
Lines: 16
Message-ID: <64012719-9E6A-410C-981F-9B584CC20FC4@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.fox.programmer.exchange
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: news.btopenworld.com!btnet-feed3!news-peer0-test!btnet!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: news.btopenworld.com microsoft.public.fox.programmer.exchange:179756
aOk i answered my own question with the Following Code.
oOutlook = createobject("Outlook.Application")
#define olMailItem 0
oMailitem = oOutlook.createitem(olMailitem)
WITH oMailitem
.to = lagstat.pemail
endwith
oMailitem.display
However it raised another. when a person sends in the above code, and
outlook is not open, it waits to actually send the item untill they open up
outlook. i need the mails to send when the user hits the send button, even if
Outllok is Closed.
Thanks again. Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209179
Re: Grabbing an email Address from a Form
Article: 179789 of microsoft.public.fox.programmer.exchange
From: "David Frankenbach" <sendnospam@sendnospam.net>
References: <F3C056F1-CCF4-4639-874F-568BC1DBAE15@microsoft.com> <64012719-9E6A-410C-981F-9B584CC20FC4@microsoft.com>
Subject: Re: Grabbing an email Address from a Form
Date: Sun, 20 Mar 2005 11:45:59 -0600
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
Message-ID: <O75JxSXLFHA.1176@TK2MSFTNGP15.phx.gbl>
Newsgroups: microsoft.public.fox.programmer.exchange
NNTP-Posting-Host: adsl-68-92-149-184.dsl.austtx.swbell.net 68.92.149.184
Path: news.btopenworld.com!btnet-feed3!news-peer0-test!btnet!newshosting.com!nx02.iad01.newshosting.com!130.191.3.6.MISMATCH!newshub.sdsu.edu!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
Xref: news.btopenworld.com microsoft.public.fox.programmer.exchange:179789
Tom,
Check Outlook to see if it has a Send Immediately flag. I know that Outlook
Express has this option and it controls whether or not the send happens
instantly or is delayed until the next send/recieve pass is made.
--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro
"Tom" <Tom@discussions.microsoft.com> wrote in message
news:64012719-9E6A-410C-981F-9B584CC20FC4@microsoft.com...
> aOk i answered my own question with the Following Code.
>
> oOutlook = createobject("Outlook.Application")
> #define olMailItem 0
> oMailitem = oOutlook.createitem(olMailitem)
> WITH oMailitem
> .to = lagstat.pemail
> endwith
> oMailitem.display
>
> However it raised another. when a person sends in the above code, and
> outlook is not open, it waits to actually send the item untill they open
> up
> outlook. i need the mails to send when the user hits the send button, even
> if
> Outllok is Closed.
>
> Thanks again. Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209178
nopageeject won't work
Hi,
Using VFP 8 and running this code from a .prg,
Repo form x to prin noej
Repo form y to prin
will still eject the page. What am I missing?
Thanks Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209169
VFP6: Query Problem
What is wrong with
select left(workdesc,50) as wd,* from cwkt;
where left(funccode,1)="$" and "P#"$wd order by wd
where workdesc is a memo?
I do not get an error message, but I also get no rows returned.
I expected plenty, and the rows are there. If I replace the second
conjunct with
"P#"$workdesc
it works.
What is the difference in meaning between the two statements?
("P#" will normally be at the beginning of the memo.)
Sincerely,
Gene Wirchenko Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209163
VFP 6.0 using SQL stored procedures
I have a stored procedure in a SQL DB that accepts two parameters. Have
used remote views to access SQL tables but never called a stored
procedure. Tried using the VFP remote view wizard to access and the stored
procedure isn't listed.
What is the syntax to access a SQL stored procedure through remote view?
Or, if that's the wrong way how to I access the stored procedure another
way? Not talking about a VFP stored procedure, its on the SQL side.
My code currently looks something like (stripped it down for brievity):
** Create connection
Create CONNECTION MyConn;
DATASOURCE alltrim(config.sourceodbcn);
USERID alltrim(config.sourceodbcu);
PASSWORD alltrim(config.sourceodbcp)
** Create view
Create SQL VIEW 'vEmp' ;
REMOTE CONNECTION 'MyConn' ;
as SELECT *;
FROM EMPLOYEES EMPLOYEES;
WHERE Employees.HireDate = ?dDate
** Use the view
dDate=ctod('02/05/2005')
Use vEmp IN 0 Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209148
Problem with Microsoft WebBrowser ActiveX Control : ReadyState incorrectly reporting complete
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C52EFD.93CB1250
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I have a problem with the MS WebBrowser ActiveX control which I have =
added to a Visual FoxPro 9 form.
I am trying to automate a process of logging on to a website and then =
navigating to an account maintenance page and to then programatically =
select a few check boxes on the web form and submit the form.
I am trying to put together a container object framework which I can use =
for this and any other project which will host a WebBrowser control and =
will navigate to a given page and then call a function R_DELAY() to wait =
for the page to complete loading before continuing to process a form on =
the completed page.
The problem I have is finding out when the navigation process is =
complete so that I can then do something with the page that has loaded.
My main tool was to be the ReadyState property which should read 4 once =
navigation has stopped.=20
I currently use a loop - although I have used a timer event which also =
did not work - which runs until ReadyState =3D 4 OR the loop times out.
This works perfectly with the very first page I navigate to =
(About:Blank) but for some reason, the WebBrowser reports ReadyState =3D =
4 long before any subsequent page loads.
I have included WebBrowser.Document.ReadyState and WebBrowser.Busy into =
the R_DELAY function but the function still either reports the page as =
completed too early OR continues to execute the loops after the page has =
been displayed in the WebBrowser control.
This code to load a web page is:
LPARAMETERS lcURL
this.r_navend =3D .f.
this.web1.navigate2(lcURL)
IF this.r_delay()
this.r_navend =3D .t.
ENDIF=20
RETURN this.r_navend
The code for the R_DELAY function is as follows:
LPARAMETERS lnReadyState, lnMilliSeconds
IF EMPTY(lnReadyState)
lnReadyState =3D 4
ENDIF
IF EMPTY(lnMilliSeconds)
lnMilliSeconds =3D 4000
ENDIF
DECLARE INTEGER Sleep IN WIN32API INTEGER nMSecs
this.web1.SetFocus()
sleep(1000) &&Looks like we need to give the browser time to start =
before looking to see if it has finished
lnX =3D 0
this.web1.SetFocus() &&this.web1 references an instance of Microsoft =
WebBrowser ActiveX control
DO WHILE this.web1.ReadyState # lnReadyState AND ;
lnX < lnMilliSeconds
DOEVENTS
lnX =3D lnX + 1=20
Sleep(1)
ENDDO
lnX =3D 0
this.web1.SetFocus()
DO WHILE ALLTRIM(this.web1.document.ReadyState) # "complete" AND ;
lnX < lnMilliSeconds
DOEVENTS
lnX =3D lnX + 1=20
Sleep(1)
ENDDO
this.web1.SetFocus()
lnX =3D 0
DO WHILE this.web1.busy AND lnX < lnMilliSeconds
DOEVENTS
lnX =3D lnX + 1
sleep(1)
ENDDO=20
IF lnX < lnMilliSeconds
RETURN .T. && Not timed out
ENDIF
RETURN .F.
I think that about covers it.
There was a note in the VFP documentation advising to set =
APPLICATION.AUTOYIELD =3D .F. for the followig reason: "The AutoYield =
property should be set to false (.F.) when a form contains an ActiveX =
control. Setting AutoYield to false (.F.) prevents events for an ActiveX =
control from executing between lines of user program code. For example, =
if AutoYield is set to true (.T.), clicking an ActiveX control while =
user program code is executing may cause an event for the ActiveX =
control to execute, ignoring the user program code for the event, =
producing undesirable or unpredictable results."
Setting AUTOYIELD to .F. is supposed to do the following: "The instance =
of Visual FoxPro does not process pending Windows events between each =
line of user program code.All pending Windows events are placed in a =
queue, and the events in the queue are processed when DOEVENTS is issued =
or a wait state occurs. A wait state occurs when Visual FoxPro is =
waiting for input from the user. The WAIT command does not create a wait =
state."
However, when AUTOYIELD is set to .F. then the program hangs totally so =
I have changed this back to .T.
Information:
VFP 09.00.0000.2412
IE Version: 6.0.2900.2604
Windows XP SP2 (all critical updates applied)
Kind regards
Phil Hollingworth
phil@wrltd.co.uk
------=_NextPart_000_0008_01C52EFD.93CB1250
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.3790.259" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I have a problem with the MS WebBrowser =
ActiveX=20
control which I have added to a Visual FoxPro 9 form.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I am trying to automate a process of =
logging on to=20
a website and then navigating to an account maintenance page and to then =
programatically select a few check boxes on the web form and submit the=20
form.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I am trying to put together a container =
object=20
framework which I can use for this and any other project which will host =
a=20
WebBrowser control and will navigate to a given page and then call a =
function=20
R_DELAY() to wait for the page to complete loading before continuing to =
process=20
a form on the completed page.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The problem I have is finding out when =
the=20
navigation process is complete so that I can then do something with the =
page=20
that has loaded.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>My main tool was to be the ReadyState =
property=20
which should read 4 once navigation has stopped. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I currently use a loop - although I =
have used a=20
timer event which also did not work - which runs until ReadyState =3D 4 =
OR the=20
loop times out.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This works perfectly with the very =
first page I=20
navigate to (About:Blank) but for some reason, the WebBrowser reports =
ReadyState=20
=3D 4 long before any subsequent page loads.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have included =
WebBrowser.Document.ReadyState and=20
WebBrowser.Busy into the R_DELAY function but the function still either =
reports=20
the page as completed too early OR continues to execute the loops after =
the page=20
has been displayed in the WebBrowser control.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This code to load a web page =
is:</FONT></DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><BR>LPARAMETERS =
</FONT><FONT=20
face=3D"Courier New" size=3D2>lcURL<BR></FONT><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>this</FONT><FONT face=3D"Courier New" size=3D2>.r_navend =3D=20
.f.<BR></FONT><FONT face=3D"Courier New" color=3D#0000ff =
size=3D2>this</FONT><FONT=20
face=3D"Courier New" size=3D2>.web1.navigate2(lcURL)<BR></FONT><FONT=20
face=3D"Courier New" color=3D#0000ff size=3D2>IF this</FONT><FONT =
face=3D"Courier New"=20
size=3D2>.r_delay()<BR> </FONT><FONT face=3D"Courier =
New"=20
color=3D#0000ff size=3D2>this</FONT><FONT face=3D"Courier New" =
size=3D2>.r_navend =3D=20
.t.<BR></FONT><FONT face=3D"Courier New" color=3D#0000ff size=3D2>ENDIF =
<BR>RETURN=20
this</FONT><FONT face=3D"Courier New" size=3D2>.r_navend</DIV></FONT>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The code for the R_DELAY function is as =
follows:</FONT></DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2>
<P><EM>LPARAMETERS </EM></FONT><FONT face=3D"Courier New" =
size=3D2><EM>lnReadyState,=20
lnMilliSeconds<BR></EM></FONT><FONT face=3D"Courier New" color=3D#0000ff =
size=3D2><EM>IF EMPTY</EM></FONT><FONT face=3D"Courier New"=20
size=3D2><EM>(lnReadyState)<BR> </EM><EM>lnReadyState =
=3D=20
4<BR></EM></FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2><EM>ENDIF<BR></EM><EM>IF EMPTY</EM></FONT><FONT face=3D"Courier =
New"=20
size=3D2><EM>(lnMilliSeconds)<BR> =
</EM><EM>lnMilliSeconds =3D=20
4000<BR></EM></FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2><EM>ENDIF<BR></EM><EM>DECLARE INTEGER </EM></FONT><EM><FONT=20
face=3D"Courier New" size=3D2>Sleep </FONT><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>IN </FONT><FONT face=3D"Courier New" size=3D2>WIN32API =
</FONT><FONT=20
face=3D"Courier New" color=3D#0000ff size=3D2>INTEGER </FONT><FONT =
face=3D"Courier New"=20
size=3D2>nMSecs<BR></FONT></EM><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2><EM>this</EM></FONT><EM><FONT face=3D"Courier New"=20
size=3D2>.web1.</FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2>SetFocus</FONT></EM><FONT face=3D"Courier New"=20
size=3D2><EM>()<BR><BR></EM></FONT><FONT face=3D"Courier New" =
size=3D2><EM>sleep(1000)=20
</EM></FONT><FONT face=3D"Courier New" color=3D#008000 =
size=3D2><EM>&&Looks=20
like we need to give the browser time to start before looking to see if =
it has=20
finished<BR><BR></EM></FONT><FONT face=3D"Courier New" size=3D2><EM>lnX =
=3D=20
0<BR></EM></FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2><EM>this</EM></FONT><EM><FONT face=3D"Courier New"=20
size=3D2>.web1.</FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2>SetFocus</FONT><FONT face=3D"Courier New" size=3D2>() <FONT=20
color=3D#008000>&&this.web1 references an instance of Microsoft =
WebBrowser=20
ActiveX control</FONT><BR></FONT></EM><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2><EM>DO WHILE this</EM></FONT><FONT face=3D"Courier New"=20
size=3D2><EM>.web1.ReadyState # lnReadyState AND ;<BR> =
</EM><EM>lnX < =
lnMilliSeconds<BR> =20
</EM></FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2><EM>DOEVENTS<BR> </EM></FONT><FONT =
face=3D"Courier New"=20
size=3D2><EM>lnX =3D lnX + 1 <BR> =20
</EM><EM>Sleep(1)<BR></EM></FONT><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2><EM>ENDDO<BR></EM></FONT><FONT face=3D"Courier New" =
size=3D2><EM>lnX =3D=20
0<BR></EM></FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2><EM>this</EM></FONT><EM><FONT face=3D"Courier New"=20
size=3D2>.web1.</FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2>SetFocus</FONT><FONT face=3D"Courier New" =
size=3D2>()<BR></FONT></EM><FONT=20
face=3D"Courier New" color=3D#0000ff size=3D2><EM>DO WHILE=20
ALLTRIM</EM></FONT><EM><FONT face=3D"Courier New" size=3D2>(</FONT><FONT =
face=3D"Courier New" color=3D#0000ff size=3D2>this</FONT></EM><FONT =
face=3D"Courier New"=20
size=3D2><EM>.web1.document.ReadyState) # "complete" AND =
;<BR> =20
</EM><EM>lnX < =
lnMilliSeconds<BR> =20
</EM></FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2><EM>DOEVENTS<BR> </EM></FONT><FONT =
face=3D"Courier New"=20
size=3D2><EM>lnX =3D lnX + 1 <BR> =20
</EM><EM>Sleep(1)<BR></EM></FONT><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2><EM>ENDDO<BR></EM><EM>this</EM></FONT><EM><FONT face=3D"Courier =
New"=20
size=3D2>.web1.</FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2>SetFocus</FONT></EM><FONT face=3D"Courier New"=20
size=3D2><EM>()<BR></EM><EM>lnX =3D 0<BR></EM></FONT><FONT =
face=3D"Courier New"=20
color=3D#0000ff size=3D2><EM>DO WHILE this</EM></FONT><FONT =
face=3D"Courier New"=20
size=3D2><EM>.web1.busy AND lnX < =
lnMilliSeconds<BR> =20
</EM></FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2><EM>DOEVENTS<BR> </EM></FONT><FONT =
face=3D"Courier New"=20
size=3D2><EM>lnX =3D lnX + 1<BR> =20
</EM><EM>sleep(1)<BR></EM></FONT><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2><EM>ENDDO <BR></EM></FONT><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2><EM>IF </EM></FONT><FONT face=3D"Courier New" size=3D2><EM>lnX =
<=20
lnMilliSeconds<BR> </EM></FONT><EM><FONT =
face=3D"Courier New"=20
color=3D#0000ff size=3D2>RETURN </FONT><FONT face=3D"Courier New" =
size=3D2>.T.=20
</FONT><FONT face=3D"Courier New" color=3D#008000 size=3D2>&& =
Not timed=20
out<BR></FONT></EM><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2><EM>ENDIF<BR></EM><EM>RETURN </EM></FONT><FONT face=3D"Courier =
New"=20
size=3D2><EM>.F.</EM></P></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I think that about covers =
it.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>There was a note in the VFP =
documentation advising=20
to set APPLICATION.AUTOYIELD =3D .F. for the followig reason: <EM>"The =
AutoYield=20
property should be set to false (.F.) when a form contains an ActiveX =
control.=20
Setting AutoYield to false (.F.) prevents events for an ActiveX control =
from=20
executing between lines of user program code. For example, if AutoYield =
is set=20
to true (.T.), clicking an ActiveX control while user program code is =
executing=20
may cause an event for the ActiveX control to execute, ignoring the user =
program=20
code for the event, producing undesirable or unpredictable=20
results."</EM></FONT></DIV>
<DIV><EM><FONT face=3DArial size=3D2></FONT></EM> </DIV>
<DIV><FONT face=3DArial size=3D2>Setting AUTOYIELD to .F. is supposed to =
do the=20
following: <EM>"The instance of Visual FoxPro does not process pending =
Windows=20
events between each line of user program code.All pending Windows events =
are=20
placed in a queue, and the events in the queue are processed when =
DOEVENTS is=20
issued or a wait state occurs. A wait state occurs when Visual FoxPro is =
waiting=20
for input from the user. The WAIT command does not create a wait=20
state."</EM></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><EM></EM></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>However, when AUTOYIELD is set to .F. =
then the=20
program hangs totally so I have changed this back to .T.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial =
size=3D2><STRONG>Information:</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>VFP =
09.00.0000.2412</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>IE Version:=20
6.0.2900.2604</STRONG></FONT></DIV>
<DIV><STRONG><FONT face=3DArial size=3D2>Windows XP SP2 (all critical =
updates=20
applied)</FONT></STRONG></DIV>
<DIV><STRONG><FONT face=3DArial size=3D2></FONT></STRONG> </DIV>
<DIV><FONT face=3DArial size=3D2>Kind regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Phil Hollingworth</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"mailto:phil@wrltd.co.uk">phil@wrltd.co.uk</A></FONT></DIV></BODY>=
</HTML>
------=_NextPart_000_0008_01C52EFD.93CB1250-- Tag: Passing a two-dimentional array from VFP9 to C# Tag: 209146
Hi All,
Does anybody have an example of how to pass a two-dimentional array from
VFP9 to C#?