|
You can't! Since the device is on the network, there will be no keypresses coming from it. You really need to get ahold of the documentation for this device and find out how to communicate with it. Precisely, how does this device send it's data to the host? Without knowing that, you have no chance of getting any information from the device.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello again,
I need some help with a simple OLEDB query. I need to return one value from an Access database. the code below is a snapshot of what i have so far.
Imports System.Data.OleDb<br />
Public Class Prices<br />
<br />
Public Shared ReadOnly Property Price(ByVal Name As String, ByVal Size As String) As Double<br />
Get<br />
Dim connString As String = "Data Source=""C:\Documents and Settings\user\" & _<br />
"My Documents\Visual Studio Projects\Quiznos Register\Assoc. Files\Quiznos.mdb"";" & _<<br />
"Jet OLEDB:Engine Type=5;" & _<br />
"Provider=""Microsoft.Jet.OLEDB.4.0"";" & _<br />
"persist security info=False;"<br />
Dim conn As New OleDbConnection(connString)<br />
Dim cmdGetPrice As New OleDbCommand("SELECT Products.Price FROM Products Products WHERE" & _<br />
"(Products.Name='Classic Italian') AND (Products.Size='Small')", conn)<br />
<br />
Try<br />
If conn.State <> ConnectionState.Open Then<br />
conn.Open()<br />
End If<br />
Catch ex As OleDbException<br />
MsgBox(ae.Message)<br />
End Try<br />
<br />
Select Case Name<br />
Case "Classic Italian"<br />
Select Case Size<br />
Case "Small"<br />
Price = cmdGetPrice.ExecuteNonQuery '<----- This is where it gives me the error.<br />
'other cases for other sizes<br />
End Select<br />
' other cases<br />
End Select<br />
Return Price<br />
<br />
conn.Close()<br />
<br />
End Get<br />
End Property<br />
End Class
at the line "Price = cmdGetPrice.ExecuteNonQuery", i get an InvalidOperationException. what do i need to do to return this single value
thanks ahead of time,
stephen
|
|
|
|
|
Hello!
It seems that your query is returning more than one record....
Try out this query..
SELECT Price FROM Products WHERE
(Name='Classic Italian') AND (Size='Small')
This is coz no need to give alias when working with a single table.
Also check the table 'Products' for rows having same 'Name' and'Size'.
If it doesnt work......try to use a dataset to give value to varialble 'Price'
_mubashir
-- modified at 7:06 Friday 26th August, 2005
|
|
|
|
|
Hi there,
is there a way using VB.Net to create a pop-up in a webform to let the user enter data and sends it to another form?
|
|
|
|
|
Not in VB.NET. You have to do it in JavaScript in the HTML itself. Then post it using the same methods that any ASP.NET page does. But that's a question for the ASP.NET Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
To give my local aspx app the access it needs to create a Windows Media Services object on a remote server, I need to tell it what user to run as. (I am following these instructions: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmsrvsdk/htm/creatingremoteserver.asp)
How do I configue IIS so that the aspx runs as a specific user?
________________________________________________________________________
Dave
Y10K bug! Let's not get caught with our pants down **AGAIN**! (DC 02002)
|
|
|
|
|
Hello I have a question concerning datagrids.
How can I show hierarchical data in a datagrid using a relation without requiring the users to click on the relation hyperlink?
Can I set the DataMember Property in some way?
Any help will be appreciated
Thanks in advance
David Gautschi
|
|
|
|
|
When an XP user switches user (ie doesnt log off) their programs remain running. This is true for VB applications also, they continue executing script. However if the calling of a DLL procedure is part of the script, the application ignores the command and carries on until the user logs back on and then the application resumes sending and receiving data to/from the DLL. Does anyone have any suggestions on how to continue this process even when the user is not strictly logged on (without scripting the DLL procedure in VB)?
Cheers in advance.
°[Halo]°
|
|
|
|
|
This should not be the case. What functions are you calling? What are you expecting them to do?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Keylogging functions. I am using user32.dll to log key strokes and I am attepting to log them over user accounts.
|
|
|
|
|
No wonder. You can't do that. An application running under your account cannot see what going on in another logon session, period, end of story.
The only thing that can see into another session is a Windows Service.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Right so I cannot see into the windows sessions - only windows can do that. So would it be possible to sort of integrate the keylogging application with the OS and make it a sort of system application which COULD see over different user sessions?
Cheers
°[Halo]°
|
|
|
|
|
Like I said, write your app as a Windows Service. You'll also have to write into your app a low level keyboard hook. This is the only way to see keyboard messages before they're dispatched to the user session.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How to call a class to work?
|
|
|
|
|
What??
Are you talking about something like
Dim myClass As New TestClass
myClass.SomeMethod(parameters)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
No i have this as a class in my FORM:
Public Class Mail
Public Sub SendEmail(ByVal message As String, ByVal email As String)
Dim mymail As MailMessage = New MailMessage
mymail = New MailMessage
mymail.From = "adrideba@yahoo.com"
mymail.To = "ginncan@yahoo.com"
mymail.Subject = "Test"
mymail.BodyFormat = MailFormat.Text
mymail.Body = "This is a test"
SmtpMail.SmtpServer = "smtp.mail.yahoo.com"
SmtpMail.Send(mymail)
End Sub
End Class
Now i want this class to be played when i click on a specific button inside the same form. how can i do this or it cannot be done like this?
|
|
|
|
|
Public Class Mail
Public Sub SendEmail(ByVal message As String, ByVal email As String)
' The next two lines can be condensed down to one.
'Dim mymail As MailMessage = New MailMessage
'mymail = New MailMessage
' becomes
Dim mymail As New MailMessage
With mymail
.From = "adrideba@yahoo.com"
.To = email
.Subject = "Test"
.BodyFormat = MailFormat.Text
.Body = message
End With
SmtpMail.SmtpServer = "smtp.mail.yahoo.com"
SmtpMail.Send(mymail)
End Sub
End Class
' To run this in a button click event handler:
Private Sub SendMailButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SendMailButton.Click
Dim myMailClass As New Mail
myMailClass.SendEmail("message text goes here", "person@somewhere.com")
End Sub
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modifed at 13:06 Thursday 25th August, 2005
|
|
|
|
|
when i click on the button an error occured telling me this:
An unhandled exception of type 'System.Web.HttpException' occurred in system.web.dll
Additional information: Could not access 'CDO.Message' object.
Can you please tell me why? the greenhighliter is indicating on the smtpmail.send(mymail) i think that there is something wrong in the smtp? what do you think?? :-?
|
|
|
|
|
There's about a gazillion things that can cause this exception.
Start here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How to make something moves in vb.net? such as snake?! i want to be on gameing programming but i wish to learn more on this sector. can someone tell me how to make something move from here to ........ here?!
|
|
|
|
|
That's about as general a question as it gets. There are SOOOOOO many different ways of doing something like this, you're best bet is to pick up a book or two on game programming. The other option is to Google for "Windows Game Programming" to come up with a large list of sites that deal with the subject.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Suddenly my project does not send my debugging output to the output window...
Yes, I am running it in debug mode.
Is there any particular settings I need to check? and how do I get to them?
Thanks in advance for any help.
|
|
|
|
|
Under the Tools/Options menu in VS, click on Debugging in the left window. There is an option to "Redirect all Output Window text to the Immediate Window" (at least in 2005 anyway!). Make sure that option is not checked.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello i have a problem with the 'system.web.mail'. when i write imports system.web. the mail cannot appear!! All i have is System.web.AspNetHostingPermission and AspNetHostingPermissionAttribute and AspNetHostingPermissionLevel! How can i bring the system.web.mail!? Can someone tell me please!! Thanks ALOT!!
|
|
|
|
|
Did you set a Reference to the System.Web.dll file?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|