473,505 Members | 13,925 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to create link in visual basic that will connect button with specified program???

5 New Member
I want to make a small simple program which will show few buttons, when each of tem is being clicked then automaticly user gets to appropriate software with specified path for example when I press button autocad it opens autocad which is in C:/autocad/autocad.exe when I want to open dura.apr lotus application which is in c:/dura/dura.apr it is being open after clicking on dura button when I click on sales folder it automaticly goes to sales folder which is in c:/sales/sales files/sales folder etc. It is easy to do it in excel, just using hyperlinks and it works fine, but I want to make it in vb so when I execute exe file I have menu with all buttons (autocad, dura, sales folder etc) the software stays on where other aplications are opened and it should also have exit button which closes it. can anyone help me, I have spend lots of time and I can only find how to open website linked to button. I am begginer in vb so please writte full code.
many thanx
Dudi
Jan 4 '07 #1
12 20344
hariharanmca
1,977 Top Contributor
I want to make a small simple program which will show few buttons, when each of tem is being clicked then automaticly user gets to appropriate software with specified path for example when I press button autocad it opens autocad which is in C:/autocad/autocad.exe when I want to open dura.apr lotus application which is in c:/dura/dura.apr it is being open after clicking on dura button when I click on sales folder it automaticly goes to sales folder which is in c:/sales/sales files/sales folder etc. It is easy to do it in excel, just using hyperlinks and it works fine, but I want to make it in vb so when I execute exe file I have menu with all buttons (autocad, dura, sales folder etc) the software stays on where other aplications are opened and it should also have exit button which closes it. can anyone help me, I have spend lots of time and I can only find how to open website linked to button. I am begginer in vb so please writte full code.
many thanx
Dudi



Use shell(<StringApplicationPath>,<Focus Mode>)
Jan 4 '07 #2
willakawill
1,646 Top Contributor
I want to make a small simple program which will show few buttons, when each of tem is being clicked then automaticly user gets to appropriate software with specified path for example when I press button autocad it opens autocad which is in C:/autocad/autocad.exe when I want to open dura.apr lotus application which is in c:/dura/dura.apr it is being open after clicking on dura button when I click on sales folder it automaticly goes to sales folder which is in c:/sales/sales files/sales folder etc. It is easy to do it in excel, just using hyperlinks and it works fine, but I want to make it in vb so when I execute exe file I have menu with all buttons (autocad, dura, sales folder etc) the software stays on where other aplications are opened and it should also have exit button which closes it. can anyone help me, I have spend lots of time and I can only find how to open website linked to button. I am begginer in vb so please writte full code.
many thanx
Dudi
Hi Dudi
You can find the code here
Jan 4 '07 #3
duudii
5 New Member
Hi Dudi
You can find the code here
Hi again
I still dont know how to do it :((

I made a button and I have such code

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

End Sub
End Class

what should I do with this to have opened autocad which is in C:\autocad\autocad.exe when I click on the button. I know this is simple but still I cannot see solution :(( If I know how to do one I will manage to link other software.
many thanx for help
Jan 4 '07 #4
hariharanmca
1,977 Top Contributor
Hi again
I still dont know how to do it :((

I made a button and I have such code

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

End Sub
End Class

what should I do with this to have opened autocad which is in C:\autocad\autocad.exe when I click on the button. I know this is simple but still I cannot see solution :(( If I know how to do one I will manage to link other software.
many thanx for help


Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
shell("C:\autocad\autocad.exe ",vbMaximizedFocus)
End Sub
End Class
Jan 4 '07 #5
hariharanmca
1,977 Top Contributor
Hi again
I still dont know how to do it :((

I made a button and I have such code

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

End Sub
End Class

what should I do with this to have opened autocad which is in C:\autocad\autocad.exe when I click on the button. I know this is simple but still I cannot see solution :(( If I know how to do one I will manage to link other software.
many thanx for help

Shell will open Exe format Files through VB coding.... Ok
Jan 4 '07 #6
duudii
5 New Member
Shell will open Exe format Files through VB coding.... Ok
Ok, it works with exe files, but when I have assigned dura.apr lotus approach it doesnt work, or when I have assigned specified .doc file or draving and photo (I need all that there) I hink that I need some kind of recognision of file type and appropriate software. I cannot assign folder as well like in hyperlink in excel (when you specify path Y:\Sales Files\Quotes Masters then it (excel) opens this folder, I want to do the same in visual basic)
One more thing, I have forgotten how to compile visual basic file into .exe file, I have new visual basic 2005 express edition, hould I select it somehow at the begining? I was using vb 3 years ago and I have forgotten everything :(
many thanx for all your help.
Jan 4 '07 #7
hariharanmca
1,977 Top Contributor
Ok, it works with exe files, but when I have assigned dura.apr lotus approach it doesnt work, or when I have assigned specified .doc file or draving and photo (I need all that there) I hink that I need some kind of recognision of file type and appropriate software. I cannot assign folder as well like in hyperlink in excel (when you specify path Y:\Sales Files\Quotes Masters then it (excel) opens this folder, I want to do the same in visual basic)
One more thing, I have forgotten how to compile visual basic file into .exe file, I have new visual basic 2005 express edition, hould I select it somehow at the begining? I was using vb 3 years ago and I have forgotten everything :(
many thanx for all your help.

You want Make EXE of VB6 or VB2005
Jan 4 '07 #8
duudii
5 New Member
You want Make EXE of VB6 or VB2005
I want to make an exe file in visual basic,kind of linking software. When I will click on it I will have a window with several buttons. When I will click on button autocad then I will go to autocad.exe, but still the program will be running so If I want to go to lotus approach file then I just click approach button, when I want to go to sales folder I just click on sales folder button and additionally an exit button to finish and close this vb application. I did it all in excel and it works as hyperlinks perfectly, but I want to have it in window with nice buttons that is why I choosen visual basic. It was so easy to do those hyperlinks in excel, so I expected that I will just draw button click on it and write path in visual basic. I hope you can understand now better and help me.
cheers
Jan 4 '07 #9
hariharanmca
1,977 Top Contributor
I want to make an exe file in visual basic,kind of linking software. When I will click on it I will have a window with several buttons. When I will click on button autocad then I will go to autocad.exe, but still the program will be running so If I want to go to lotus approach file then I just click approach button, when I want to go to sales folder I just click on sales folder button and additionally an exit button to finish and close this vb application. I did it all in excel and it works as hyperlinks perfectly, but I want to have it in window with nice buttons that is why I choosen visual basic. It was so easy to do those hyperlinks in excel, so I expected that I will just draw button click on it and write path in visual basic. I hope you can understand now better and help me.
cheers
in Shell you can Open Exe format files only and if you want to open other file format like word or Exel etc.,., you have to bind .dll files to open through VB.
Jan 4 '07 #10
duudii
5 New Member
in Shell you can Open Exe format files only and if you want to open other file format like word or Exel etc.,., you have to bind .dll files to open through VB.
can you please send me a sample code how to bind this dll file?
Jan 4 '07 #11
hariharanmca
1,977 Top Contributor
can you please send me a sample code how to bind this dll file?
VB :

Just go to menu > project > references

then a dialog window will Open then choose the reference file you are goin to use..
if its not there then click the Browse... Button near by the list and select the dll file you are going to use.

for Ex;
Excel application :

check : Microsoft excel 11.0 Object library

and use the following code


================== Code ===========================
Dim objExcel As New Excel.Application
Dim objWorkBooks As Object

Set objWorkBooks = objExcel.Workbooks
objWorkBooks.Open App.path & "\export.csv", , , 2, , , , , ","
Jan 4 '07 #12
willakawill
1,646 Top Contributor
can you please send me a sample code how to bind this dll file?
If you are looking to open up particular documents for particular apps (I think this is what you are asking) you can append the document to the app string in Shell,

Expand|Select|Wrap|Line Numbers
  1. Shell "C:\Program Files\Microsoft Office\Office\Winword.exe C:\MyData\MyWordDoc.doc", vbMaximizedFocus
Jan 4 '07 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

3
752
by: Ben | last post by:
Hi everyone, Now I am using Visual Basic.net to write a program but having some headaches. The situation is as follows: I am using ODBC connection to connect one database( non-SQL server) ,...
7
8821
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
0
2610
by: Jay Douglas | last post by:
Hello, I'm trying to create a Data Links Property window that behaves just like the dialog box in Visual Studio .Net for MS Sql Server connections. I've found a lot of examples that use...
6
2287
by: Frank Wilson | last post by:
Tom, It sounds to me like ASP, not ASP.NET is handling the request for WebForm1.aspx. This is most likely an IIS config issue that may have been caused by order of installation or...
3
17235
by: The Woo | last post by:
Can one programatically create a file folder which has the same name as a key field, using a command button? Or, Can there be a a command button which opens up a directory tree to a specified...
7
3948
by: wally | last post by:
I have Visual Studio 2005 Pro. I installed SQL Express 2005 and rebooted. But, when I right click on "Data Connections" in the Server Explorer and choose "Create New SQL Server Database..." and...
10
8173
by: Steve | last post by:
I am trying to create a DLL in Visual Studio 2005-Visual Basic that contains custom functions. I believe I need to use COM interop to allow VBA code in Excel 2002 to access it. I've studied...
3
18680
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
0
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4698
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
406
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.