Solved

Is there a way to go into...

Posted on 1999-01-19
1
162 Views
Last Modified: 2010-05-03
Is ther a way to go into another program like word or word pad and delete a word in the thing please help this would be so helpful to me??? See I am making a progarm where a goat walks across the screen and eats a word and i just need one word to disappear. It is kinda as a joke on my friend but i also want it for learning expierence. I am posting all my points so enjoy!
0
Comment
Question by:Moo122398
1 Comment
 

Accepted Solution

by:
HMWT earned 110 total points
ID: 1469502
look up dde (Dynamic Data Exchange) I've got a example ple prog that came with my version of VB. Word was one of the programs that it suposedly can conect to. It works fine on the other example conections. I'v ordered Word but it hasn't yet arived.
You might look to see if an example came with you version of VB.

Here is an example asuming you just your app to look like word, then you can manipulate your window the when you close it word is still the same. ;>

'ctl is a textbox or a picturebox.
'appname is usualy the name of the exe file my example expects 'it to be "WinWord"
'topic must match the value of the linktopic property of the 'window you are trying to access.
'item is the Name of the control you want to access.
'I don't have a clue about the last 2
Function CreateLink% (Ctl As Control, appname$, topic$, item$, LinkType%)
On Error Resume Next
    Ctl.LinkMode = NONE
    Ctl.LinkTopic = appname$ & "|" & topic$
    Ctl.LinkItem = item$
    Ctl.LinkMode = LinkType%
    CreateLink% = Err
    If Err = 0 And LinkType% <> 1 Then 'if linktype<>automatic
        Ctl.LinkRequest
    End If
End Function

you'l have to experiment to see if word prefers ctl to be a picture box or a text box.

if creatlink(...)=282 then 'no app responded.
    'try to start. or in your case you might not want to start
    if shell(appname$)>31 then 'i don't know what the 31 means
        if creatlink(...)<>0 then
            msgbox "huston we'v got a problem..."
        end if 'try to conect again
    end if 'try to start
end if 'no app responed

'do this when ever you want to update your control's data
ctl.LinkRequest

'That about covers every thing except the exact string info you need. try looking at microsoft.com. And of course your manuals now that you no to look for "DDE".
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question