338 Posted Topics
| |
Re: Chad, Try something along these lines. [CODE] Private StartTime As Integer = 100 Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp If e.KeyCode = Keys.A Then Timer1.Enabled = Not Timer1.Enabled e.Handled = True End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As … | |
Re: I don't believe in doing homework for people. However, I would like to try my hand at it. Why don't you guys do the same and compare projects in about 2 or 3 weeks. Maybe if they come up with something we can still help them out without doing their … | |
Re: I am using vb 2005 express. Double click on the "My Project" in Solution Explorer. Under the Application tab, lower left hand side, you will see Shutdown Mode. In the dropdown box select "When last form closes". Now in a button in form1 put [CODE]Form2.Show() Me.Close()[/CODE] You will do the … | |
Re: Your file is 45kb and say your speed is set to 5kb. You are setting your counter to 45/5 every time. Set a variable called say "BytesLeft". After you have read 5kb subtract it from you "BytesLeft". Try something like this: [CODE]Imports System.Threading Public Class Form1 Private BytesLeft As Integer … | |
Re: Try this. Add a button or menu item to your form and add this code. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.TopMost = False Dim proc As Process = Process.Start("notepad.exe") proc.WaitForExit() proc.Close() Me.TopMost = True End Sub[/CODE] | |
Re: You are going to have to know the file format for both wav and wma. Here is a link to the wav format. [url]http://www.wotsit.org/search.asp?page=8&s=music[/url] and wma [url]http://www.digitalpreservation.gov/formats/fdd/fdd000027.shtml[/url] once you figure these out then you can move on to the playing of the sounds. | |
Re: I always feel shorter is better so just add .clone onto your dose [CODE]Dim dose() As String = {"1/2", "1", "1 & 1/2", "2", "2 & 1/2", "3", "4", "5", "6", "1/2 ml", "1 & 1/2 ml", "2 ml", "2 & 1/2 ml", "3 ml", "4 ml", "5 ml", "10 … | |
Re: In your post you said: [CODE]I am creating a button & textbox manually and have those codes in the form load event. Also I disabled the button & I have the number 1 in my text box. [/CODE] Do you mean you put them on the form programically or using … | |
Re: Go to this page and go to lesson 8 and 9 to view video on how to use database in vb net. [url]http://msdn.microsoft.com/vstudio/express/vb/learning/[/url] | |
Re: A couple of things: [CODE] [COLOR="Red"]'you had this as gallons should be miles[/COLOR] miles = Console.ReadLine() [/CODE] and [CODE] [COLOR="red"]'move this to after calculate totals otherwise changing miles before adding to total 'miles = Console.ReadLine()[/COLOR] totalGallons = totalGallons + gallons totalMiles = totalMiles + miles [COLOR="red"]miles = Console.ReadLine()[/COLOR] [/CODE] | |
Re: [url]http://www.codeproject.com/vb/net/expression_evaluator.asp[/url] | |
Re: Try this: [CODE] Dim ary(TextBox1.Text.Length - 1) As String For x As Int16 = 0 To TextBox1.Text.Length - 1 ary(x) = TextBox1.Text.Substring(x, 1) Next Array.Sort(ary) Array.Reverse(ary) TextBox2.Text = "" For x As Int16 = 0 To UBound(ary) TextBox2.Text &= ary(x) Next [/CODE] | |
Re: If you are using vb express 2005 do this: [CODE] Dim done As Boolean = False Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If done Then Exit Sub done = True My.Computer.Audio.Play("c:\windows\media\Windows XP Logoff Sound.wav", AudioPlayMode.BackgroundLoop) MessageBox.Show("Now playing Windows XP Logoff Sound.wav") End Sub Private … | |
Re: First double click on the "MyProject" under "Solution Explorer". Toward the bottom left you should find "Shutdown Mode". CHange this to "When last form closes". To transfer text and open form2: [CODE] [COLOR="Magenta"]'In the TextChanged event transfer the characters to form 2 textbox.[/COLOR] Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal … | |
Re: Here's how you would redirect the output to a textbox. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Proc As Process = New Process Proc.StartInfo.FileName = "netstat.exe" Proc.StartInfo.UseShellExecute = False Proc.StartInfo.RedirectStandardOutput = True Proc.StartInfo.CreateNoWindow = True Proc.Start() ' This redirects the output to the … | |
Re: Actually there are 61 days between those two dates. [CODE] Dim date1 As Date = #10/10/2006# Dim date2 As Date = #12/10/2006# Dim ts As TimeSpan = date2.Subtract(date1) Label1.Text = ts.TotalDays.ToString [/CODE] This is mm/dd/yy. If dd/mm/yy then date difference is 2 days. Don't know about the calender control. | |
Re: You will have to get a third party control for this or make your own. All controls and form sizes will have to be changed to be in portion to the current resolution in the form load. The anchor properties of the controls and the flow layout and flowtable layout … | |
Re: A couple of changes to your code. 1. A better name for CommaName is CommaPosition - more discriptive 2. When you get the first name use instead: [CODE]First = Trim(Customer.Substring(CommaPosition + 1))[/CODE] If you don't give it a length it will take everything to the end of the text and … | |
Re: Try this: [CODE] Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim Diff As TimeSpan = TargetTime.Subtract(Now) If Diff.Seconds < 0 Then Label1.Text = "-" & Format(Diff.Minutes, "#0") & ":" & Format(System.Math.Abs(Diff.Seconds), "00") Else Label1.Text = Format(Diff.Minutes, "#0") & ":" & Format(System.Math.Abs(Diff.Seconds), "00") End If End … | |
Re: What kind of image processing do you want to do? The area is so big! Viewing images, brightness/contrast, resizing, etc. Not all is on one site as far as I have found. Also you can go to Barnes and Nobel and find a book on graphifcs. Any specific help let … | |
Re: As Inanna says: [CODE]Imports System.Math Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = CStr(RadianToDegree(Sin(0.2345))) End Sub Public Function RadianToDegree(ByVal radians As Single) As Single Return radians * 180.0 / PI End Function End Class [/CODE] | |
Re: Textboxes only use strings. So, 123 in a textbox is "123". To convert this to a single use Csng(Textbox1.Text). You souldn't rely on vb to make the right conversion so to put a nubmer into a textbox use Cstr(Var), where Var is a variable (single, double, etc) | |
Re: Simple answer, You can't. Unless someone has written a compiler that does that, which I doubt. Too much work and not enought money or people interested in doing that. | |
Re: To play sound: Process.Start(ListBox1.SelectedItem.ToString) | |
Re: The last line tells you, you can't. Is it windowless or is vb not seeing the window? [CODE]Unable to get window handle.. Windowless ActiveX are not supported. [/CODE] I don't think there is anyway to fake it. | |
Re: Try something like this: [CODE] Private Sub btnLoop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoop.Click Do While Not Done My.Application.DoEvents() Do While OverDone My.Application.DoEvents() Loop Loop Started = False Done = False OverDone = False End Sub Private Sub btnToggleDone_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles … | |
Re: `Me.WindowState = FormWindowState.Minimized` This is not my code. It is It is copyrighted by Andrew Vos 2004 :) to whom I am gratefull. Private Sub PlaceHolder_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove MouseDragging(e, Me) End Sub Public Sub MouseDragging(ByVal e As MouseEventArgs, ByVal Control As Control) Static … | |
Re: [QUOTE=php4ever]Looking for a good activeX or .NET control for a VB project in which I would like something better then the standard looking VB Tabbed control. It would be nice to see something turnkey. Any suggestions? ~ Jared[/QUOTE] Check out this: [URL="http://www.dotnet247.com/247reference/a.aspx?u=http://www.devcomponents.com/dotnetbar/"]http://www.dotnet247.com/247reference/a.aspx?u=http://www.devcomponents.com/dotnetbar/[/URL] | |
Re: If you look at the diamond you will see that each line has two more or two less *'s. So if you start with a string that has one * and print it. Then add two *'s and print again. Do this while the length of the string is less … | |
Re: check this site for video's for beginners: [url]http://msdn.microsoft.com/vstudio/express/vb/learning/default.aspx[/url] | |
Re: For VB 2005 try this: [url]http://www.codeproject.com/vb/net/vb2005ga.asp[/url] | |
Re: What kind of custom control? Do a Google search for "vb net control" and the type of control you want. Plenty of them out there free and otherwise. | |
Re: See my answer at A1VBCODE: [url]http://www.a1vbcode.com/vbforums/Topic18520-9-1.aspx[/url] | |
Re: Check out this site. It is for vb6 but you should be able to convert it. [url]http://www.shrinkwrapvb.com/avihelp/avihelp.htm[/url] | |
Re: Try this: lblWord.Text = lblWord.Text.Substring(0, i - 1) & letter2 & str.Substring(i) | |
I just got xp and reformated my hard drive and installed as per instructions from my friend. Everything worked right. I shut down the computer for the night and the next morning when I started it and went to the internet as soon as I hit the connect button on … | |
Re: Use the setup program in vb. It will install all the files needed to run your program. Wayne |
The End.