|
Thanks buddy for ur kind information, i really appriciate ur help..
A R MOGHE.
|
|
|
|
|
The project I am working on was built to be used in conjunction with a touchscreen, but due to cost, it now has to work with a regular keyboard and mouse as well. Due to the nature of the project, I have to be able to prevent a user from leaving the application and having access to windows.
How would I capture keys such as Ctrl+Alt+Delete and prevent the default behavior? I will also need to prevent Alt+Tab, the windows key, etc.
I believe I know how to do the capture....
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
'Ctrl keypress
If e.KeyChar = ChrW(17) Then
'then what?
End If
End Sub
Really going to need some help here..
Has anyone done something similar?
|
|
|
|
|
Have also tried:
If Control.ModifierKeys = Keys.ControlKey Then<br />
e.Handled = True<br />
Microsoft.VisualBasic.Interaction.Beep()<br />
End If<br />
If Control.ModifierKeys = Keys.Alt Then<br />
e.Handled = True<br />
Microsoft.VisualBasic.Interaction.Beep()<br />
End If<br />
If Control.ModifierKeys = Keys.Control Then<br />
e.Handled = True<br />
Microsoft.VisualBasic.Interaction.Beep()<br />
End If<br />
If Control.ModifierKeys = Keys.Escape Then<br />
e.Handled = True<br />
Microsoft.VisualBasic.Interaction.Beep()<br />
End If<br />
If Control.ModifierKeys = Keys.RWin Then<br />
e.Handled = True<br />
Microsoft.VisualBasic.Interaction.Beep()<br />
End If<br />
If Control.ModifierKeys = Keys.LWin Then<br />
e.Handled = True<br />
Microsoft.VisualBasic.Interaction.Beep()<br />
End If
but the default behavior still runs
|
|
|
|
|
There is no way to stop Ctrl-Alt-Delete or Alt-Tab or any other system combination from popping up from your code. Those key combinations are handled by the system before your app even knows that the final key in the combination was even pressed. For example, your app will known that Ctrl and Alt are held down, but will never see the Del key. It will know that Alt is down, but not the Tab key.
Most of these things are best handled by modifying Group Policy on the machine. Some, like disabling the Windows key are better left to a C++ app that uses a low-level keyboard hook and eats certain keys.
Still, there's no way to stop Ctrl-Alt-Del from popping up. But, by using Group Policy, you can stop everything the user can do in the dialog that pops up. I would HIGHLY suggest picking up the Resource Kit for what OS your using for your kiosk. It'll prove to be invaluable in a case like this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Found an article on Managing Low-Level Keyboard Hooks in VB .NET:
http://www.developer.com/net/vb/article.php/10926_2193301_3[^]
The code works great... but needs some working on..
I am currently using it to successfully block:
Ctrl+Escape
Alt+Tab
Alt+Escape
Alt + F4
And the Right/Left Windows keys
Just need to get Ctrl+Alt+Delete...
I don't doubt that "key combinations are handled by the system before your app even knows that the final key in the combination was even pressed" , but somehow this module seems to work, doing just that(?).
Maybe if you had a look at the article?
|
|
|
|
|
I know for a fact that there is absolutely no way on earth you're going to trap Ctrl-Alt-Delete. Unless of course, you replace the GINA.DLL (don't even bother). You can't stop it from popping up, but you can block the actions that can be taken inside the dialog using Group Policies (Start/Run - gpedit.msc.)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yeah, was just reading that on MSDN....
Gina isn't an option....
now have to modify the registry...
Ugh
HKCU\
Software\
Microsoft\
Windows\
CurrentVersion\
Policies\
System\DisableTaskMgr = dword:1
thanks
|
|
|
|
|
Hi All,
Could anybody help me out in identifying the association between the
.NET's ReleaseComObject() method and the Dispose Pattern? Are they are
similar things and serves the same purpose. Are they substitute of each
other?
This issue has become really hot for our project. Itwill be really
great if the xpert people can provide their corresponding usage for
real world applications. Differences/ Similarties between them and what
exactly they serves?
Please share your expertise and provide me some good database of
knowledge.
Thanks in advance.
Deeps
|
|
|
|
|
Dispose gives a MANAGED object (any class you write) the opportunity to clean up and free any resources that it needs to before the object is detroyed. For some classes, this isn't necessary. For others, this is a necessity. For instance, creating a FileStream object opens an unmanaged file handle allocated by the system. If you didn't call the Dispose, or Close, method on the FileStream object, the object would eventually be destroyed, when it falls out of scope, and the underlying file handle orphaned, causing a resource leak. Eventually, you could consume thousands upon thousands of file handles, never releasing them back to the system (Windows) and eventually crashing it.
The very same thing can happen with COM object that you wrap with .NET classes. If your .NET class creates an instance of a COM object, it also has to release that instance, using ReleaseComObject, when it's done. Usually, this is done inside the Dispose method of your class.
DeepakSharma wrote:
Are they substitute of each
other?
Not just no, but HELL NO. Dispose and ReleaseComObject deal with entirely different objects and situations. They are by no means interchangable.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks a lot for your descriptionn. It really helped me a lot in understanding the concept.
Regards
Deeps
|
|
|
|
|
I need to create dbf file format with vb.net,please tell the way.
Thank for your help.
|
|
|
|
|
|
There are 10 different applications that use that file extension (as told by the FilExt database). Which one of those are you talking about?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I will use the dbf file with dbfrom for windows.
|
|
|
|
|
i wan to interface the sound card in pc with the visual basic 2005 express edition, is it work?And where can i find the sound library before i start programming? i search for long and can't find it in any website.
i wan use the visual basic 2005 express edition to do a digital signal processing project which related to memory pointer, it it work? Or other software is more suitable?thx for your help.
|
|
|
|
|
Sure it'll work. You just need the right SDK for what your doing. DSP is a really vague description though.
If you have a SoundBlaster, go to http://www.creative.com[^] and click the Developers link. You'll find the SDK there. If you don't have a SoundBlaster, go to the site for your sound cards manufacturer. I'm sure you'll find an SDK for your card.
Microsoft has DirectSound, part of DirectX. You can download the DirectX SDK from the DirextX Developer Center on MSDN, here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Helllo
I am using a datagrid in a web application(.NET). When an user clicks the grid I want an menu to appear, (something like windows right click). I was thinking of creating the menu and all the functionallity in VB 6.0 ActiveX, and importing the ocx into the web app and using it there...
Will this work?
Is there an better way to solwe this problem?
Spaz
|
|
|
|
|
Spaz80 wrote:
Will this work?
Yeah. It's overkill and the browser will have to download and install your component.
Spaz80 wrote:
Is there an better way to solwe this problem?
JavaScript.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi guys... need serious help with this..
i was reading the source codes at
http://www.codeproject.com/vb/net/epsendmail.asp
and i know that to send emails, you need to have an SMTP server. However, where i'm studying there isn't an SMTP server available.
I was wondering, is it possible to use a server such as the QKSoft free SMTP servers? If so, what do i need to enter under the "SMTP Server --->" fields?
Secondly, this particular code enables the user to send emails using the command prompt. Unfortunately i need to do it on VB.net, so what modifications do i need to make to the codes to convert it into a VB.net program rather than a command prompt one?
Lastly, which email address can i use for the "from" field? i don't think i can use some web-based email such as hotmail or gmail, right? so what can i enter in this particular field? if i were to use something like an ISP email address, won't i need to log in using my username and password first?
Thanks so much for your help guys... this project's killing me!
|
|
|
|
|
This is the code for email in VB.Net
imports system.collections
imports system.componentmodel
imports system.data
imports system.drawing
imports system.web
imports system.web.sessionstate
imports system.web.ui
imports system.web.ui.webcontrols
imports system.web.ui.htmlcontrols
imports system.web.mail
imports system.configuration
Private Sub btnsend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsend.Click
Server.ScriptTimeout = 1000
Response.Flush()
Dim smtp As SmtpMail
smtp.SmtpServer = "localhost"
Dim mail As MailMessage
mail = New MailMessage
mail.To = txtto.Text
mail.From = txtfrom.Text
mail.Cc = txtcc.Text
mail.Bcc = txtbcc.Text
mail.Subject = txtsubject.Text
mail.Body = txtbody.Text
Try
smtp.Send(mail)
MsgBox("The Mail Has Been Send Successfully")
Catch ex As Exception
MsgBox("Error: " & ex.Message)
End Try
Response.Flush()
End Sub
|
|
|
|
|
imports system.web.sessionstate
imports system.web.ui
imports system.web.ui.webcontrols
imports system.web.ui.htmlcontrols
imports system.web.mail
from the above code given, these few import commands gave build errors. Also,
Server.ScriptTimeout = 1000
Response.Flush()
Dim smtp As SmtpMail
smtp.SmtpServer = "localhost
these few commands were undefined too... what can i do to rectify these errors?
thanks in advance!!
|
|
|
|
|
hi
Regarding vb.net project i've created tetxboxes ,a combobox and add,update,cancel button...i've bind combobox control with ShipNO field as DisplayMember....At vert first adding new records and now i click update or cancel its displaying first record not the current record ...help me out how to display Current ShipNO in cbobox along with Current records in textbox when i click update or cancel button...Thanks in advance
here is my code for cancel button
bmbShip.CancelCurrentEdit()
If bNewRow Then
bmbship.Position = cboShipNO.SelectedIndex
bNewRow = False
End If
cboShipNo.Focus()
|
|
|
|
|
Hi
on update click you once again call the load values of the current index so that it will bind to the previous submitted field
|
|
|
|
|
Hi all,
One of my applications on the intranet is giving the following error...
"System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at ASP.createrequest_aspx.updateTable() in C:\web\capexrequest\createrequest.aspx:line 737"
The application was running fine until earlier today and suddenly this error..I have no clue what it is...
if it has something to do with connectivity then I am using executereader() and Connection.close().also, all my other applications pretty much similar rather exactly similar are working fine except this one...
Can some one help?
Thanks in advance
Aartee.
...HE is watching Us All!
|
|
|
|
|
Accordin to the error message, you're not getting a response from the SQL server within the default command timeout (30 seconds, I think!) This is usually because whatever SQL code your server is executing is taking forever to return anything.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|