279 Posted Topics
Re: You don't need the split method. Use the contain method. See the examples here:http://www.dotnetperls.com/contains-vbnet | |
Re: The code works fine Private Sub Command1_Click() If Text1.Text = "This" And Text2.Text = "That" And Text3.Text = "Those" Then MsgBox ("1") ElseIf Text1.Text = "This" And Text2.Text = "That" And Text3.Text = "Those" Then MsgBox ("2") Else MsgBox ("Failed") End If End Sub Private Sub Form_Load() Text1.Text = "This" … | |
Re: Use App.PrevInstance: 'this code would be in a bas module for start up.' Private Sub main() 'Check for previous instance and exit if found.' Dim rc As Long If App.PrevInstance Then rc = MsgBox("Application is already running", vbCritical, App.Title) Exit Sub Else frmMain.Show End If End Sub | |
Re: Well, I do think you might want to reconsider. 1)There are already lots of these programs around. 2)VB6 doesn't cut it anymore. Why? 3)I have coded and sold a program like this coded in vb3,vb4,vb5,vb6 and now rewriting it in vb.net. You are looking at 20000 lines of code, depends … | |
Re: Dim value1 as string="Item1 1" Dim value2 as string=value1.Replace(" 1","Yes") | |
Re: There are 2 issues: 1st) In windows 7 you havent't got the folder option to display your requested info to the statusbar as it has been removed by microsoft. 2nd) If you are coding your own explorer window you have the option to add the statusstrip from the toolbox to … | |
Re: Can you show some code so we know where it has to go - buton click, key event ? | |
Re: Please check this link: http://support.microsoft.com/kb/223152/en-us | |
Re: The error means that you haven't instanciated your workbook. The folowing is I think the way to do it: 'Instantiate a Workbook object. 'Load a template file. Dim workbook As Workbook = New Workbook("d:\test\MyBook.xls") 'Get the first worksheet in the book. Dim sheet As Worksheet = workbook.Worksheets(0) 'Insert 10 rows … | |
Re: This question cant be understood. What do you mean a datagrid upgrades if you click on a textbox? | |
Re: Check the keypress event of the datagrid. | |
Re: just search this site with 'connect with sql' there are plenty of posts | |
Re: Just prevent adding the string to the combobox by checking if it is already in the string collection of the combobox like (don't know if it works): If ComboBox1.Items.IndexOf(str) = -1 Then ComboBox1.Items.Add(str) End If | |
Re: Use & instead of + and the general code snippet is: Dim strFileName As String strFileName = File1.Path If Right$(strFileName, 1) <> "\" Then strFileName = strFileName & "\" strFileName = strFileName & File1.FileName Main.Show Main.Image.Picture = LoadPicture(strFileName) | |
![]() | Re: If you don't want anything happen on the key enter just don't use it. Private Sub TextBox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress Dim NotAllowed As String = "~`@%^&+={[}]()!:,;'><?/|\-.#+()_$*" If e.KeyChar <> ControlChars.Back = True Then If NotAllowed.IndexOf(e.KeyChar) = -1 = False Then e.Handled = True End If End … |
Re: FileSystemObject.CopyFile "c:\mydocuments\letters\ *.doc", "c:\tempfolder\" [Click Here](http://www.http://msdn.microsoft.com/en-us/library/aa265015(v=vs.60).aspx) | |
Re: The higher the version number the more features are built into the framework. The problem is that not every one is upgrading to the highest version of the framework. If you compile to lower version you might lose features you are using in your program. Better is to check before … | |
Re: There must be some in your program that overrides your setting. You can try this at the form load event: Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.WindowState = FormWindowState.Maximized End Sub | |
Re: 'You better read up on the inputbox methods. 'Declare all the values and variables Dim message as string="Enter the password" Dim title as string = "InputBox Demo" Dim defaultValue As String = "Me" ' this code set up your inputbox ' You are supposed to use a loop 'The loop … | |
Re: You are declaring Fee as double on th top and than returning an Integer in line 24 In line 12 you are assigning a double to a textbox ? textbox1.text= Cstr(checks)? | |
Re: Go to the menu bar -> File-> make project.exe and check out the options | |
Re: ElseIf checks < 39 Then This doesn't give you the range 20 -38 but th range 0-38 | |
Re: You have all done this before 7 moths ago http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/454451/counting-backup-files#post1973491 | |
Re: Net Framework 4 CLR20r3 Error http://social.msdn.microsoft.com/Forums/vstudio/en-US/a7ed93ad-2923-48c4-9e51-cf0bd6d4e100/net-framework-4-clr20r3-error?forum=netfxsetup From what I have been reading it could be that you compiled your program to a higher Famework version then what is installed on your friends computer. | |
Re: Intersection returns only the elements that are contained in both sets. It doesn' rtell you how many or at which positions they are. | |
Re: You have to modify it as you need it. I put a second textbox and sat it to multiline Public Class Form1 'Declaration Public Property AutoCompleteMode As AutoCompleteMode Public MySource As New AutoCompleteStringCollection() Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load ' Create the list to use as … | |
Re: O.K. put a button on your form and paste the code into it. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim word1 As String = TextBox1.Text Dim i As Integer For i = 0 To word1.Length - 1 MsgBox(word1.Chars(i)) Next End Sub This runs through the word … | |
Re: It looks to me that in line 9 you want to connect if the passwords are wrong? Check your if--then--else statement | |
Re: You get this error because your button names are different from from the construction in the addhandler statement. Read Reverend Jim's statement carefully | |
Re: Here are some code examples side by side vb6 and vb.net 8 http://msdn.microsoft.com/en-us/library/zzt5x46b(v=vs.90).aspx | |
Re: Here is just some basic code. Add items in formload. When an item is clicked in listview1 it is copied totextbox1. Where I copy the text you have to insert the code you need. Public Class Form1 Private Sub ListView1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListView1.SelectedIndexChanged Dim IntInd As … | |
Re: Your dim statements are out of the button click event.I also can't seew here you open the connection. You would perform these steps: 'Define connection string oConnect= 'Define the query oQuery = 'Instantiate the connectors oConn = New OleDbConnection(oConnect) oComm = New OleDbCommand(oQuery, oConn) 'Open the connection oConn.Open() 'Perform the … | |
Re: Assuming you have loaded doem the common control pack from Microsoft, you add the slider to your form, you go to the slide controls properties and change the orientation. Otherwise have a look at this link [Click Here](http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/106520/slider-control) | |
Re: The OP's code comes directly from here: http://www.tutorialspoint.com/vb.net/vb.net_exception_handling.htm where also is clearly stated: an exception is a problem that arises during the execution of a program. An exception is a response to an exceptional circumstance that arises while a program is running, such as an attempt to divide by zero. … | |
Re: I think the Dim statements in the module don't work like this. You need to dim the databse stuff in the event where you are using them. Also put your error msg into google and you will most likely find some explanation. | |
Re: You have at the beginning: Dim RFile(3) As String which is an array that should hold 3 elements. But You are trying to put 4 elements in: For I = 0 To 3 Input #1, RFile(I) (****Here is the problem****) because you go 0,1,2,3 | |
Re: Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click Dim str As String = Trim(TextBox1.Text) If Not Regex.Match(str, "^[0-9]*$", RegexOptions.IgnoreCase).Success Then MsgBox("Please enter Numbers text only.") Else MsgBox("O.K") End If End Sub Sorry this was forvb.net | |
Re: Dim txtString as String txtString=Trim(textbox1.Text) This will work only if you have not created a textbox array. The best is to show us the code you use to create your textboxes to receive sensible help | |
Re: This will probably work: Dim strFile, strData As String Dim ln As Integer Dim Reader As New System.IO.StreamReader(strFile) Do strData = Reader.ReadLine() ln = strData.Length If Mid(strData, 1, 1) = "A" And Mid(strData, ln, ln) = "0" Then strData = Mid(strData, 1, ln - 1) & " Replace with this" … | |
Re: Once a picture is placed in the picture box it has no memory where it came from or what its name is. What you can do is using the tag property of the picture box.Something like: Picture1(i) = LoadPicture(App.Path & "/ms1.jpg") Picture1(i).Tag=Filename This way you can refere to the tag … | |
Re: set the borderstyle of your form to none and play around with the opacity | |
Re: I think that vb.net doesn't install activex controls but net controls. So you might have used some activex control from vb6. VB6 installed these controls and registered these in the system using its installer and registration key. Try to install vb6 on the other computer and see if this works. | |
Re: Following your posts I guess you want to have a keylogger that does something when a keycombination is pressed. I would like to hate using a worprocessor and a keycombination and something unexpectedly pops up. This is just a guess on your other posts regarding catching keypress events, installing exe … | |
Re: What do you use? Adox, SQL, Access. To help you you need to more specific. | |
Re: Dim bal As Integer() =( 1000,2,3,17,50) should probably be bal As Integer() ={1000,2,3,17,50} the third error occured because of above http://msdn.microsoft.com/en-us/library/wak0wfyt.aspx#BKMK_ArrayElements | |
Re: Also check that both machines are running the same framwork version. | |
Re: Check the thread on this website: http://www.daniweb.com/software-development/vbnet/threads/457483/how-to-create-control-in-runtime | |
Re: Dim marks() As Integer ' declares an one dimensional array to hold integer ReDim marks(2) ' inialises the array to hold 3 integers at indecies (0) (1) ans (2) If one needs to hold more integers and doesn want to loose the ones that have been entered already then one … | |
Re: You find the progress control in the toolbox under common controls. Also you might want to check this link out: http://www.tutorialspoint.com/vb.net/vb.net_progress_bar.htm Your other post was probably deleted because you posted it twice. | |
Re: Even so it is a very simple method to print a form it takes some code to get it right.The reason is the DPI of your monitor and the scale of the paper you are using. Here is a link that will show you hoe to do it: http://support.microsoft.com/kb/230502/en-us |
The End.