Interaction.AppActivate

Posts 1–10 of 10 · Page 1 of 1
Interaction.AppActivate
Can I use something like Interaction.AppActivate but instead of focusing on the window name , it will focus on the process name ?
Another problem.
Code:
   
Dim mydl1() As Byte = My.Resources.dl1
                IO.File.WriteAllBytes(Application.StartupPath + "\sxs.dll", mydl1)
                MsgBox("Ready to go!")
                Process.Start(Application.StartupPath + "\patcher_cf.exe")
            End If
What can I do fix it ?
@Jason

@SecretDataz
  1. Get process name and then retrieve the Window Title using the process.
  2. What error messages are you getting?
Can't really give you any help based on a few lines of code with no error/exception message.

As for AppActivate, as GreenLightning said, just use the process name to identify the process, then use the MainWindowTitle property of the found process for your AppActivate call.
Gotta give us more code and information to work with buddy.
How should I use it exactly ?

---------------------

The other problem is this:
I'm using IO.File.WriteAllBytes and I'm giving him the directory where to put the Resource like Jason said in the last thread I had , but I'm using Application.StartupPath too .
Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If My.Computer.FileSystem.FileExists(Application.StartupPath + "\sxs.dll") Then
            System****.File.Delete(Application.StartupPath + "\sxs.dll")

        End If
        If My.Computer.FileSystem.FileExists(Application.StartupPath + "\HGWC.exe") And My.Computer.FileSystem.FileExists(Application.StartupPath + "\CrossFire.exe") And My.Computer.FileSystem.FileExists(Application.StartupPath + "\patcher_cf.exe") Then
            If CheckBox1.CheckState = CheckState.Checked And CheckBox2.CheckState = CheckState.Unchecked And CheckBox3.CheckState = CheckState.Unchecked Then
                Dim mydl1() As Byte = My.Resources.dl1
                IO.File.WriteAllBytes(Application.StartupPath + "\sxs.dll", mydl1)
                MsgBox("Ready to go!")
                Process.Start(Application.StartupPath + "\patcher_cf.exe")
            End If
Can you send me bigger piece of code,I don't think the error is there.
You really need to learn how to report errors; seriously, giving us a piece of code, and an error message without telling us what line the error is on or anything is not very helpful.
What's the name of the String that it's trying to convert or what piece of code is causing the error?
And make sure you Declare your variables correctly.

EDIT: Give us more CODE! So we can help you out.
I fixed the error .

I still got a problem with Interaction.Appactive.
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us