|
Nope. Not that good with ASP.NET. You would probably have better luck posting this question, with alot more detail, in the ASP.NET Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all
I want to pass a event From outside of the form to the minimized form. e.g if i will click in the desktop i should able to get the location i clicked. or my mouse over event i have to get the postion of the cursor.
Can any one help me the way
Wating for respnse
Regards
Arun
Arun Kumar Sabat
Bangalore
India
|
|
|
|
|
hi,
Arun, this may not be what you want. But i have a small doubt on this question. i am explaining my level best.
See, Events are user generated or systems generated. Events are used to notify the system that some actions is happend. Each and every windows based applications have their own message queque( event loging) that will keep the messages or events which is generated by the user. This event loging is maintained by operating system itself.
Here you want to pass an event which happend in one form(window) to another. That is you want to merge a perticular event(message) into another message context. So i don't think so that , it is possible to pass an event from one window to another window which doesn't have any logical relation. And one more thing i want to specify now. See if we can hadle this event's and event logging priority then we would have easily deside which window need to execute and which event need to triggers even though they have least priority in message queue.
So i don't think that it is possible to merge your event into some other windows message queue. Actually it is maintained by OS itself.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Unfortunately, you won't get these "events" directly. Since your app doesn't have the focus when they happen, you'll never see them.
You'll have to implement an IMessageFilter and add it your applications message pump, using Application.AddMessageFilter . Once done, you'll be able to receive all message, like mouse click messages, before their dispatched to their destinations. But, be warned ... the code you write for this method will have to be very efficient otherwise you'll end up slowing the system down!
See RemoveMessageFilter[^] for a small example. There is also this[^] article here on CP.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank u
sreejith and Dave
I did not have a idea about IMessageFilter implimentation. I got some idea from u'r give link.
I got my answer from the URL
http://www.codeproject.com/csharp/globalhook.asp[^]
Here It has given a example where we can read any event outside of my form either from key board or from mouse
Bye
Arun Kumar Sabat
Bangalore
India
|
|
|
|
|
hello all
i am using SMTP Mail Client for sending emails. I want to send images in mail, but i m not able to do this. Is there any solution for it.
Thanks
Sumit Domyan
Software Developer
ANALEC INFOTECH
|
|
|
|
|
HI,
I have been given a problem.I tried to solve it but iam encountering errors.The problem is that I have been given a Visual Basic application (.exe) which stores details of students in MS Access Database.The problem is that at times,the records are saved & at other times the records are not saved.The error is reported as "Error in Saving the Record."This happens irrespective of the operating system being used.
Please help me solve the problem at the earliest.My email is websitedeveloper@indiatimes.com
I have posted the application along with the database in which we are supposed to store the data on my website.I even have a pic of the error in the zip file.
The link for the full application in zip format is located at the link below:
www.geocities.com/vishalraj_ms/StudentHonor.zip
I need to remove the bug in 2 days.So an ealry reply is highly appreciated.Thank you.
|
|
|
|
|
Well i would start by getting the source code as you are going to find it difficult to debug the executable and then change the binary in it for that matter.
If you can't get the code then the only other advice i can give is that you should look in to user/pilot error or that the database is ****ed (unlikely though as it works sometimes).
If you can get the source I and I'm sure many others will be happy to help,
Thanks
"If i was king cigarettes would be free."
|
|
|
|
|
Hi,
Thanks for your reply.But the problem is that even I was given only the files which you have downloaded and not source code.Even I got the idea of viewing the source code and finding any bugs in it.So can you please tell me of any other method to solve this problem?
And you were mentioning about some user/pilot error.Can you please tell about it to me & ways to correct it as I don't have any idea of that,as early as possible?
Thank you.
|
|
|
|
|
Hi Everyone
I am teaching myself VB .Net and have a question about datagrids.
I am binding the result of a SQL statement into a datagrid. I would then like to email those results to myself (or someone else). Is there a way to do this using datagrid? Or should I put the result of my query into a richtextbox, or something else, instead?
Thanks in advance,
Laura
|
|
|
|
|
If you want to put it in an email, you're going to have to parse up the DataView or whatever your binding your DataGrid to and format the output into a message yourself. There's nothing that'll do it automatically. Your best bet, if your email recipient has a client that understands HTML, is to output the dataset to an XML file. Then you can put together a custom email that includes CSS style tags that will translate XML tags for you.
No, I don't have any example code...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I created a password login following the address book application. The log in works great. The application is accessed through MS Access database.
The following is the code to the password that is generated through the load page of the log in application.
Dim UserName, Password As String
If txtUserName.Text = "username" And txtPassword.Text = "password" Then
MsgBox("Welcome, Username")
txtUserName.Text = ""
txtPassword.Text = ""
ElseIf MsgBox("Sorry, your username or password entry is Invalid!")Then
txtUsername.Text = ""
txtPassword.Text = ""
MsgBox("Try Again")
txtUserName.Focus()
Return
txtUserName.Text = "username" And txtPassword.Text = "password")
txtUserName.Focus()
End If
What I am looking for is a code that will allow the user change the password periodically. I have no idea how to generate a "change password" method.
Can someone help in this area. The above log in code works good, is just that I like to add code to change the password.;)
bravo659
|
|
|
|
|
Actually, with the code you have alreayd, you won't be able to change the username and password because it's hard-coded. You have to store the username and password in a table somewhere. Then you'll be able to code a method to change that username and password.
Like you have it coded now, consider it impossible to change...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your reply.
Then I need to change the entire code to a connection in a database table in order to have the changes made, right?
The only database I currently have is the Access database. Through that connection is how I need to create the table?
bravo659
|
|
|
|
|
It can be created just like any other table in Access. Open the .MDB file your using by double-clicking on it. In Access, click on the "Tables" label, then click design. Add your username and password fields...
...hmmm...Have you used Access before? Any previous programming experience?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes, I do have Access programming experience and I also use the design view and the primary key.
bravo659
|
|
|
|
|
Then you have everything you need to create the table using Access.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your reply to my inquiries. It is helpful. All I ahve to do is shift the coding around until I get the correct code.
Thanks Again!
|
|
|
|
|
Hi,
I have populated my datagrid from a dataset.
I want to set values for the second col wherein the user can enter only 'AGE' or 'DOB' in the second col. i.e. If user hits 'A' on the key board I want to display 'AGE' in the second col or if the user hits 'D' to display "DOB" in the second col. But if the users enters any other value other than 'A' or 'D' then I want to cautio user with a msgbox.
Is this possible with the new datagrid?
Tnx
|
|
|
|
|
|
Validating Input with the Windows Forms DataGrid Control
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskHandlingErrorsWithWindowsFormsDataGridControl.asp?frame=true
|
|
|
|
|
I tried this code but having a tiny problem:
I get the error @ AddHandler customersDataSet1.Tables("Customers").ColumnChanging, AddressOf Customers_ColumnChanging
any idea?
Imports System.Data
Imports System.Data.OleDb
Inherits System.Windows.Forms.Form
Dim da As New OleDbDataAdapter()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ds As New Data.DataSet()
' Visual Basic
' Assumes the grid is bound to a dataset called customersDataSet1
' with a table called Customers.
' Put this code in the form's Load event or its constructor.
Dim conn As OleDbConnection = New OleDbConnection("Provider = Microsoft.jet.oledb.4.0;Data source = D:\Program files\Microsoft Visual Studio .NET\Crystal Reports\Samples\Database\Xtreme.mdb")
If conn.State <> ConnectionState.Open Then conn.Open()
da.SelectCommand.CommandText = "Select * from customer"
da.SelectCommand.CommandType = CommandType.Text
da.Fill(ds, "customersDataSet1")
DataGrid1.DataSource = ds
DataGrid1.DataMember = "customersDataSet1"
AddHandler customersDataSet1.Tables("Customers").ColumnChanging, AddressOf Customers_ColumnChanging
End Sub
Private Sub Customers_ColumnChanging(ByVal sender As Object, _
ByVal e As System.Data.DataColumnChangeEventArgs)
' Only check for errors in the Product column
If (e.Column.ColumnName.Equals("Product")) Then
' Do not allow "Automobile" as a product.
If CType(e.ProposedValue, String) = "Automobile" Then
Dim badValue As Object = e.ProposedValue
e.ProposedValue = "Bad Data"
e.Row.RowError = "The Product column contians an error"
e.Row.SetColumnError(e.Column, "Product cannot be " & _
CType(badValue, String))
End If
End If
End Sub
|
|
|
|
|
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ds As DataSet = New DataSet
Dim strSQL As String
Dim cmSQL As OleDbCommand
Dim conn As OleDbConnection = New OleDbConnection( _
"Provider = Microsoft.jet.oledb.4.0;Data source = C:\Program files\Microsoft Visual Studio .NET\Crystal Reports\Samples\Database\Xtreme.mdb")
If conn.State <> ConnectionState.Open Then conn.Open()
strSQL = "SELECT * FROM Customer"
cmSQL = New OleDbCommand(strSQL, conn)
da.SelectCommand = cmSQL
da.Fill(ds, "Customer")
DataGrid1.DataSource = ds.Tables(0)
AddHandler ds.Tables(0).ColumnChanging, AddressOf Customers_ColumnChanging
End Sub
|
|
|
|
|
I forgot to change your drive letter back to D: in the last post, sorry.
Here is the rest of the code.
Private Sub Customers_ColumnChanging(ByVal sender As Object, _
ByVal e As System.Data.DataColumnChangeEventArgs)
' Only check for errors in the Contact Title column
If (e.Column.ColumnName.Equals("Contact Title")) Then
' Do not allow it to be empty
If CType(e.ProposedValue, String) = String.Empty Then
Dim badValue As Object = e.ProposedValue
e.ProposedValue = "Bad Data"
e.Row.RowError = "The Contact Title column contians an error"
e.Row.SetColumnError(e.Column, "Contact Title cannot be Empty")
Else
e.Row.ClearErrors()
End If
End If
End Sub
|
|
|
|
|
Thanks a bunch.
Its working fine.
|
|
|
|