codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  accessing oleVariant type of activeX component written in delphi  marky3a at 10:42 on Saturday, May 02, 2009
 

I have written an activeX component in delphi which has as a parameter and return variable an oleVariant type. I don't know how to access and use the variant type in visual basic though. I assume that i have to use the new object type which has replaced the variant type since VB6. I have looked on the online help but what i really need ideally is a small code sample showing exactly how to use the activeX component i am describing. It is of the form:-
delphiActiveXComponent(inVar: oleVariant): oleVariant


  Re: accessing oleVariant type of activeX component written in delphi  jessonerik at 05:44 on Wednesday, October 14, 2009
 

Speaker's source code should be fairly easy to understand. However, you might be wondering why I've specified a = SwingUtilities.getAccessibleAt (c, e.getPoint ()); instead of working with EventQueueMonitor's public static Point getCurrentMousePosition() and public static Accessible getAccessibleAt(Point pt) methods. I could not get those methods to work properly in the context of the mouseEntered() method: I discovered that the mouse pointer had to be moved off of a component before Speaker would speak that component's name. This behavior was unacceptable to me student loan.

If you set up your environment as specified earlier, you should be able to compile Speaker.java. Compilation results in three class files: Speaker.class, Speaker$1.class, and Speaker$2.class. I found it convenient to archive these class files into a Speaker.jar file (with the command jar cf Speaker.jar *.class), copy Speaker.jar to c:\freetts-1.2.1\lib, and add Speaker.jar to the CLASSPATH. On my Windows platform, I specified set classpath=%classpath%;c:\freetts-1.2.1\lib\Speaker.jar.

One last item has to be taken care of before you can use Speaker. You have to tell the JVM to automatically load Speaker.jar at startup. Accomplish that task by placing the following line in your accessibility.properties file (in your JAVA_HOME\jre\lib or JAVA_HOME/jre/lib directory): assistive_technologies=Speaker. If that file does not exist, create an accessibility.properties file with that single line secured credit cards.

To put Speaker through its paces, start TextSpeaker and move the mouse pointer around that application's GUI. You should hear your computer speak as you move the pointer over the label and either button. However, it does not speak when the mouse pointer moves over the text component--I leave figuring out why that is the case as an exercise.

Tip: To use Speaker with an applet that you start via appletviewer, specify both the CLASSPATH environment variable value and a policy file that grants appropriate permissions. For example: appletviewer -J-classpath -J%CLASSPATH% -J-Djava.security.policy=my.policy applet.html--my.policy contains grant { permission java.security.AllPermission; };.

Singing with Java Speech API)
Date: 05/04/06
Author: Kevin Seifert
URL: http://members.sigecom.net/kseifert/
Comments: 2
Info: http://java.sun.com/products/java-media/speech/
Score: (3.36 in 28 votes) forex

/**
This program sings the song "99 Bottles" using the Java Speech API (JSAPI).

FreeTTS is a free JSAPI implementation. To install:

1. Download and unzip FreeTTS from http://freetts.sourceforge.net/
2. To accept the license agreement, find the lib folder, then:
for Windows run: jsapi.exe
for unix/linux type: sh ./jsapi.sh
3. Create a file named "speech.propeties" in your home directory, with a line:
FreeTTSSynthEngineCentral=com.sun.speech.freetts.jsapi.FreeTTSEngineCentral
4. To compile/run, classpath must include freetts.jar and jsapi.jar, such as:
javac -cp "/freetts/lib/freetts.jar;/freetts/lib/jsapi.jar;." Bottles.java
java -cp "/freetts/lib/freetts.jar;/freetts/lib/jsapi.jar;." Bottles
*/

import java.util.Locale;
import javax.speech.Central;
import javax.speech.synthesis.Synthesizer;
import javax.speech.synthesis.SynthesizerModeDesc;
import javax.speech.synthesis.Voice;


public class Bottles {

public static final int NUM_BOTTLES = 99;

//define scale frequencies in hertz
public static final int G_1 = 196;
public static final int A_2 = 220;
public static final int B_2 = 246;
public static final int C_2 = 260;
public static final int D_2 = 292;

public Voice kevinHQ;
public SynthesizerModeDesc generalDesc;
public Synthesizer synth;


public void openMouth() {

try {

System.out.print( " Loading voice..." );

kevinHQ = new Voice( "kevin16",
Voice.GENDER_DONT_CARE,
Voice.AGE_DONT_CARE,
null );

generalDesc = new SynthesizerModeDesc(
null, // engine name
"general", // mode name
Locale.US, // locale
null, // running
null ); // voice unsecured loans


  Re: accessing oleVariant type of activeX component written in delphi  dabora at 08:17 on Monday, December 06, 2010
 

I am delighted to find many useful things here, that's superb. Thanks for sharing this. Salmonella is an organism that can cause serious and sometimes fatal infections in young children, frail or elderly people, and others with weakened immune systems. Healthy people infected with salmonella often experience fever, diarrhea, nausea, vomiting and abdominal pain. In rare circumstances, infection with salmonella can result in the organism getting into the bloodstream and producing more severe illnesses such as arterial infections, endocarditis or arthritis. Anyone who bought the affected eggs should not eat them but return them to the point of purchase for a refund.Salmonella is an organism that can cause serious and sometimes fatal infections in young children, frail or elderly people, and others with weakened immune systems.

642-426 dumps|| 650-575 dumps|| 650-393 dumps|| 70-433 dumps









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Get the querystring into input box
•  Re: Append right click menu
•  Re: Frame over frame
•  Re: print using conf file
•  Re: Help: Trouble with z-Index and SELECT lists
•  Re: frame title page problem
•  Re: Print and print preview file on the website without using the File - Print on the IE
•  Re: onmouseover change image and text
•  Re: how to refresh the parent window`s parent?


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010