473,662 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Button control question

Hello All, this is my first post. I usually find answers to my questions
here, but seem to be stuck here on a problem. I am requesting help setting up
a small project I want to create for work.

1. We have many servers we are mapped to at startup, and each server
contains folders with different files that we need access to. I would like to
create a tabbed form with Command Buttons which when clicked would open up
the specified path.

2. On the second tab, I would like to create Command buttons, which would
have hyperlinks to various web sites we frequent, our intranet sites, etc.

I have created this in Access, but since everyones paths would be the same,
by creating this app I could load on everyones computer ( some computers do
not have access ( we still use Lotus apps)

I have created in VB.net the form, tabs, and buttons, but I am having
trouble setting the buttons properties to the file path or hyperlink. If this
needs to be code generated in the click_event, could someone point me in the
correct direction.

Sorry so long, just wanted to give accurate information. Thanks to all that
replys.

Mark
Oct 8 '05 #1
6 1453
BigBass1 wrote:
Hello All, this is my first post. I usually find answers to my
questions here, but seem to be stuck here on a problem. I am
requesting help setting up a small project I want to create for work.

1. We have many servers we are mapped to at startup, and each server
contains folders with different files that we need access to. I would
like to create a tabbed form with Command Buttons which when clicked
would open up the specified path.

2. On the second tab, I would like to create Command buttons, which
would have hyperlinks to various web sites we frequent, our intranet
sites, etc.


Hello,
You just need to execute an external application using the parameter of the
address you want to go to. To execute an external program, add the below
using / import line:

using System.Diagnost ics;

Then drag a process control to your form (from the Components tab) and name
it e.g. p. Then add code similar to the below to your button_click event for
opening a hyperlink:

p = new Process();
p.StartInfo.Fil eName = "iexplore.e xe";
p.StartInfo.Arg uments = "http://www.google.co.u k";
p.Start();

And for opening a file path use:

p = new Process();
p.StartInfo.Fil eName = "explorer.e xe";
p.StartInfo.Arg uments = "z:\\directory\ \";
p.Start();

Or to just execute a custom application on your network paths:

p = new Process();
p.StartInfo.Fil eName = "z:\\yourapp.ex e";
p.Start();

HTH.
Oct 8 '05 #2
Works great!!!!

Thanks for the help!

Have a great day!

"Leon Mayne [MVP]" wrote:
BigBass1 wrote:
Hello All, this is my first post. I usually find answers to my
questions here, but seem to be stuck here on a problem. I am
requesting help setting up a small project I want to create for work.

1. We have many servers we are mapped to at startup, and each server
contains folders with different files that we need access to. I would
like to create a tabbed form with Command Buttons which when clicked
would open up the specified path.

2. On the second tab, I would like to create Command buttons, which
would have hyperlinks to various web sites we frequent, our intranet
sites, etc.


Hello,
You just need to execute an external application using the parameter of the
address you want to go to. To execute an external program, add the below
using / import line:

using System.Diagnost ics;

Then drag a process control to your form (from the Components tab) and name
it e.g. p. Then add code similar to the below to your button_click event for
opening a hyperlink:

p = new Process();
p.StartInfo.Fil eName = "iexplore.e xe";
p.StartInfo.Arg uments = "http://www.google.co.u k";
p.Start();

And for opening a file path use:

p = new Process();
p.StartInfo.Fil eName = "explorer.e xe";
p.StartInfo.Arg uments = "z:\\directory\ \";
p.Start();

Or to just execute a custom application on your network paths:

p = new Process();
p.StartInfo.Fil eName = "z:\\yourapp.ex e";
p.Start();

HTH.

Oct 8 '05 #3

Once I have done the build, is there a way the user could change the links
manually, and the text on the button?

Maybe with some sort of password protection.

ex - user right clicks on button, selects properties and only allow him/her
to change the 2 items?

Thanks,

Oct 10 '05 #4
BigBass1 wrote:
Once I have done the build, is there a way the user could change the
links manually, and the text on the button?

Maybe with some sort of password protection.

ex - user right clicks on button, selects properties and only allow
him/her to change the 2 items?


Hmm, you'll have to add this functionality programatically yourself somehow.
You can access the text of the button in your code using the ButtonName.Text
attribute, e.g:

Button1.Text = "My Computer";
Oct 10 '05 #5
Yes, but I am asking about after I build the project

"Leon Mayne [MVP]" wrote:
BigBass1 wrote:
Once I have done the build, is there a way the user could change the
links manually, and the text on the button?

Maybe with some sort of password protection.

ex - user right clicks on button, selects properties and only allow
him/her to change the 2 items?


Hmm, you'll have to add this functionality programatically yourself somehow.
You can access the text of the button in your code using the ButtonName.Text
attribute, e.g:

Button1.Text = "My Computer";

Oct 12 '05 #6
BigBass1 wrote:
Yes, but I am asking about after I build the project


That's what I mean. You could have some kind of settings page that asked for
the text the user wanted on the button using a textbox and then set the
button text to the value they enter:

Button1.Text = TextBox1.Text;
Oct 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2431
by: Scott Schade | last post by:
I have a form onto which I add a control during execution. The control is a control that I wrote. The control has a number of controls on it. I would like to click on a button on the control and execute a function on the form. Is this possible? Thanks, Scott
1
1577
by: Olav Tollefsen | last post by:
I have a rather fundamental ASP.NET question. On my page I have a search text box for user input, a button (which invokes a event handler on the page) and a user control to display the results. The button event handler will get a data set from a database and then calls a method in the user control to transfer the dataset to the control. Then it should render it's results to the page. My problem is that the order of events after the...
3
2498
by: Jeremy | last post by:
I have an ASPX page with a bunch of System.Web.UI.WebControls.Button controls on it. By default, clicking on any of these causes a Postback. I'd like to have it so that for a couple of these buttons, no PostBack occurs - and rather some client-side script is executed (with no postback subsequently occuring). I have wired up the client-side script to the Buttons in question using Attributes.Add(blah blah blah) - now I just need to somehow...
7
2574
by: MgGuigg | last post by:
Hello all, This is my first time posting a question to this forum, so here is hoping I am following protocol. I am scraping the rust off my old Basic programming skills, and have just recently upgraded to VB.NET, and I have a lot of catching up to do. That being said, I have come a long way in a short while, however, I am stumped at the moment. I have read through days of posts, but have not been able to address my specific question, so...
14
4960
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons for things like delete, save, edit, cancel buttons - in the footer, or on the form detail section? 2. If in the footer, how do you add them to the tab order?
1
6967
by: Jeff Lynch | last post by:
I'd like to add the following attributes to the Login control's Login Button to create a CSS rollover effect. How can I access the control's login button from the page's code-behind? LoginButton.Attributes.Add("onmouseover", "this.className = 'buttonsmallover'"); LoginButton.Attributes.Add("onmouseout", "this.className = 'buttonsmall'"); -- Jeff Lynch
1
1505
by: tranky | last post by:
Hi boys.. ....i've a question for you! I've a custom control with a button. Well... I need to create that: <mytagprefix:mytag runat="server" onButtonClick="Button_Click"> And in the code behind of this page, i find the Button_Click function.
1
3214
by: rn5a | last post by:
I want to create a custom control that encapsulates a Button & a TextBox. When the Button is clicked, the user is asked a question using JavaScript confirm (which shows 2 buttons - 'OK' & 'Cancel'). Till this point, no problem. Initially, the TextBox is empty. The Button has a property named 'ConfirmMessage' so that the developer using this custom control can modify the question in the confirm dialog. If the user clicks 'OK', I want the...
8
5843
by: =?Utf-8?B?VGFtbXkgTmVqYWRpYW4=?= | last post by:
I am working with Visual C# window and in my application I need to use a button ( NEXT) . The button should displays one panel with its objects each time it clicked. I already developed the codes for creating panels and their objects which will be questions and their answers. When the NEXT button clicked it suppose to display first panel with one question and its answers at a time. When the user selects an answer and click on NEXT button...
19
4551
Frinavale
by: Frinavale | last post by:
I'm in the middle of implementing a custom Ajax enabled Server Control. At this point I need help finding the answer to an Ajax Framework question...here it goes: I have a Server Control that extends from a Panel and implements the IScriptControl interface: Public Class MyCustomControl Inherits Panel Implements IScriptControl This Server Control consists of a collection of Labels, Panels, Buttons, Literals, other Ajax...
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8343
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8762
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8545
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7365
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5653
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.