|
sanket h modi wrote: can u give me idea to generate a wave file and read it and convert it to hex which can be helpful to differentiate the input sounds of different user
Basically, you're going to have to do your own research on this. This is "voice print" security technology you're talking about. Just start Googling "voice print security" and you'll come up with a bunch of products, but little in the way of research papers.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi all...
I'm trying to set a right click function to my app, so that when a user right click anywhere in the application Window (except on controls), it will pop up a msgbox.
I've read some articles about using context menu but I hardly understands it. Can somebody explain?
http://www.datadynamics.com/forums/ShowPost.aspx?PostID=73192
|
|
|
|
|
You're reading about right clicking in the designer. Yuo just want to add a context menu, google for 'context menu VB.NET'
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi there, thanks for replying. I don't actually want context menu. I want a MsgBox to pop up when user right click ok the application. Any idea?
|
|
|
|
|
OK, you plainly want the mouse down message then, the trick is getting it in the non client area. I think you need to use the WndProc for that.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
If you just want the message when you right click the form the following will work (just add it to the form):
<br />
Protected Overrides Sub OnMouseClick(ByVal e As System.Windows.Forms.MouseEventArgs)<br />
MyBase.OnMouseClick(e)<br />
<br />
If e.Button = Windows.Forms.MouseButtons.Right Then<br />
MessageBox.Show("You clicked the form with the right mouse button!", "My Application")<br />
End If<br />
<br />
End Sub<br />
Hope this helps.
Tom
|
|
|
|
|
Hi there, it really works on an empty form. Can you teach me on how to apply this code on other object such as picture box etc?
|
|
|
|
|
Just create an event handler to the same code for the MouseClick event of the control(s) in question:
<br />
Private Sub MyControls_MouseClick(sender As Object, e As MouseEventArgs) _ <br />
Handles MyPictureBox.MouseClick, _<br />
MyLabel.MouseClick, etc, etc<br />
<br />
If e.Button = Windows.Forms.MouseButtons.Right Then<br />
MessageBox.Show("You clicked the form with the right mouse button!", "My Application")<br />
<br />
End If<br />
<br />
End Sub<br />
An easy way to do this is select the control in the desiger, open the property grid for it (F4), click the events button at the top (the one with the lightning bolt on it) and double click the event you want to create the handler for. This will create the code stub for the event handler automatically.
Cheers
Tom
|
|
|
|
|
greetings to all,
i badly needed your help, regarding msflexgrid from vb6 control:
- how to set a color on a particular / or current cell in
msflexgrid...
it may sound funny, im using this msflexgrid control on a vb.net 2005.. your help is highly appreciated... even a vb6 code may help if you can provide...
thanks
Fear does not exist, only in the mind......
|
|
|
|
|
moomoooomoo wrote: - how to set a color on a particular / or current cell in msflexgrid...
You can set the property CellBackColor - this will change the background color of the current cell, referred to by the current values of Row and Col properties.
|
|
|
|
|
first of all thank you....but;
could you elaborate more,.....
flxgrd.cellforecolor = sample.violet does not work on the selected cell of the grid...
how to change the font color in cell (row (4), col(5)) using msflexgrid?
ur help is highly appreciated...
thank you....
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Not sure about the FlexiGrid, but the ListView control allows you to modify the format of the subitems by setting ListViewItem.UseItemStyleForSubItems = False , then you just change the properties for a particular subitem to get the desired results.
There may be something similar for the FlexiGrid?
Hope this helps.
Tom
|
|
|
|
|
I dont know what type sample.violet is... what the CellForeColor expects is a long integer containing some RGB value. To set font color in cell(4,5), you will need to do something like:
flxgrd.row = 4
flxgrd.col = 5
flxgrd.cellforecolor = rgb(180, 180, 180)
hope this helps.
|
|
|
|
|
|
moomoooomoo wrote: im using this msflexgrid control on a vb.net 2005..
Why? Especially when .NET 2.0 comes with the DataGridView that is incomparibly more flexible than the old flexgrid.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Is there a way to get the time that the last event was fired by an application?
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Not if you didn't store it when it happened, no.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
So what would be the best way to intercept events and keep track of when the last one was fired? I'm trying to make a login box that will come back up and lock the user out if there has been no activity in the application for a specified period of time...any ideas? Thanks for any help and thanks for the quick reply.
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Take a look at the Application.Idle[^] event. It might be what you're looking for.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Thanks this looks great, should work perfectly!
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Sorry, I do have one question though, how will i know when the application is no longer idle?
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
There's no event for that one.
What you want to do isn't normally done in applications. It's left up to the system to lock itself.
You might want to look into overriding the WndProc of your startup form to get this. You dont need to look for a specific window message, just that there is one comming down the pipe.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
So, something along these lines:
Private mLastEventTime As DateTime = Nothing
Protected Overrides Sub WndProc(ByRef msg As System.Windows.Forms.Message)
MyBase.WndProc(msg)
mLastEventTime = DateTime.Now
End Sub
except I wonder if WndProc would be called during an idle event if it was not being handled elsewhere...do you think i would need to add an empty handler to the Application.Idle and override WndProc at the same time?
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Do you think this would work if i used application.addfilter?
Public Class LoginTimer
Implements IMessageFilter
#Region " Delegates "
Public Delegate Sub IdleSub()
#End Region
#Region " Variables "
Private mCurrEmpTimeout As Integer
Private mLastMessage As DateTime = Nothing
Private WithEvents mBackgroundWorker As New BackgroundWorker
Private mSub As IdleSub = Nothing
#End Region
#Region " Constructor "
Public Sub New(ByVal theSub As IdleSub)
MyBase.New()
mBackgroundWorker = New BackgroundWorker
mSub = theSub
AddHandler mBackgroundWorker.DoWork, AddressOf mBackgroundWorker_DoWork
End Sub
#End Region
#Region " Event Handlers "
Private Sub mBackgroundWorker_DoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs)
If Not mLastMessage = Nothing Then
If DateTime.Now.Subtract(mLastMessage).TotalSeconds >= mCurrEmpTimeout Then
mSub.Invoke()
mLastMessage = DateTime.Now
End If
End If
End Sub
#End Region
#Region " IMessageFilter "
Public Function PreFilterMessage(ByRef m As System.Windows.Forms.Message) As Boolean Implements System.Windows.Forms.IMessageFilter.PreFilterMessage
mLastMessage = DateTime.Now
End Function
#End Region
End Class
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Hi again!
My project is done and now I want to add icons to it.
I read that I can do this by selecting the *.ico file at the settings.
As I tried that, a error message poped up. The text was something like "32x32.ico is not a valid system file." I also tried a icon with 16x16 pixel with the same result.
I'm using Microsoft Visual Basic 2005 Express Edition if that has something to do with it.
I also added the file to the resources directory of the project.
Does anyone know how I can add Icons to the project?
|
|
|
|