|
Please forgive me in advance for any ignorance I show. I've recently arrived in the world of .net from VB6. I have seen applications that can send a method to an object with a compiled executable. For example, the screen capture software called SnagIt has the ability to scroll a list box within any application window that is active. From my experience, the only way to accomplish such a task would be to send a call to a dll file but it would seem impossible to me that SnagIt (for example) would know the dll to hit for a software program that it never saw before. Somebody told me that this functionality is now possible because of the .net technology.
Does anybody have any code examples of a VB .net program that can send methods to a control within a complied executable?
Thanks,
Derek
|
|
|
|
|
You cannot send "methods" to other applications. You can't send methods to anything actually. What you're seeing is SnagIt sending Windows Win32 messages to those controls. You need to get the Window Handle of the control that you want to send messages to, then call the Win32 function SendMessage to send whatever messages you need to to that control.
This is nothing new. This is how Windows has worked for years. There's nothing in the .NET Framework that makes this any easier than it was 10 years ago.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
when I run the query
select @@ version on query analyzer (sql server 2000) i get
Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48 Copyright (c) 1988-2000 Microsoft Corporation Personal Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
it seems that service pack2 is already present in SQL but when i use DTS in my vb.net (visual studio.net 2003) code i get the following error
" 13 queryinterface for custom task DTS.customtask dll"
plz tell what is wrong and how to get rid of it?
|
|
|
|
|
i want to add more pages to printdocument component in .net2.0 windows application
please help me.(i want to connect to database and read records and for each record ,add new page to printdocument and print all together)
|
|
|
|
|
who can give me a example about the True DBReports 6.0 ?True DBReports 6.0?
初学者!Don't try it, just do it!
*Archibald*rever dragon!
|
|
|
|
|
How about asking ComponentOne for help. After all, that's what you paid the money for...support. Right?
Sorry, there's just too many cracks out there for their ActiveX components to believe that you paid the money for the component and are still asking this question.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hellow to all ,
i wrote a code that send's email , by useing the System.Web.Mail refernce the code is fine i don't recive errors , i send to a vaild address , and i config my IIS , but i don't recive anyemail ,
the funny thing that i run the same code befor 1 week and it worked fine !
and now it's not working ...\
anyhelp
-- modified at 7:54 Sunday 18th June, 2006
|
|
|
|
|
This question is a bit vague. Are you saying that you're running your own SMTP/POP3 mail servers at home? Most ISP's will NOT allow you to do this.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i use this code , to send email ...
System.Web.Mail.SmtpMail.SmtpServer = "127.0.0.1"
mailmsg.Subject = "message subject"
mailmsg.Body = "message body"
mailmsg.From = "Complaints@Nateevexpress.com"
mailmsg.To = SendToEmails
mailmsg.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.Send(mailmsg)
some times it send emails fast and some times it take a long time to recive email ..\
thxx
|
|
|
|
|
You didn't answer my question...
What do you mean by "some times it take a long time to recive email"?? Are you running your own mail server at home? Are you expecting a message from an outside sender to be delivered to your mail server and you're not receiving it? Or are you saying that the mail message never leaves your mail server and arrives at its destination?
By the IP address in your code, I'll assume that your running a mail server on your local machine. Most ISP's will NOT allow this and will NOT forward messages sent from unauthorized mail servers.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hellow ,
i am only trying to send to outers emails ,
i am not trying to recive ,
and some times i recive this message could not access CDO.Message object ,
how can i do this ?
-- modified at 8:19 Tuesday 20th June, 2006
|
|
|
|
|
Change the SmtpServer IP Address to that of your ISP's SMTP server.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i did is there anything else that i have to do ?
|
|
|
|
|
That depends on your ISP's SMTP server. But, generally, no, there isn't.
As for the CDO.Message object error, you might want to take a look at this[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi Friend,
can u show or email ur code to me!!
I also work on that!!
my address is "rahulshendurnikar@gmail.com"bbye
Rahul here
|
|
|
|
|
I add some picture to imagelist, the imagewidth and imageheight property has been set.
Then show them in a listview by icon view mode.
However, the picture is not clear.
How to do?
Thanks!
VB 6.0
|
|
|
|
|
Are the images you have in the ImageList the same size as they are going to be displayed in? Or are they larger images being scaled down to icon size in your ListView? If they're being scaled, your sacrificing alot of image quality doing that. It's best to use images of the size they'll be rendered at, not scaled.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am calling "GetVolumeInformation" to get hold of drive volume label.
The 2nd parameter of this function is declared as
Dim driveLabel As String = Space(200)
This string remains 200 in length even though the label returned is only 11 chars long, say "MY PROJECTS "
This string delaration is giving me a lot of trouble and it completely messes up the rest of my code when I concat it with other string variables. (eg dim myText = " label is " & drivelabel). Everything become 200 in length.
Does anyone know how I can extract the useful part of "driveLabel" as declared above??? That is a string with the correct "string.length" value (for "MY PROJECT " I need driveLabel.length=10)
|
|
|
|
|
|
hi all i want to know ho to create the database though .net. i want when my application starts first time it create the databse there if it is not created. if i use the sql script then how to execute that script
Tasleem Arif
-- modified at 21:09 Saturday 17th June, 2006
|
|
|
|
|
|
Hello, can anybody tell me how to use the usb port. there is a lot of example to use the serial port COM. but I can't find any topic to use the USB port.
Thanks
OmarMallat
|
|
|
|
|
|
You didn't find anything because you don't use the USB port. You talk to the devices on it bu way of their drivers. What you need to do depends entirely on the device and why kind of API support the manufacturer gives you in the form of an SDK.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all. I have a DLL (VB.NET) which uses interop to write to a mailslot -- this is more or less like opening and writing to a file, and is not a problem.
This uses windows API CreateFile, gets a valid handle (no error, valid handle number), and immediately uses it in WriteFile. I have logging that shows the handle number I received from CreateFile is in fact still the same when the error occurs in WriteFile (and other than this logging, there's nothing between them).
Here's the problem:
It works if the DLL is in debug mode when compiled, and fails the WriteFile with "invalid handle" when in release mode. The host application is a simple test app in VB.NET which just creates the object this DLL exposes.
Here is the .NET code
lMailslotHandle = CreateFile(sMailSlot, GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0)
If lMailslotHandle <> INVALID_HANDLE_VALUE Then
Try
lResult = WriteFile(lMailslotHandle, sMsg2, Len(sMsg2), lNumWritten, 0)
(and there's catch stuff here should any thrown error occur).
The above is enough to cause the problem! Any ideas? That is, lResult is zero and the value of Err.LastDllError is the error code for "handle is invalid".
The data being written is identical whether it is debug or release mode -- there is no code difference at all (in the application code -- obviously there is in the compiled code).
I suspect that I'm getting a wrong error message -- that the handle is not invalid, but that is just a suspicion.
Any ideas?
|
|
|
|