I have 6 textboxes (named textbox7, 2, 3 , 5 and 6) and i want to switch the values put in them (7 in 6, 6 in 5, 5 in 4, 4 in 3, 3 in 2, 2 in 7) by clicking a button.Actually this should be a volley formation scheme :Pi wrote this
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox7.Text = Replace(TextBox7.Text, TextBox7.Text, TextBox2.Text)
In my word processor I have an 'Open' option on a menu strip. Here is the code for it:
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click With ofdFile .Title = "Select a file to open"[code]....
For some reason when I press the 'Open' item and open the ofdFile dialog box .txt files do not appear even when I have the 'Text Files' filter selected However, when I use the 'All Files' filter they appear. And the 'HTML Files filter is also working properly.Why are the .txt files not appearing when I use the Text Files filter?
I don't even know where to begin describing this. I have a project, that uses settings, for some paths, settings that I retrieve with the My.Settings. function.In my laptop, when I change the .exe.config file, the settings are updated accordingly, but when I try that on the production server, it just shows the default value used while compiling.
I tried changing the solution configurations to debug and other custom configs with no effect.Tried to use the same folder copied and pasted without version control, still the same result.Tried a co-workers laptop, by using the last svn revision, it works there too. But on neither of the servers works.
I cannot figure out why my calculation is not working. I am doing for 1 to 12 and it gives me 12 inputs but counts my entries as 13? What am I missing. If I change it to 0 to 11 same thing. I am not sure what the issue is, but I cannot see it, and am not sure where to look.I need to end up with 12 cycles through and intEntries to be 12.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'initialize accumulator Dim decEntries As Decimal[code].......
So I opened 2 forms, Form2.vb and Form3.vbNow I put this:
Private Sub Form1_PreviewKeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.PreviewKeyDownEventArgs) Handles Me.PreviewKeyDown If e.KeyCode = Keys.F8 Then
i am making a simultaneous equations program and cant figure how to get passedtext properly working, as i declare the amount questions the user wants to answer in the settings form, it then passes this over to the simultaneous equations form and i cant get it to keep spawning questions until the number is reached.
Public Class simultaneousequations Dim Random As New Random Dim typeofquestion As String = Random.Next(1, 3)
I have some System.Collections.Specialized.StringCollection 's in my.settings and the won't do anything: I have tried adding things to them and I get a null reference, now I have used these before and they worked fine I have tried reading from them, like I have in the past, and it dosen't read anything; the strings come out emtey as in one emtey string when there is three full strings
i am using controls (textbox, combobox, checkbox, etc) with Groupbox and without groupbox in the form
Tab function key is not going to the Groupbox Controls
For Example
Form1 { Textbox1
[Code]....
Once form1 loaded, textbox1 will be focus, then i click the tab it's going to textbox2, combobox1 and save button. The Tab is not going to Group box (textbox3, checkbox)
I have an unbound checkbox in my datagrid view along with other bound fields from a dataset. I do not need to send back the checkbox status to my dataset or the DB. Instead I will loop though the DGV and look for those checked and do another process with them after its done being loaded. The problem is this. When I check a checkbox, then check another, the first one goes back to unchecked and so forth, back and forth. There is no add, update or deletes needed for this DGV.
I got the following code from net,its working sometimes but sometimes not working, why?Its not showing the video by every click of the button Preview.I want some better code which will work smoothly and will show the video by every click. [code]
i have a windows forms app which displays a bunch of records from my sql database. when i modify records in the grid and click on save, all changes are saved EXCEPT the changes made to the currently highlighted row. they aren't written out the database until i exit the actual program, despite clicking on my save button.so for example, if i change 5 different records in the grid, and click on save, and then click on refresh to reload the data from the database, 4 out of the 5 are saved correctly, but the row that is currently highlighted (meaning, the last row i changed) still has the old data.My code for the save button look like:
Code: Private Sub TerritoryBindingNavigatorSaveItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TerritoryBindingNavigatorSaveItem.Click
I'm using fileopen() function to open the file, after doing all the works I'm using fileclose() to close the file. But when I access the file again it returns already the file is opened by another process.
Sample: Dim intFile As Integer = FreeFile() FileOpen(intFile, mstrFilename, OpenMode.Binary, OpenAccess.Read, OpenShare.LockWrite) FileClose(intFile)
I designed a software in which I used active captionas background colour. Now It works on my computer or current OS but not working properly onto other computers or OS. I mean to say that the background colour
i followed a few tutorials on here to create a calculator in VB.NET. But i am having trouble getting the percent button working properly.I have tried to come up with some things but nothing i have tried is working.I used this Basic Calculator VB.Net and this one Create a Calculator.I have searched google for an answer but it seems what i have is not working.Im not sure exactly what is needed so i will post all of the code i have. [code] My percent does not work it multiply's by a random number is seems.I am new to VB.NET so im not sure what i am missing.
-> When i open the windows form, if i press ctrl + Enter, then pop windows is opening
-> if i enter any data's in the text box, then i press ctrl + Enter, then pop windows is not opening
Code
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.KeyPreview = True End Sub
[Code]....
When the form load, ctrl + Enter shortcut key is working, once i enter or select any data's in the form, then ctrl + Enter shortcut key is not working (not showing the popup windows)
I am using VB 06 code for MS winsock and no im not supprised its not working properly but I cant find any tutorials anyware for VB 08 and its starting to anoy me. I have managed to reorginise some of the code so it works but im at a loss to know what to do to correct these errors. .
If you try to access a password protected page it does a security check and redirects you if you are not logged in, retaining the URL (ie. Members/MemberLogin.aspx?oc=/PodCast/Default.aspx)The vb script places the "/PodCast/Default.aspx" in a variable and holds it until the login process is complete.Once the user types in their username and password it is suppose to do a Response.Redirect(strRedirectURL) and go to the "/PodCast/Default.aspx" but instead it goes to the default.aspx page for logging in successfully
I have programmatically set up a Datagrid and binding navigator etc., but I cannot get the movenext, movelast buttons to actually hook up to the Data on the Datagrid.
I have tried to set up an addhandler for the BindingNavigatorMoveLastcontrol, and although I can get the BindingNavigatorMoveLastcontrol to display my messagebox WHICH IT DISPLAYS TWICE FOR SOME REASON I cannot get it to actually move around the Dataset, or any of the other navigation properties for that matter.
In my windows app i have a button which is only visible when a user selects a certain value on a DropDownList. For some reason the button does not work when i click on itI've enabled the button on page load and it works, however when i choose the value on the Dropdownlist the button does not work.
Protected Sub DropDownList4_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles DropDownList4.SelectedIndexChanged If DropDownList4.SelectedValue = "Yes" Then
I have spent a long time trying to find a solution for the problem I am having with comboboxes within a child form. I'm sure this must be a Microsoft error and not something I'm doing wrong..The best way to explain the problem would be to tell you what I have done so far:
If you open a new Project in VB and add two Windows Forms. Form1 will be the parent. Form2 will be the child.On Form1 add 1 x panel(Form2 will open up within the panel so make sure the panel is big enough to fit Form2) and 1 x button. The only code needed for this form is:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code]...
Now run the program and click button1 to open form2 (form2 should now open within panel1).
The comboboxes and textboxes lose some of there functions for example: 1. You cant set focus on combobox without hitting drop-down 2. You cant highlight text properly in either the combobox or textbox. 3. You cant set the cursor index position using your mouse in the combobox or text box.
Does anyone know a way around this?? Mainly for the combobox as I've got some functions working for the textbox.
I am having issues with a combobox set to: AutoCompleteMode = Append, AutoCompleteSource = ListItems. Example: Items in the combo are: "Average", "Good", "Poor". If "Average" is selected in the combo, then I type "G", "Good" will autocomplete. But if "Average" is selected, tab out of the control, then tab back into the control, then I type "A" nothing is autocompleted. It just shows "A" in the combo.
I am trying to introduce "user.config" corruption handler in my application. The approach I am following is that when the first time my application access user setting variables, I put that in try catch block and if the file found corrupted i simple delete it and reload setting variables. but I dont know why reload functionality is not working properly. What my understanding about reload is that it will reload all user setting variables to its default value, but in my case even after reload() everytime appliction access user setting it generates exception. My code snippet is as follows:
Try test = My.Settings.Mysetting Catch ex As Configuration.ConfigurationException
I created an exe app in vb.net and I want it to run every 3AM so I used the scheduled task feature of Windows 7. The app has an initial form that will countdown from ten before proceed to the main process. My problem is that the form doesn't poped up. But when I look at the task manager, my app is running. I don't know what's wrong with it because when I tested the app to run at times when I am viewing it, the initial form pops up. I already set everything like to Run whether user is logged on or not. So I really don't know what wrong with my app.
I am using VB.NET 2005 and running non embedded crystal reports from the SQL server and have following variables database name, server name, user name and password in the application settings editor and given the default values.
I have created a form that allows these settings to be changed by the user and the probem that I am having is that, the reports are still running with incorrect credentials. The following code runs when the user modifes the values and clicks OK button