Advertisement

08.02.2008 at 11:56AM PDT, ID: 23616486
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

How to change and save at run time the information that the click event off a Button will need

Asked by FaheemAhmadGul in Visual Basic Programming, Programming Languages, .NET

Tags:

I have 2 buttons (Button1, Button2 ) and a RichTextBox1 on a form in a simplified version of my Project. Clicking on each of the three Buttons loads a prespecified file in the RichTextBox. This is through putting (in the Click Event of each of the Button) code such as as this:
Line 1) RichTextBox.LoadFile("c:\Test\Sample.rtf")
At the moment I put this code and the path for the file in the click event at the design time and off course I also set the Text property of the Buttons at the design time (in the case of the above example the text property of the Button would be Sample. I would like to have a way of enabling the user of my program to change the file name and the path part of the code (that is "c:\Test\Sample.rtf" part of the code ) in the click event of my Buttons at run time, in a way that it gets saved as well. I would also like my users to be able to change and save the caption (ie Text Property) of the correponding Button1 at run time.
I need advice about how I could possibly achieve that. The actual programme will have not 2 Buttons but perhaps a hundred Buttons but I have given a simplified example. The reason for having a way of saving these changes in the buttons is, of course, so that this step does not have to be repeated the next time users use the programme.
The reason, I want to do this is that I want my users to be able to open prespecified files very quickly through clicking a Command Button without having to go through the usual Open File Dialog Box. I am hoping that once the users have saved a file name and path for a particular command button and the new caption or Text Property, in a way that can be accessed by the click event of the Command Button, the corresponding file will open very quickly. I can save the these things at the moment in design time, but as, off course, the files that need to be opened in this way will change from time to time I want to have some way of allowing my users to change these (and saving the changes) at the runtime. The caption (or the Text Property) of the Buttons will also need to be changed and saved at run time when the  underlying file and path name will be changed.
I do not know how difficult it is going to be to do this . If it is not possible to explain the whole way of doing it in one answer to this question, I would like some general guidance on different approaches that can be taken to accomplish this task and will accept that as a solution. Once I have some general guidelines I will try to do it myself or breakdown this problem into multiple separate related questions.
Thank you for your help in anticipation.
Start Free Trial
[+][-]08.02.2008 at 01:31PM PDT, ID: 22145537

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Basic Programming, Programming Languages, .NET
Tags: Visual Basic, Visual Basic .NET
Sign Up Now!
Solution Provided By: c0ldfyr3
Participating Experts: 1
Solution Grade: B
 
 
[+][-]08.03.2008 at 04:57AM PDT, ID: 22147330

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628