Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mixed up!
Message
 
 
To
27/06/1998 18:58:04
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00112212
Message ID:
00112219
Views:
14
Mark,

>2) Is it possible to call GETFONT() or an equivalency with the CURRENT settings (fontsize, name, color...) rather than just popping up a fresh box (example purpose could be someone has the fontsize set to 12, goes to the GETFONT() box and wishes to enlarge his/her text, but doesn't know from whence's he's started; if the initial parameters could be set to popup starting with fontsize of 12...)

set the _screen.ActiveForm font properties before calling GetFont I use code like this:

xFontSave = createobject( "CommandButton" ) && create an object with font properties

this.CopyFont( xFontSave, _screen.ActiveForm )
this.CopyFont( _screen.ActiveForm, roObject )

local lcFont, llRetVal

lcFont = GetFont()
llRetVal = ! empty( lcFont )

this.CopyFont( _screen.ActiveForm, xFontSave )


>4) Anyone know of a simplistic way to be able to click a button on a form and pop-up a dialog box to send an EMAIL message? How about a website? I've checked around and downloaded a couple of freeware programs, but nothing's worked; one of the zip files is even corrupt.

There's a sample in solutions.app. Here's another example:
activate window "debug output"

* simple test email program using MAPI

oleMAPISession = createobject( "MSMAPI.MAPISession.1" )

* Signon to mail
with oleMAPISession
   .UserName = "Test"
   .Password = ""
   .Signon()
   * Check the SignOn status
   if ( .SessionID > 0 )
      oleMAPIMessages = createobject( "MSMAPI.MAPIMessages.1" )
      * tell the message the SessionID
      oleMAPIMessages.SessionID = .SessionID
      debugout "Successful mail log on"
   else
      debugout "Mail login failed"
      return
   endif
endwith

* Send an email

with oleMAPIMessages
   .Compose()

* Set the Recipient name and resolve
   .RecipDisplayName = "ValidEmailAddress@somewhere.net"
   .RecipType = 1
   .ResolveName()

   .MsgSubject = "This is the Subject"
   .MsgNoteText = "This is the email text"

   .Send( .f. )
endwith

* Read the InBox

with oleMAPIMessages
   .Fetch()
   for i = 0 to .MsgCount-1
      .MsgIndex = i
      debugout .MsgSubject
   endfor
endwith

* Signoff

oleMAPISession.Signoff()
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform