|
I would like to make my an application that will allow it's user the change active audio devices on the fly without having to open control panel, go into Sound and Audio devices ect... I've new to VB and only a Beginner/Intermediate coder. Could someone show me where I should start? I couldn't find any examples online.
Thanks!
|
|
|
|
|
This is no way a beginner's job.
AFAIK you will need to use P/Invoke win32 api for this.
जय हिंद
|
|
|
|
|
this may help
http://www.codeproject.com/KB/cs/Enum_Recording_Devices.aspx[^]
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi,
I have a Treeview with 3 nodes under the root. My aim is to check the 2nd node whenever any child nodes under 2nd node gets checked. How could you do that?
Thanks.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
There's an event that gets fired when the node is checked. Loop back through the .Parent property until you reach the node at the second level, and check it
I are troll
|
|
|
|
|
use BeforeCheck or AfterCheck event
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hello all
I'm trying to include the a Grammer check into my app; one of the approaches that I've come across is using MS.Words' but it seem that I'm facing somedefficulties that I can't figure out;
mports System.Runtime.InteropServices
Public Class Form1
Inherits System.Windows.Forms.Form
' Invokes either the spell or grammar checker.
Private Sub SpellOrGrammarCheck(ByVal blnSpellOnly As Boolean)
Try
' Create Word and temporary document objects.
Dim objWord As Object
Dim objTempDoc As Object
' Declare an IDataObject to hold the data returned from the
' clipboard.
Dim iData As IDataObject
' If there is no data to spell check, then exit sub here.
If TextBox1.Text = "" Then
Exit Sub
End If
objWord = New Word.Application() // My problem is here as it shows that it is not defined
objTempDoc = objWord.Documents.Add
objWord.Visible = False
' Position Word off the screen...this keeps Word invisible
' throughout.
objWord.WindowState = 0
objWord.Top = -3000
' Copy the contents of the textbox to the clipboard
Clipboard.SetDataObject(TextBox1.Text)
' With the temporary document, perform either a spell check or a
' complete
' grammar check, based on user selection.
With objTempDoc
.Content.Paste()
.Activate()
If blnSpellOnly Then
.CheckSpelling()
Else
.CheckGrammar()
End If
' After user has made changes, use the clipboard to
' transfer the contents back to the text box
.Content.Copy()
iData = Clipboard.GetDataObject
If iData.GetDataPresent(DataFormats.Text) Then
TextBox1.Text = CType(iData.GetData(DataFormats.Text), _
String)
End If
.Saved = True
.Close()
End With
objWord.Quit()
MessageBox.Show("The spelling check is complete.", _
"Spell Checker", MessageBoxButtons.OK, _
MessageBoxIcon.Information)
' Microsoft Word must be installed.
Catch COMExcep As COMException
MessageBox.Show( _
"Microsoft Word must be installed for Spell/Grammar Check " _
& "to run.", "Spell Checker")
Catch Excep As Exception
MessageBox.Show("An error has occured.", "Spell Checker")
End Try
End Sub
Private Sub btnSpellCheck_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnSpellCheck.Click
SpellOrGrammarCheck(True)
End Sub
Private Sub btnGrammarCheck_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnGrammarCheck.Click
SpellOrGrammarCheck(False)
End Sub
End Class
>
any help? I've added the reference Microsoft Word 12.0 object but still has the same problem undefined ..!!!?
or if any has another idea; I will highly appreciate it...
cheers
|
|
|
|
|
Are you getting any error message?
I guess you need to use fully qualified names.
जय हिंद
|
|
|
|
|
Yes it is an error message ...
|
|
|
|
|
You need to specify the fully qualified name as I had mentioned before ie use
Microsoft.Office.Interop.Word.Application .
जय हिंद
|
|
|
|
|
I've done what you have mentioned; I appreciate your help...and now it says on the error message "Error Expected" what does it mean?
|
|
|
|
|
Hi All,
I want to work with some fonts which are created by me. But i don't want to install those in system Font folder.Which are accessed by only my software.
Pls help.How can it Possible.
Thanks
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
|
Very cool, didn't know that existed.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
When I start my program, it gives me error on this line.
.SubItems.Add(MyDataReader("A2".ToString))
"Overload resolution failed because no Public "add" can be called with these arguments"
Don't know what hte problem is........
Here are the code
Public Function FillListBox(ByVal Sqlstring As String)
ListBox1.Items.Clear()
ListView1.Items.Clear()
Dim OleDbConn As OleDbConnection = New OleDbConnection(ConnString)
OleDbConn.Open()
Dim MyDataReader As OleDbDataReader
Dim MyOleDbCommand As OleDbCommand = New OleDbCommand()
Dim MyDataSet As DataSet = New DataSet()
Dim MyOleDataAdapter As OleDbDataAdapter = New OleDbDataAdapter()
MyOleDataAdapter.SelectCommand = New OleDbCommand(Sqlstring, OleDbConn)
MyOleDataAdapter.Fill(MyDataSet)
MyOleDbCommand.Connection = (OleDbConn)
MyOleDbCommand.CommandText = Sqlstring
MyDataReader = MyOleDbCommand.ExecuteReader
Do While MyDataReader.Read
ListBox1.Items.Add(MyDataReader("Luidraad"))
Dim MyItem = ListView1.Items.Add(MyDataReader("luidraad".ToString))
With MyItem
.SubItems.Add(MyDataReader("A1".ToString))
.SubItems.Add(MyDataReader("A2".ToString))
.SubItems.Add(MyDataReader("A2".ToString))
.SubItems.Add(MyDataReader("A3".ToString))
.SubItems.Add(MyDataReader("A4".ToString))
.SubItems.Add(MyDataReader("A5".ToString))
.SubItems.Add(MyDataReader("A6".ToString))
.SubItems.Add(MyDataReader("A7".ToString))
.SubItems.Add(MyDataReader("A8".ToString))
.SubItems.Add(MyDataReader("A9".ToString))
.SubItems.Add(MyDataReader("A10".ToString))
End With
Loop
MyDataReader.Close()
OleDbConn.Close()
OleDbConn.Dispose()
|
|
|
|
|
.SubItems.Add(MyDataReader("A2".ToString())
BTW, "A2" is already a string?
I are troll
|
|
|
|
|
Eddy Vluggen wrote: "A2" is already a string?
it is a short string.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I had hoped never to be reminded of the shortstring again, along with the existence of the AnsiString, the PChar, the..
I are troll
|
|
|
|
|
Perhaps:
.SubItems.Add(MyDataReader("A2").ToString)
?
|
|
|
|
|
Thank you it works
|
|
|
|
|
Hi,
In my application I am trying to export a Crystal Report to a PDF and then use that PDF. But the problem I have is that the export doesn't complete quick enough for my application to use it. Any ideas on the best way to pause my application unitl the export is complete?
Thanks
|
|
|
|
|
Liqz wrote: Any ideas on the best way to pause my application unitl the export is complete?
I take it you are trying to open the PDF but failing because it is still being written to?
What you could do is loop around attempting to open the file. When you manage to open the file you know it is ready. Until then you just loop around again.
Also, be aware that this could potentially introduce an infinite loop in your application if the file handle is never released by Crystal Reports so you will want to build in a time out mechanism so that after attempting for a period of time you give up.
|
|
|
|
|
You can 'halt' the current thread, stopping execution of your code (5 seconds in the example below)
System.Threading.Thread.CurrentThread.Sleep(5000) This will prevent the form from drawing, because your application isn't processing messages. An alternative method would be to put the current time in a variable and enter a loop with a call to Application.DoEvents . Break the loop if a specified amount of time hath expired.
Third possibility is the use of the timer-component
Happy Programming!
I are troll
|
|
|
|
|
Eddy Vluggen wrote: a call to Application.DoEvents
That way madness lies.
|
|
|
|
|
Don't be afraid, and embrace that madness - you don't want to be the last sane person here, do you?
Insanity doth tickle the imagination
I are troll
|
|
|
|