Accomplish Is For The User To Select A Menu Item(New Tester) From The MainForm?
Oct 9, 2010
What I'm trying to accomplish is for the user to select a menu item(New Tester) from the MainForm(only used for menu)to open the NewTesterForm and enter a rating from 1 to 10( 10 being the best) for two different drinks. When the user clicks the ok button on the NewTesterForm it adds the new rating to the totals. It keeps adding the rating totals until a user clicks the cancel button which returns to the MainForm. When the user clicks on the MainForm menu item Summary, The SummaryForm opens and displays:
-average rating for each drink which drink had a higher rating(the name of the drink)the total number of testers
I've got a right-click menu that comes up in a treeview - with an option to ADD to that parent node or delete a child node.
Currently I'm using the SELECTEDNODE - but what I really want to do is change the "selected node" when the right-click occurs. But I'm having a hard time seeing how to do that...
How do you use this event properly??
Private Sub CapabilitiesTreeView_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles CapabilitiesTreeView.MouseClick Me.CapabilitiesTreeView.SelectedNode = End Sub
I've got a dynamically filled datagrid view. When a user right clicks a cell in the datagridview, it opens a context menu, located by that cell. The context menu has two choices: A and B. I want to set the value of the cell to A if they pick A, and B if they pick B.I would like to pass the relevant cell as a field in the event args passed to ContextMenu's ToolStripItem.click. So the handler for ToolStripItem A's click event would read the relevant cell from the event args and set it to A , like this...
Private Sub A_Click(ByVal sender As System.Object, ByVal e As Customized System.EventArgs) Handles A.Click e.relevantCell.Value=A End Sub
how to pass a custom event arg. Or if there is some easier way to do this? I can't just use the X and Y coordinates, because the context menu/mouse won't necessary by over the relevant cell.
the goal i want to accomplish is when the user presses a button, "moneyamount" increases by a random number generated. the problem i am having is that after the action is finished the script does not seem to save the new value and always starts at zero. here is the script:
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dojob1button.Click
Dim moneyamount As Integer = moneyamount + Int(Rnd() * 10) moneylabel.Text = "$" & moneyamount End Sub
How do I make a menu item on a menu strip link to another windows form (like a menu item that links to an about page already created in the project). I know that every coder knows how to do this, but i've read most of the instructions in the world for Visual Basic coding, but can't find ANYTHING I know coding fairly well, so I can modify it, but I can't create it my self.
i want to show context menu on drop down menu item right click...As an example,Suppose we add bookmark in mozilla & when we right click on that item..context menu is showing
Code: Private Sub MenuAddToFavorites_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MenuAddToFavorites.MouseDown If e.Button = Windows.Forms.MouseButtons.Right Then
In my application I have a listbox and SelectionMode should be MultiSimple because users need to see which items they selected. In another tab we have another listbox this one should show all the selection users had done in first tab. Private Sub
How someone would select an item from a list box and click a button and have that item go into another listbox with it's price? I seem to be stuck on this part.
Here's my code:
I want to select the first option from the first listbox and I want to put it into another listbox along with the price of that item on the same line in the listbox. I can't seem to figure out how to that.
Public Class Form1 Const dcmPRICE_STRESS As Decimal = CDec(595.0) Const dcmPRICE_TIME_MANAGMENT As Decimal = 695
I am developing a regex/pattern tester in vb.net where I have three textbox's:
- Textbox1: Here I enter my regular expression for pattern matching in textbox2
- Textbox2: Upload the plain-texts from dB and then look for a match
- Textbox3: Displays the result of the search.
Now the issue I am having is when I enter a regular expression in **Textbox1** and click search it is unable to find any matching pattern even though I have made sure a matching text is present in the paragraph.But whereas, if I enter the non-regex word/text itself in Textbox1 it is able to find a match.
In my button click_event I have initiated all the relavent regex functions etc but still not able to figure out why it wont except regex expressions instead of the word itself.Here is the code I am using for pattern search:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim m As Match Dim re As Regex Dim matches As MatchCollection
i have a treeview with 8 Root items, my program needs to add items to the treeview without me selecting the proper root or item, the root items have been coded so they cannot be deleted, but i'm not sure how to get the software to place data in a particular root by what its name is. when you add children the indexs change so im not sure where to begin. heres an example
how whould I go about deleteing an item from a listbox and it will select the next available item.you know like the treeview control selects the next node if you delete one.
I am using Rational Functional Tester(RFT) tool with Visual Studio 2010. The scripts are written in Vb.net. The application gets slower frequently and sometimes the browser gets hang..I assume the problem is in memory leakage. We are cleaning the memory of objects by calling dispose in finally but still there is no improvement. How can we increase the performance at the best in terms of memory.
VB express 2008 .net 3.5 or .net 4.0 VB express 2010?I have written application to convert RTF to HTML. The main Purpose of the application is to copy VS code to the clipboard and covert it then put it back into the clipboard as a HTML Document so that it can be pasted into a HTML document such as Windows Live Mail. I found that code copied and pasted is spaced out in in the wrong positions.
The applications works perfect with no bugs so far. I then asked Myself how to go about doing the copy with the least amount of operator interaction. So I added an Icon to the Icon Tray with a right click menu to use to convert once the Rich Text Format was copied to the clipboard. This works fine except you have Five steps, Select the text, Copy to clipboard, Right Click the icon, Select the Converter and Paste. The normal is three steps.
To this the best solution is to add a context menu item to the active form such as the RTF editor or window. So that when you select the Rich Text to copy and right click on the form to bring up that menu then to Just Select the menu Item such as "Copy RT and Convert" I searched and found about 544000 Items and tried to restrict down to no avail. I read until I finally gave up. I did not find any code examples of this. Almost every thing I found related to the web or some other explicit document like Excel and not to the Various windows that could be active with RT in it.
how do you add a context menu item to the context menu of an active rich text format window such as WordPad or VB?I have test in my application that tests to see if it is a RTF in the clipboard so if it is not the converter does nothing.
Imports System.Threading Imports System.IO Imports System
IT STILL GIVES A MSGBOX IF I SELECT THE CHECKBOX BOX OR NOT ....My code below will redirect to Google in both conditions: If the user selects the checkbox, then it will redirect to www.google.com, but if a user forgets to check the checkbox then it shows the msg box with an ok button. When I click on ok it should redirect to www.google.com
I want When a user forgets to check any of the checkboxes to show a msgbox with an ok button and stay on the same page. Otherwise if user selects any of the checkboxes then redirect to google
So i've to write this program whose purpose it this:
Purpose: The user enters the item name and amount of the item purchased. The program calculates the tax for the item and the final total, and then displays these values. Tax on all items will be 7.75%.
And so far i've this code but it's not working:
' Program: Cash Register ' Author: Nidhi Shah ' Date: February 2, 2010 ' Purpose: The Cash Register Window application will ' computer the tax and the final cost of a ' purchased item.
Option Strict On
Public Class frmCashRegister ' Tax per item - used in multiple procedures Const _cdecTaxPerItem As Decimal = 0.0775D
I want the DisplayMember property to be the property name to display for whatever kind of custom collection (persons, cars, etc) I have bound to the AutoCompleteBox.
I don't think I can modify the datatemplate programmatically. Is there a way I can do this with binding (relative source)?
I'm trying to make a program that adds a menu item when right clicking files.I got a C# code here:[URL] and converted it to VB. It's working perfectly but the trouble is, it adds a menu item to folders and not files.
These are the registry entries i added:
Private Const MenuName As String = "FoldershellNewMenuOption" Private Const Command As String = "FoldershellNewMenuOptioncommand"
I am trying to accomplish an Aero Wizard in VB.Net, shown here: Features in need include: Extended glass frameGlowing textRemoving original caption bar title and iconBack button
I have made an application which involves the .NET Chart control by Microsoft. My difficulty here is that I'm targeting my applications for lower specs computers, i.e. with fresh installed Windows XP and with .NET Framework 2.0 installed on them. Whereas the Chart control requires .NET 3.5 to be installed on the system.
I was thinking, is it possible that I make my app that runs on the system which has .NET 2.0 on it, and in the part where my app shows the Chart, it simply shows a message that "please install .NET 3.5 in order to view the trend charts". And when the user installs the .NET 3.5, my app detects it and enables the chart control.
Problem is that if I want my app to run on 2.0 framework, I have to set the target framework in compile options to 2.0. But that way I cannot put the Chart control on my WinForm because it requires at least 3.5 framework to be set in the compile options.If I set the 3.5 as target framework, then obviously it wont run on 2.0 system.
Can some kind of conditional coding be done that only runs if the system is equipped with 3.5 framework. I dont want to create two separate applications for 3.5 with chart, and 2.0 without chart.
In some of my TextBoxes and editable ComboBoxes, I want to make sure that the end-user can only type characters and whitespace but not to allow whitespace without characters existing too.
I have started to write a public sub and would like to know the best way of accomplishing this scenario check. This is what I have so far. Your ideas are welcome.
I'm trying to add an item to the system menu of my WinForms application. The following is the snippet of code I'm using. When this runs I can see the separator line added to the menu, but my 'About...' entry isn't added. I'm using VS2008, and running on Windows 7.[code]....
i've written a database program which runs fine from the ide (vs 2008).when i install this program, all database operations do not work.i tried running it as an administrator using an admin command prompt, it worked.now for my less tech savvy clients, is it possible that when they right click the programs icon they can use the 'run as administrator' menu item? how can i achieve this.if it's too much to implement, will moving the database from the application path to, say, documents?
i've written a database program which runs fine from the ide (vs 2008). when i install this program, all database operations do not work. i tried running it as an administrator using an admin command prompt, it worked. now for my less tech savvy clients, is it possible that when they right click the programs icon they can use the 'run as administrator' menu item? how can i achieve this. if it's too much to implement, will moving the database from the application path to, say, documents, solve this issue?
In WinForms, is there a way to add an item to the popup menu when you click on the icon in the forms control bar? Apps I can think off that use this is Chrome, and Command Prompt.