Feb 16th, 2012, 10:31 AM
#1
Thread Starter
Member
run file open command
I am running an application from my desktop as you see on the picture,and I don't know how to run File Open command on active form without mouse click,only with vb.application?
Attached Images
Feb 16th, 2012, 10:38 AM
#2
Frenzied Member
Re: run file open command
you need to add the shortcut to the menu object property
here to help
Feb 16th, 2012, 11:38 AM
#3
Thread Starter
Member
Re: run file open command
That application has a shortcut for open and it is "Ctrl+O",but how to run with my vb.net application??
Feb 16th, 2012, 12:30 PM
#4
Frenzied Member
Re: run file open command
you just press ctrl+O when the form has focus!
or are you talikg about writting the action openfile that happens once you click on the menu item?
Feb 16th, 2012, 12:49 PM
#5
Thread Starter
Member
Re: run file open command
When I hit ctrl+o its working and show me a dialog what to open,but how to do that using vb(do not hit manually by the keyboard)??
Feb 16th, 2012, 01:02 PM
#6
Frenzied Member
Re: run file open command
and when you click it it works too?
is what you mean ...
how do i cause this to happen when i am in the program and want the program to cause a file open event to happen?
Feb 16th, 2012, 01:18 PM
#7
Thread Starter
Member
Re: run file open command
I running one application in vb with:
a = Process.Start("C:\Window1.exe")
When it's stared show me a form as on the picture.
How to hit Ctrl+o using vb2010?
That's all.
So,control one application with other one.
Tnx
Feb 16th, 2012, 02:38 PM
#8
Frenzied Member
Re: run file open command
have alook for articles about sendkey in vb
its an activity i try to avoid!
here to help
Feb 16th, 2012, 05:14 PM
#9
Thread Starter
Member
Re: run file open command
Code:
Public Class Form1
'Button1=RUN button
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
System.Diagnostics.Process.Start("calc")
End Sub
'Button2=COPY Button
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
SendKeys.Send("^c")
End Sub
End Class
If I success with this problem I will success with my application above,because it's similar problem.
Any idea?
Feb 16th, 2012, 05:18 PM
#10
Frenzied Member
Re: run file open command
did you lookup how to send crtl+O using the send key method
Feb 16th, 2012, 06:02 PM
#11
Thread Starter
Member
Re: run file open command
I trying to sendkeys to another application using my button from my application.
Other application must get focus.How to do that?
CTRL+O or CTRL+C or CTRL+S= It does not matter
Some of them must be.
Last edited by blueye89; Feb 16th, 2012 at 06:07 PM .
Feb 17th, 2012, 04:24 AM
#12
Frenzied Member
Re: run file open command
the example form microsoft about the use of sendkey explains all of the process in some detail!
go have a read
here to help ( but really busy just now )
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width