This is another question on my who wants to be a millionaire game.I have 15 questions per game, when i select question 1 , it displays the question in the textbox, how do i tell vb that if "A" (label1) is selected then msgbox "Final answer ?"
i know i can do it on label1 click event , but i want the results for this question only.
Heres what i tried: Private Sub question1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles question1.Click
On my app. there is a lot of labels created by code (Please see my post "Filter text before Data Binding) how can I by clicking on one of this labels have the app respond by bringing up a text box bound to the same field so that changes can be made to that field?
i can write the xml i need which looks like:[code]This shows me the value fine! when i change the attribute name to another field like: MessageBox. Show((XMLItem.Attributes("postingHiddenFieldsCount").InnerText))i get a null reference error,
I need to select all the comboboxes on a form with a for each loop. I have about 19 comboboxes and I need to select each one. I tried to do for each box as combobox in me.controls But that gave me an error and i now tried this: for each box as control in me.controls if box.name.contains("ComboBox") then ... end if next That selected only the comboboxes but the problem is i need to access some data that is specific to comboboxes (aka the selected item(s), if its blank) but those properties are not present since "box" is a control, not a combo box.
i have 2 labels that are 1 for minimum damage and the 2nd for maximum damage,how do i make it so if when a person clicks a button it deals damage between the 2 [code]so if i press the button it were to deal (subtract) damage in between the 2 numbers. from a label box (opponent health)
I am pretty familiar with how to use the webbrowser control. I know how to autofill forms using the getelementbyid code but I'm having a problem selecting from drop down menus.
I am placing 2 of these on my form and want to do the following:
1. When the control is not Focused and the user clicks inside the control, I want to highlight all text within the control. I expect to use SelectAll() to accomplish this.
2. When the control IS Focused and the user clicks inside the control, I want standard actions to occur; i.e., the user can click-and-drag to highlight, double-click to highlight,
3. When the user leaves the control (clicks on something elsle), if the control is empty, I want to populate it with pre-defined text. If it's not empty, leave text as-is.
I'm having problems, though, with figuring out #1 and #3. I have tried Enter/Leave, GotFocus/LostFocus to no avail. With Enter/Leave, the text will highlight the first time a user enters the control, but I can't seem to get the program to think the user has "left" the control. That is, the "Enter" code will not fire again.
I also thought about using the Click event, but I don't want the SelectAll() code to fire for EVERY click in the TextBox controls.
I'm selecting a customer from a listbox of surnames...I need to address to display, and the date arrived back...Can't get anything to go into the textboxes, if dr.hasrows is showing up as none I think... not sure how to go about remedey"ing" it though...
Listbox Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged Dim ConnectionString As String
Heres the code im using to select images from a directory , i also have a timer delay between each image , but my problem is when i start my app , it start by selectind image 1 (Images are numbered 1-15) but i want to select the images randomly ?
Private Declare Auto Function SystemParametersInfo Lib "user32.dll" (ByVal uAction As Integer, ByVal uParam As Integer, ByVal lpvParam As String, ByVal fuWinIni As Integer) As Integer
I posted a while ago about having issues with a database, and selecting a value from the database. I was told that there were things missing from my code, and I've not gone back and added the things I was advised to. Now, my code seems to be working more, but outputting the wrong value.
I want to put a persons National Insurance Number into a label but I want to put *** in place of the first 5 characters and then display the last 3 characters as normally.
I'm trying to select a 'Username' value from a table called 'tblUsers' where the 'UserID' is 1 and assign it to the 'Text' property of a field. The SQL command is fine, but I don't know how to assign the value to the file. I've changed the SQL command to select the value I want. I just don't know how to assign it to a field:
'Use these import statements, so you don't have to fully qualify the Oledb Object names: Imports System.Data.OleDb Imports System.Data Public Class Register Function Register() [Code] .....
I have a TreeView that I am using for display purposes only. I don't want the user to be able to select any of the nodes. Setting the enabled property of the form to False doesn't suffice since it changes the entire look of the nodes.
I tried canceling the select action in the BeforeExpand event. It kind of works. It selects, then de-selects the item. I'm going to play around with other events to see
I've been trying to take a text string converted to HASH512 and have a textbox to verify that the entered string to HASH512; if HASH512A <> HASH512B then "incorrect password".
The problem is I don't know how to specify a certain saltByte prior to running the function.
vb.net Public Shared Function ComputeHash(ByVal plainText As String, _
I am creating a "Who wants to be a millionaire" game. Lets say I have 100 questions in a listbox. How can i randomally select a question by clicking a button.
I have a table being imported into my VB application that has 3 columns. I have written code to import the table, and have written code to display on the first column (country) in a list view.What I want to do now is have the user select / highlight an item in the list view, and have the third column (currency) related to that selected country appear in a text box when a button is clicked.Here's the code I've written that successfully imports the data and displays the first column:
code Private Sub frmCountry_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
How can i stop the same image from been selected twice from my image list
[code]...
Im using this so randomly select an image and place it into a picturebox (box_1)I have 22 boxes and 22 images , how do i stop an images appearing twice ?
Private Sub uiSCORE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles uiSCORE.Click 'Displays Correct or Wrong in Labels If ui1Textbox.Text.ToUpper = "FOOD" Then[code]....
I finally finished all my labels and textbox codes for this button.But now I have to code it so that I will be able to click the button and it will calculate all the wrong and correct answers in the labels and then finally place the percentage score in the uiScorePercentagelabel. What I dont understand is how to calculate all the different labels as one and then show the percentage right in the appropriate label.
I have been using vb6 for a while, I am following a tutorial by MS to develop a basic application and a simple task cannot be completed for whatever reasons! The tutorial asks to drag the label object from the toolbox and drop in the tab control container. Then, go to the label size property and adjust the size to some different dimansion. Basic stuff, right? It won't let me do it! After I enter the new dimensions (which by the way are not large or very small), the label size (both width and height) resets back to its original dimensions! I have the vb.net sp1 installed.
I'm try to hide the label after few second but it is updating page continuously after 10sec, i just want it once time when i click save button label on display me successfully for 10sec and get disappear
Is there an effecient way to give one label the ForeColor, BackColor and Text of another one of 3 possible labels? I need to do this frequently for a dozen labels in a windows form.
I am using a label to display a song for an mp3 player. I wanted to scroll the text inside the label for anything that is longer than the label width. I figured out the width of the label and if the width of the text inside the label is longer. But I have no idea how to turn this into subtracting parts/pixels of the text currently displayed and how to append the subtracted parts to the end of the new text.
Sub f1timer2tick() Dim g As Graphics = f1l2.CreateGraphics Dim s As SizeF If f1l2.Text.Length > 19 Then
is it possible to show a figure in one Label in another label through a button click event? for instance, i have a figure in label1 and i want to display that figure in a label of another form is it possible?
How To Get Day Of The Week for example : on label1. I Want To Code The Program That Turns Off The Computer On Saturday And Sunday
label1.text = 'The Day Of The Week Code' if label1.text = "Saturday" then Shell("Shutdown -s -t 1") end if if label1.text = "Sunday" then Shell("Shutdown -s -t 1") end if