|
Hi, if I recall correctly:
In your parrent window, use SetWindowLing API with GW_WNDPROC constant and address of a function (whose signature you may find in MSDN).
SetWindowLong returns a pointer to oldproc of the window wich you must save in a variable and pass the events to this procedure, at the end of your new windowproc.
now in the child window and the parrent window, creat a message using RegisterWindowMessage which returns a unique window_message handle.
Then in the child window call SendMessage with the registered windows handle and in parent form check it out!
jope it was helpful
|
|
|
|
|
Hi,
I am trying to write a login script that checks the exchange server currently set up in the User's outlook profile and change it to a new one if needed.This should be possible (i think) but i can't seem to get a handle on it.
All i need to know is how/where i can access/change the Exchange server currently set up for that user's outlook profile. I know i can access some outlook properties through WMI but none get or set the exchange server it connects to.
Could anyone point me in the right direction?
|
|
|
|
|
Hi all,
I have a VB.Net Application that is run over Citrix. Everytime I try to run from the Citrix shortcut I get Application has generated an Exception that cannot be handles. The thing is the other 2 developers don't have this problem. And After it was rolled out to clients, 100 people work but I have one user that gets the same error.
Does anyone have an idea what is going on here?
TIA,
Chuck Easter
-- modified at 10:50 Wednesday 18th April, 2007
PS.. I can run the project when I run from the file share. Just not thru the shortcut.
Forgot to say that the first time.
|
|
|
|
|
There's no way to tell what's wrong without knowing what the Exception is or what the application was doing at the time it bombed.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
having problems with adding to the database.
the code i have should work, but nothing is getting added to my database. below is the code i have. can anyone pinpoint my broblem and rectify it for me?, thanks
Imports System.Data.OleDb
Public Class cust
Public conn As OleDbConnection
Public comm As OleDbCommand
Public dr As OleDbDataReader
Public da As OleDbDataAdapter
Dim icount As Integer
Dim str As String
Private Sub cust_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
conn = New OleDbConnection 'establishes that conn is a new connection
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\PCbank.mdb" 'the name of the connection (name of the database on the end)
conn.Open() 'opens the connection
comm = New OleDbCommand 'establishes that comm is a new command
comm.Connection = conn 'the connection for the command is the connection specified
comm.CommandType = CommandType.Text 'the commands are in text
End Sub
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Try
conn = New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=PCbank")
conn.Open()
comm = New OleDbCommand("insert into customers(CustomerID,CustomerSurname,CustomerForename) values('" & (tbID.Text) & "','" & (tbSur.Text) & "','" & (tbFor.Text) & ")", conn)
icount = comm.ExecuteNonQuery()
MsgBox("record inserted")
Catch ex As Exception
End Try
conn.Close()
End Sub
End Class
|
|
|
|
|
You appear to be using the Try/Catch/Ignore anti-pattern. Don't! You will lose vital diagnostic information doing that. The application may be screaming out the reason for the failure and you are just ignoring it.
|
|
|
|
|
Try to write MsgBox(ex.Message) in you Catch statement.
This can tell you a lot about the problem.
I haven't looked your code over in detail.
But one thing that was differen from my code was this:
OledBCommand oCommand = oCon.CreateCommand()
Let your command be created by your connection.
And don't just comm.Connection = conn
But I doubt that this will solve all your problems.
If you get some interesting errors from the Catch, post it again
Programming code is like magic, just use the right code (magic words) to make happen what you want..
|
|
|
|
|
Your problem, or at least one of them, is in this line of code:
comm = New OleDbCommand("insert into customers(CustomerID,CustomerSurname,CustomerForename) values('" & (tbID.Text) & "','" & (tbSur.Text) & "','" & (tbFor.Text) & ")", conn)
There should be a single quote after (tbFor.Text) & ". The line should look like this:
comm = New OleDbCommand("insert into customers(CustomerID,CustomerSurname,CustomerForename) values('" & (tbID.Text) & "','" & (tbSur.Text) & "','" & (tbFor.Text) & "')", conn)
|
|
|
|
|
|
I am a beginner in VB.NET.Suggest me how to get started to VB.NET ,What are the books to be followed which makes helpful to the classes learnt?List also the famous websited related to this?
|
|
|
|
|
satyakala wrote: I am a beginner in VB.NET.Suggest me how to get started to VB.NET ,What are the books to be followed which makes helpful to the classes learnt?
Buy a beginners book. Something with "Beginning" in the name or something like "... in 21 days" or "Step-by-step..." or "... for Dummies". It isn't difficult to find the information you need. Also, it depends on how you learn - we are all different. So, go to the book store, find the books with names matching the pattern above and flick through them. See which one works for you and buy it.
satyakala wrote: List also the famous websited related to this?
http://msdn.microsoft.com[^]
http://www.codeproject.com[^]
|
|
|
|
|
i need a coding that set\change the open with program with mine application
eg.
for text files(*.txt) notepad is default
but when i click on my application`s button then it should change notepad to my application
hope for best reply
|
|
|
|
|
First let me suggest that you NEED to give the user the option to change this or not, dont just take over all associations.
http://www.codeproject.com/dotnet/System_File_Association.asp[^]
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
man no option to user ,just click and change
|
|
|
|
|
xmen_xwk wrote: man no option to user ,just click and change
It is very bad practice to change people's settings without warning and receiving an affirmative answer from the user. You can do whatever you want but if I ever use software that just up and changes some standard file association to a non-standard program without asking me or warning me I will most likely stop using that software.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
yeah i agree with you but the text/caption of button will have the warning text
and about coding this will not change if you take permission or not from user,it will just need messagebox
now may i get the coding....????
|
|
|
|
|
I posted a link in my first reply to you that has code and examples from right here on Code Project.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
yeah but that article is useless for me
|
|
|
|
|
i wrote a program which draws lines on a picturebox when user clickes on it.
theres no picture iniside the picture box and i intend to know the color of these pixels programitically.
A.E.K
|
|
|
|
|
So what's the question? What part of this are you having a problem with?
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
getpixel needs a bitmap.
but my picture box has no bitmap.i draw on it from paint event of the picture box.
how can i make a bitmap from such picture box?
A.E.K
|
|
|
|
|
You don't. Draw on a bitmap, then show it using the picturebox. You can use the picturebox to give you the mouse events, then do all your drawing on the bitmap.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
|
Hi I am writing a service which needs to monitor multiple programs/files etc on a system. The Service is being designed so that it will call standard methods against a range of Standardised dll's.
Application1.GetLastEvent 'Where Application1 is an dll written purely to talk to Application1
Application2.GetlastEvent 'Where Application2 is another dll written purely to talk to Application2
Each dll is being written to get the relevent details from a particular application. Now I could compile the application with all the dll's and just have a setting to only make the request if the application is installed but this would mean rebuilding and and redeploying the service if we wanted to add and check application 3. Im sure this must be possible at runtime.
What I want to achieve is have a runtime list of dll's for the installed applications and make the standard calls against each in turn. The Application should not need to know anything about these apart from the methods which are standard across all of the them.
Thanks in advance, I dont really need a full code listing on this one just a nudge in the right direction as cant seem to find the correct terms to find anything on the WWW.
James
First learn how to speak ~ Then you figure out what Language to speak
|
|
|
|
|
TheFarsider wrote: The Service is being designed so that it will call standard methods against a range of Standardised dll's.
Are these .DLL's being written so that each one is programmed to interact with a specific application??
I think you're talking about "plugin" support for your service app. Your service app would look for these plugins in a specific folder and load them one by one. Each .DLL would have to implement an interface that the service expects them to have so the service can communicate with each plugin.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|