|
Well, if you want to create a custom installer, try something like Clickteam Install Creator.
Or, if you want to create an installer using Visual Studio (not very customizable), then goto the "Build" menu and click on Publish. You can find options for the "Publishing Wizard" in your project's properties menu under the "Publish" tab.
Hope this helps.
|
|
|
|
|
I heard somewhere about a Sound Recording control in Vb 2005. Is this true, and if so, where can I find it? And if there isn't a recording control, is there another way to record sound using Vb?
Thank you for your help!
|
|
|
|
|
UltraCoder wrote: I heard somewhere about a Sound Recording control in Vb 2005. Is this true, and if so, where can I find it? And if there isn't a recording control, is there another way to record sound using Vb?
I don't know of any controls or classes in the .NET Framework that enable you to record audio. There is certainly a way to record audio in VB or any other language for that matter. You have the Win32/64 API and there is DirectX's DirectSound, although I'm not completely sure about DirectSound, I have never used it. I think Windows' standard multimedia API is called MCI. Take a look at the functions available in that .DLL If you are unable to find a .NET class library that enables you to record sounds then you have the opportunity to create your own using MCI.
http://www.allapi.net/vbtutor/tutmain.shtml[^]
Both API-Guide and API-Viewer are good programs for exploring the Windows API. They are tailored for VB6 but it should be easy to convert.
█▒▒▒▒▒██▒█▒██
█▒█████▒▒▒▒▒█
█▒██████▒█▒██
█▒█████▒▒▒▒▒█
█▒▒▒▒▒██▒█▒██
|
|
|
|
|
Thank you, but I'm not sure what to do. Could you please help?
Thank you for replying!
|
|
|
|
|
Here is something that may help.
http://www.codeproject.com/cs/media/DirectSound9p2.asp[^]
The Win32 multimedia APIs look very complicated, you best bet is DirectX. I would also check out the XNA Framework from Microsoft. Download XNA Studio Express and check it out.
█▒▒▒▒▒██▒█▒██
█▒█████▒▒▒▒▒█
█▒██████▒█▒██
█▒█████▒▒▒▒▒█
█▒▒▒▒▒██▒█▒██
|
|
|
|
|
I need to make 1 of my textboxes (which displays available system RAM) update itself every few seconds, now I very easily understand this example:
http://abstractvb.com/code.asp?F=26&P=1&A=1032[^]
BUT...
It up an exception saying something about threading.. has VB 2005 gone mad and is trying to eternally pee on me! or am i doing something wrong because i followed that exactly and i get that exception...?
|
|
|
|
|
Can you please post the exact error?
|
|
|
|
|
|
Use a timer control instead. It runs in the same thread.
---
b { font-weight: normal; }
|
|
|
|
|
I havent used timer controls, how would i type one out?
|
|
|
|
|
Just type:
Dim TimerControl As New Timer
|
|
|
|
|
oh ok thanks
|
|
|
|
|
Just drag the Timer control from the toolbox to your form.
---
b { font-weight: normal; }
|
|
|
|
|
ah cool
|
|
|
|
|
I am trying to format cost once the file is written to the database. Here is what I have:
Dim FormatCost As String
FormatCost = Format(row("coreprice").ToString(), "c")
It is displaying c instead of the actual number, but when I do this for example:
MessageBox.Show(Format(553378.6789, "c"))
This code works fine.
Any advice will be greatly appreciated!
jds1207
|
|
|
|
|
your using your ToString too early. you can only format a number/date. if the argument is a string, it doesn't understand that.
FormatCost = format(CSng(row('coreprice")),"c").tostring
|
|
|
|
|
|
FormatCost = String.Format(CSng(row("coreprice")), "c")
You do NOT need to call ToString on the return value of Format, since it's already a String.
Sorry, just one of my pet peeves.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
My apologies...I find extra operations annoying as well...
|
|
|
|
|
please tell me how to do numlock and caplock on or off show in statusbar panel.
Thanks.
Rehan.
|
|
|
|
|
Easy. Create 2 Status strip labels (CapsText and NumText). Then, create a timer and set it's value for about 100 milliseconds. Then in the timer control, type:
<br />
If My.Computer.Keyboard.CapsLock = True Then<br />
CapsText.Text = "Caps On"<br />
End If<br />
If My.Computer.Keyboard.CapsLock = False Then<br />
CapsText.Text = "Caps Off"<br />
End If<br />
<br />
If My.Computer.Keyboard.NumLock = True Then<br />
Numtext.Text = "Num On"<br />
End If<br />
If My.Computer.Keyboard.NumLock = False Then<br />
NumText.Text = "Num Off"<br />
End If<br />
I hope this helps. Be sure to have the timer go off frequently, otherwise there will be a delay between the user hitting the key and the text changing.
|
|
|
|
|
Bad solution. You do not need a Timer to do this. See my post to the OP for a better solution.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Handle your Form's KeyDown or KeyUp event (the KeyPreview property of the form needs to be turned on!) and look for the keycodes NumLock and Capital, then update whatever control you're using as a status indicator appropriately.
Private Sub Form_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.NumLock Then
' Keyboard.Numlock will return True or False depending on the status
' of the indicator light on the keyboard.
UpdateNumLockIndicator(My.Computer.Keyboard.NumLock)
End If
If e.KeyCode = Keys.Capital Then
UpdateCapsLockIndicator(My.Computer.Keyboard.CapsLock)
End If
End Sub
...and you do NOT need a Timer to do this!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Forgive but wouldn't this only handle the event when your form has focus? If you minimized your form and hit numlock, then maximized your form, it wouldn't know that the numlock was changed. I believe that's the purpose of the timer. So to solve this on a form_resize event, call the code on a windowstate change from minimized.
Private Sub Form2_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
if me.WindowState<>FormWindowState.Minimized then
UpdateNumLockIndicator(My.Computer.Keyboard.NumLock)
UpdateCapsLockIndicator(My.Computer.Keyboard.CapsLock)
end if
End Sub
Actually you would need to put it on the Form_Activate event as well...
|
|
|
|
|
There are a few other events you would have to handle to always know the state of the keyboard.
I'm not saying a timer is perfect, but definitely less coding.
Maybe a keyboard hook?
|
|
|
|