338 Posted Topics
Re: In the properties window of the button, check the cursor property. I should be "Defalut". If not change it to "Default". | |
Re: Use a picturebox control. [CODE]PictureBox1.Load("c:\graphics\HexView.gif")[/CODE] | |
Re: Hughv is right, use it only as an alert. Turn if off as soon as possible. | |
Re: First: In the 24 hour system you will never have a 24. It only goes to 23:59:59 then 00:00:00. So you don't need the if statement. Next: It looks like your dates are comming in in order. I would make my array hold date and count. Then when new date … | |
Re: Try this: [CODE]Public Class Form1 Dim OldPos As Point Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown OldPos = e.Location End Sub Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove If e.Button = Windows.Forms.MouseButtons.Left Then PictureBox1.Location = PictureBox1.Location - (OldPos - e.Location) … | |
Re: Try this: [CODE] Dim d As Date = "00:00:00" For x As Integer = 0 To 47 ListBox1.Items.Add(d.TimeOfDay.ToString) d = d.AddMinutes(30) Next [/CODE] | |
Re: I don't know rtf but try using IndexOf. [CODE] Dim s As String = " This is " & Chr(27) & "test of mine" Dim d As Integer = s.IndexOf(Chr(27)) + 1 Dim d1 As Integer = s.IndexOf("m", d) Dim s1 As String = s.Substring(d, d1 - d) MessageBox.Show(s & … | |
Re: Use a variable to keep track of the last tab clicked. I used a tab control with two tabs, a button on each page and a button on the form. Here is the code: [CODE]Public Class Form1 Dim TabPage As Integer = 1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal … | |
Re: The easy way is to read all the document into a mulitline textbox, find the text, delete it and then write the text back. i.e. [CODE] Private Sub WriteButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WriteButton.Click My.Computer.FileSystem.WriteAllText("c:\Documents\test.txt", TextBox1.Text, False) End Sub Private Sub ReadButton_Click(ByVal sender As System.Object, ByVal … | |
Re: Try this: [CODE]Public Class Form1 Dim ChangesMade As Boolean = False Private Sub TextBox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.LostFocus If ChangesMade Then If MessageBox.Show("Do you want to save?", "Save Changes", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then SaveTextbox() End If End If End Sub Private Sub TextBox1_TextChanged(ByVal sender As … | |
Re: Try this: [CODE]Imports System.IO Public Class Form1 Private Sub SearchBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchBtn.Click Dim dirInfo As New DirectoryInfo(DirSearchTxtBox.Text) [COLOR="Red"] Dim CutOffDate As Date = "#6 / 1 / 2008#"[/COLOR] FilesSearch(dirInfo, CutOffDate, FilesList) End Sub Public Sub FilesSearch(ByVal dirInfo As DirectoryInfo, ByVal CutOffDate As Date, … | |
Re: I would guess these are textboxes or labels. If there is no text in them and no border and the backcolor is the same as the form then you will not see anything. Try using a border around them and see if that doesn't solve you problem. | |
Re: You are showing 2 button3_click but no button2_click. | |
Re: Try this: [CODE] Private Sub TextBox1_Keydown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown, TextBox2.KeyDown If e.KeyCode = Keys.Tab Then If sender.Name = "TextBox1" Then TextBox2.Focus() e.Handled = True ElseIf sender.Name = "TextBox2" Then TextBox1.Focus() e.Handled = True End If End If End Sub Private Sub TextBox1_KeyPress(ByVal sender As … | |
Re: Check this: [url]http://www.vb-helper.com/howto_net_dec_hex_oct_bin.html[/url] | |
Re: Get rid of the if and all those elseif and replace with this: [CODE] Dim count1 As Integer = CInt(vDateTime.Hour) machinecount(count1, 0) += 1 If rs.Fields("Glide").Value = " 1 GPASS" Then GHTcount(count1, 0) += 1 End If rs.MoveNext() [/CODE] | |
Re: Check this: [url]http://support.microsoft.com/kb/146022[/url] | |
Re: Try this: [CODE] Dim a As Integer If a = Nothing Then MessageBox.Show("a is nothing") [/CODE] | |
Re: Try this: [CODE]If ListBox1.SelectedIndex = -1 Then MessageBox.Show("Not selected!")[/CODE] | |
Re: I think what you want is: [CODE]If something = true then A= 45 : B= 65 :C= 83[/CODE] | |
Re: I just ran your code and it works fine. Check all your settings on both forms. | |
Re: That is right and as far as I know that is the only difference....[COLOR="Red"]SPEED[/COLOR]. | |
Re: Or the Net way: [CODE] Label1.Text = (Single.Parse(TextBox1.Text) - Single.Parse(TextBox2.Text)).ToString [/CODE] | |
Re: You have to supply a caption to the Messagebox [CODE]MessageBox.Show("Please enter a first name.", [COLOR="Red"]"Your Caption", [/COLOR]MessageBoxButtons.OK, MessageBoxIcon.Information)[/CODE] Show your code for Client class. | |
Re: I didn't know that you could do that in vb6. [CODE] Dim a() As String ReDim a(10, 3) a(10, 3) = "test" MsgBox (a(10, 3)) [/CODE] In vb net you [B][COLOR="Red"]can't[/COLOR][/B] do that. May I ask why you want to do that? | |
Re: A queue is a first in first out. A stack is a first in last out. You might need a stack instead of queue. I you need a combination of a stack and queue then you will have to write youre own collection. | |
Re: You can also use something like this: [CODE] Dim str As String = " This is a : Test and has eight , words " Dim SplitChar As Char() = {" "c, ","c, ":"c} Dim ary As String() = str.Split(SplitChar, StringSplitOptions.RemoveEmptyEntries) [/CODE] This code looks for space , a comma … | |
Re: Set the controlbox property to false and remove the text. Then set then windowstartup to maximum. | |
Re: If you are using richtextbox then it has its own find method. Just keep track where you started so you know when you went through the whole document. Keep track of where you currentlly are to start your next find. | |
Re: Try this: [CODE]Public Class Form1 Dim Count As Int16 = 0 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim NewTab As New TabPage Dim NewTextBox As New TextBox NewTab.Name = "new tab " & CStr(Count) NewTab.Text = NewTab.Name NewTextBox.Text = CStr(Count) Count += 1 Me.TabControl1.Controls.Add(NewTab) … | |
Re: Try this: [CODE] Dim d As DateTime = CDate(TextBox1.Text) If (DateTime.Compare(Now, d) > 0) Then MessageBox.Show("Entered date has already happened. Please enter a future date.") End If [/CODE] | |
Re: The firs part of your request is called OCR (optical character recognition) and is very very hard. Try a Google search on it. | |
Re: Download the print form component from Microsoft [url]http://www.microsoft.com/downloads/details.aspx?familyid=286111b0-6965-46cc-bf6f-c5ee63b1f98c&displaylang=en[/url] | |
Re: Here is a project I use to let me know when I have to take pills. Hope it helps. | |
Re: As Eric said "Validate how"? To go thru all your controls use something like this: [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ctrl As Control For Each ctrl In Me.Controls If TypeOf (ctrl) Is TextBox Then ctrl.Text = ctrl.Name & " validated" ElseIf … | |
Re: You can't do that in vb 6. You will have to do it like this Dim intScores(4,2) As Integer intScores(0,0) = 75 intScores(0,1) = 90 etc. | |
Re: I am a fan of the videos. Here are some from Microsoft. [url]http://msdn2.microsoft.com/en-us/beginner/bb308734.aspx[/url] [url]http://msdn2.microsoft.com/en-us/vbasic/bb466226.aspx?wt.slv=RightRail[/url] and not video but some good tutorials [url]http://www.coder000.com/[/url] | |
Re: If you have the 2005 or 2008 vs or express then use: [CODE]My.Computer.[COLOR="Red"]whatever_you_are_looking_for[/COLOR][/CODE] | |
Re: Here are two videos that should help. [url]http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20040108ClickOnceJC/manifest.xml[/url] [url]http://www.microsoft.com/events/EventDetails.aspx?CMTYSvcSource=MSCOMMedia&Params=%7eCMTYDataSvcParams%5e%7earg+Name%3d%22ID%22+Value%3d%221032268872%22%2f%5e%7earg+Name%3d%22ProviderID%22+Value%3d%22A6B43178-497C-4225-BA42-DF595171F04C%22%2f%5e%7earg+Name%3d%22lang%22+Value%3d%22en%22%2f%5e%7earg+Name%3d%22cr%22+Value%3d%22US%22%2f%5e%7esParams%5e%7e%2fsParams%5e%7e%2fCMTYDataSvcParams%5e[/url] | |
Re: Try this: [CODE]Imports System Imports System.IO Public Class Form1 Dim fi As FileInfo() Dim di As DirectoryInfo Private Sub GetFiles(ByVal Path As String, ByVal Filter As String) di = New DirectoryInfo(Path) fi = di.GetFiles(Filter) For Each File As FileInfo In fi MessageBox.Show(File.Name) Next End Sub Private Sub Button1_Click(ByVal sender As … | |
Re: Try this: [CODE] If MessageBox.Show("Button Pressed " & CStr(Int(Button1.Text) + 1) & " times") = Windows.Forms.DialogResult.OK Then Button1.Text = CStr(Int(Button1.Text) + 1) End If [/CODE] or this: [CODE] Dim result As Integer = MessageBox.Show("This is a message") If result = vbOK Then Button1.Text = "Something" [/CODE] | |
Re: If you are using vb 2005 then you don't need to dim a new form just load the second form. Just make sure that the "Shutdown" in the Projects is set to "When last form closes". If it is set to "When startup form closes" then as soon as you … | |
Re: You are getting the first name twice because of this: FirstName(Count) = Temp.Trim LastName(Count) = Temp.Trim Try this: FirstName(Count) = Temp.Trim Temp = DataFile.ReadLine LastName(Count) = Temp.Trim | |
Re: If you don't have any .dll or other files used in the program, just copy the file over to the other system. The other system MUST have the .Net framework installed that the .exe was written in. | |
Re: Try something like this: [CODE] Dim FileName As String = "12345_789.567" Dim Index As Integer = FileName.IndexOf("_") + 1 If Index = 6 Then ' do whatever if the Index=6 End If[/CODE] | |
Re: Depends on who you talk to. I didn't find it difficult at all for the conversion. The syntax has changed but easy to catch on to. I knew some about oop so it was not hard understanding it. The best way to learn it is just jump in and ask … | |
Re: If you are using vb 2002 or 2003 then you have to use: Dim frm as new Form1 frm.Show |
The End.