Solved

Is there a way to go into...

Posted on 1999-01-19
1
159 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now