I have two comboboxes each with an entirely differnt name and for some reason when I press one of them it goes to the other one's code event (_selectedindexchanged). I checked the code line and they each have the same name (at the begining) and handle name (at the end). Anyone has any idea how this can happen and how I fix it?
I was looking for quick assistance with disabling the write button based on wrong user input. Program works great just feel like it needs a little more.
[Code]...
I don't like validating through the TextChanged event either as I believe that to be the cause of some issues. Doesn't the Textchanged event validate on each time a letter is typed?
im doing a textbased game and im stuck on a "mathtest" i gonna do in the game on the form its many things but i just gonna write that i want help with:) [code] i want to make that the label4 (Wrong) shows if the text not "25" when you press the button/
I've got a DataGridview I want to remove columns from as it greatly increases performance when I format the DGV. The first time I remove columns in a loop (using the removeat) property, everythings fine. But when I try to remove more columns in another loop, it appears to remove the wrong columns and displays the wrong data. In other words, it displays the wrong data and headers; and the columns it does show has headers and cells that don't match.
Its a League Organizer, basicly ive started it off with 16 teams and end up with 1(winner) 16 box's on the far left, then 8, then 4, then 2, then 1. the 16 box's have "Team 1" "Team 2" etc... ive put a new/clear/open/save button in that order.
BUT this is my problem..when i save(Save Button) the text file saves all the text wrong it ends up like this...Team 1Team 2Team 3Team 4 Etc...
But i want it to save like this
Team 1 Team 2 Team 3 Team 4 Etc...
The code is...
Dim Save As New SaveFileDialog Save.Filter = "Text Files (*.txt)|*.txt|ALL FILES (*.*)|*.*"
I have a login form which accesses to my website by WebBrowser. You have to put Username and Password in the two Textboxes to login... It works fine and it loggs me in to my site...but how can I tell if the password is wrong or not?
I am converting a VBA program to VB. I need to create controls at runtime as I don't want the user to be limited to the amount of information that they can input. I am converting this statement in vba:
Dim CF As CashFlowControl
CF = New CashFlowControl
CF.Cashflow = Form1.Controls.Add("Forms.Textbox.1", "Cashflow" & Cashflows.Count + 1, True) With CF.Cashflow .Left = Form1.Label2.Left .Width = Form1.Label2.Width .Top = Form1.Label2.Top + Form1.Label2.Height + (Form1.Label2.Height * Cashflows.Count) + 5 .Visible = True .Text = 0 .Text = Format(CF.Cashflow.Text, "$#,##0.00") End With I have tried:
Dim txtbox As New TextBox
CF.CashFlow = Form1.Controls.Add(txtbox) With CF.CashFlow .Name = "CashFlow" & Cashflows.Count + 1 .Left = Form1.Label2.Left .Width = Form1.Label2.Width .Top = Form1.Label2.Top + Form1.Label2.Height + (Form1.Label2.Height * Cashflows.Count) + 5 .Height = Form1.Label2.Height .Visible = True End With I've also tried:
CF.CashFlow = Form1.Controls.Add("vbtextbox","Cashflow" & Cashflows.count + 1) With CF.CashFlow .Left = Form1.Label2.Left .Width = Form1.Label2.Width .Top = Form1.Label2.Top + Form1.Label2.Height + (Form1.Label2.Height * Cashflows.Count) + 5 .Height = Form1.Label2.Height .Visible = True End With I still get the little wavy underline under the text after the "Form1.Controls.Add" statement and the error says "Value of Type 'string' cannot be converted to 'system.windows.forms.control." I also get the error "Too many arguments to 'Public Overridable Sub Add(value as systems.windows.forms.control)"
What am I missing here? This seems to be the way it is done in all of the examples that I have found on this site.
So i had a some objects on my project like a few textboxs and buttons, which all had code tied to. For example text1 button1. I delete the two objects (not code) from the project and then paste a text1 and button1 (same exact names) back into the form. now when you click button1 or text1 you get
"Private Sub Button7_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click"
rather than the code all ready in the project for button7. The reason im doing this weird situation was because i goofed some of the object settings and was copy and pasting the old objects from a backup version.
I'm quite new to VB Programming and I'm using Microsoft Visual Studio 2008 for programming. I'm writing an application that communicates with an Omron PLC via CX-Server Lite which brings some ActiveX plugins for VB. So far I solved a couple of problems and my application "is doing something" already.My question in the end might be really easy. I inserted 3 bitlamps (Omron ActiveX Components) in a form, gave them the size and position I wanted them to have. When I now start my application they show up in the wrong size. It seems as if they would keep there position but they simply have the wrong size and even overlap each others although I have them sorted nicely in Visual Studio.Another effect I have is, sometimes when I move the components around on the Form in Visual Studio they seem to be "behind" the Form. I can't see them anymore but i can highlight and move them.
I made a chat-room in Visual Basic, but when I run the deBug it works fine. When I build the application that's where things go wrong. I am using C4F-P2P.
Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'C4F_P2PWinformControls. Version=1.0.0.0, Culture=neutral. PublicKey Token=9569f7192217be80' or one of its dependencies. The system cannot find the file specified. ""DETAILS"" See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
I have two (2) variables in a textbox (L7B) and (D2B).
TextBox3.Text = (L7B) & " " & (D2B)
I want to write over (L7B) without changing " " & (D2B).I have been using the TextBox3.Text.remove command with success however in this case there are just too many scenarios. (D2B) isn't the same number of characters so I would have to determine the number of characters to remove in each scenario.
To write over (L7B) I thought I would try TextBox3.Text.remove ((L7B)). To my amazement VB accepted this command but when I run it it removes " " & (D2B). How is it removing the wrong variable? I could understand if it didn't work at all, after all that's what I expected to start but to delete the wrong variable !! why?
I'm attempting the following code to calculate how many quarters, dimes, nickels and pennies a user should get as change, and display them in four labels, when buying an item from a machine. The user inserts the amount paid and the cost of the item in two textboxes.My code is as follows:
Code: Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click
I have a byte array that I'm encoding to a string:[code]Then I write that to a file via IO.File.AppendAllText.If I open that file in 010 Editor (to view the binary data) it displays as this:47 43 44 53 79 73 74 65 6D 73 3F 0A 01 32 31 36..The original byte array contained 89 at position 11, and the encoded string contains 3F.If I change my encoding to Encoding.Default.GetString, it gives me:47 43 44 53 79 73 74 65 6D 73 E2 80 B0 0A 01 32 31 36.
I'm working with VS2005 Pro. When I show the toolbox to add a control to the form all controls display the same icon. The icon changes from one session to the next, but remain the same as long as I have the IDE open. I've applied all updates and service packs and the problem persists. It doesn't stop me from adding the correct control, but does make it a bit more time consuming finding the right one.
but when i run the query in my project the reader in not reading correctly...even if values are present is returns false and if values are not there then it returns true.
I decided to whip up a simple stopwatch-esque timer for some needs of mine. Well after writing a very basic code for the timer to show seconds and milliseconds I see that the intervals are wrong[code]...
I am trying to print out a triangle of stars with the longest side on the top. I have tried adding removing step, changing value of step, changing order of 5 to 1, 1 to 5 but I can't get it to reverse. I thought that is what step does? [code]
I have a function in VB.NET that loops through values and attempts to convert it to a decimal if IsNumeric is True,
Dim Value As String If IsNumeric(Value) = True Then Rate = CType(Value, Decimal) <--- bombing here End If
I've found that when the function receives the value 603E43 IsNumeric evaluates to True for some reason and then bombs on the conversion. Why would IsNumeric be true in this case?
I have attempted this code for an application that calculates and displays change in terms of quarters, dimes, nickels and pennies. The user inserts the amount paid and the cost of the item both expressed in cents in two textboxes. Then I have four labels displaying the results for each kind of coin. This is the process for the button I named Calculate:
Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click ' Variables for fields
I ran into a situation where FindControl was returning a control that wasn't a complete match of the Id I was searching by. There are two controls in the parentcontrol with similar Ids like: "MyControl" and "MyControlAlternate". When I call FindControl("MyControl") the control returned is "MyControlAlternate". I was wondering if anyone had any explaination why or thoughts as to what might be causing this problem. The way I got around this was implementing my own version of FindControl.