Creating Links in Vb.NET
-
Q1 I am writing an application program in VB.NET. How can I make buttons (or other features) on the form that open certain documents saved in Excel, or Powerpoint or Word? Q2 In a form that with a textbox2 that lists integers that a user input using a textbox1, how can I code the form such that the user only needs to input an integer and strike ENTER so that the integer he has input is added to textbox2. I have this running already but at the moment the user has to keep on clicking a button, which takes much time. Ben
-
Q1 I am writing an application program in VB.NET. How can I make buttons (or other features) on the form that open certain documents saved in Excel, or Powerpoint or Word? Q2 In a form that with a textbox2 that lists integers that a user input using a textbox1, how can I code the form such that the user only needs to input an integer and strike ENTER so that the integer he has input is added to textbox2. I have this running already but at the moment the user has to keep on clicking a button, which takes much time. Ben
bensoncd wrote: I am writing an application program in VB.NET. How can I make buttons (or other features) on the form that open certain documents saved in Excel, or Powerpoint or Word? You could put a Link Label on the form and just handle the click event. Put something like the following code in there to launch the file, say a Word document, you want:
Dim procStartInfo As New ProcessStartInfo(fullPathToWordDOCFile) procStartInfo.UseShellExecute = True Process.Start(procStartInfo)
bensoncd wrote: In a form that with a textbox2 that lists integers that a user input using a textbox1, how can I code the form such that the user only needs to input an integer and strike ENTER so that the integer he has input is added to textbox2. I have this running already but at the moment the user has to keep on clicking a button, which takes much time. The easiest way is to make that button the default button on the form. Just click on the form that holds that button and the textbox. Go to the properties of the form and find the AcceptButton property. Click on the dropdown in there and select the button that you want to be the default button clicked when the user hits Enter. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
bensoncd wrote: I am writing an application program in VB.NET. How can I make buttons (or other features) on the form that open certain documents saved in Excel, or Powerpoint or Word? You could put a Link Label on the form and just handle the click event. Put something like the following code in there to launch the file, say a Word document, you want:
Dim procStartInfo As New ProcessStartInfo(fullPathToWordDOCFile) procStartInfo.UseShellExecute = True Process.Start(procStartInfo)
bensoncd wrote: In a form that with a textbox2 that lists integers that a user input using a textbox1, how can I code the form such that the user only needs to input an integer and strike ENTER so that the integer he has input is added to textbox2. I have this running already but at the moment the user has to keep on clicking a button, which takes much time. The easiest way is to make that button the default button on the form. Just click on the form that holds that button and the textbox. Go to the properties of the form and find the AcceptButton property. Click on the dropdown in there and select the button that you want to be the default button clicked when the user hits Enter. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome