Forum Replies Created
The easiest way is to create and format the text in a RichTextBox in your application and then sending the .RTF string instead of the .Text string.October 19, 2014 at 4:10 pm in reply to: any tutorial on vb.net for creating paltalk programs #65759October 19, 2014 at 3:33 pm in reply to: any tutorial on vb.net for creating paltalk programs #65755
Make sure that on Windows Vista and newer that you are running with elevated permissions. This means to debug in the VS environment, you must start VS “As Administrator” and you need to make your program run “As Administrator” once compiled by editing the manifest.
cleaning would take for ever and i don’t remember what texbox goes for what
that is why you rename as you go, giving them meaningful names
Just wanted to notify everyone that there is only a week left in this funding drive for my sister. If any of you are wanting to help and have not yet done so, time is running short.
If you already have donated, thank you very much for your kind and generous gift.
I just wanted to say I owe a big debt of gratitude to all who have helped in this time of need. Thank you guys!
I have been asked why I am requesting the people here to support this cause.
Marilyn (the person I am asking you to help) is my sister. Before she got sick, she was working in a hospital with good benefits. When she first got sick, she was put on sick leave, meaning that while she was not working or getting paid, she retained her benefits. This helped a great deal with the medical expenses that she initially incurred. But eventually, her sick leave ran out and she was let go. Suddenly, to keep her medical coverage, she had to buy Cobra insurance. As the costs mounted, her husband kicked her out and stopped helping with her expenses. So now she is unemployed, single, and her only income is from disability.
I did not want anyone to feel they had to donate so I tried not to bring my personal connection into it, but since people wanted to know why before supporting, I felt it best just post to here instead of answer everyone privately 1 by 1.
Thanks for your support.
The one thing that sticks out about my two functions are they do not return value on all code paths. It suggests I am missing a Return statement. however since it was only a warning I ignored it lol
As long as you are not trying to use the return value in any way, the warning can be ignored without causing any crash issues. I know the code is based on some of my old code and I had some functions that did not return on all code paths, but while it will not crash the app, it is not good code practice to do it. If you do not need a return value, you may want to change the function into a sub.
My guess is the more likely issue is that the allocated memory probably is not always being freed. This would leave the allocated memory injected into the pal app and cause the kinds of issues you are reporting.
Please don’t take this the wrong way AutoPilot, but if you post again, verifying that this is your post, I will gladly help.
This is absolutely my post. This is not the kind of post I normally make, and I would not make it if it were not important to me.
Thank you to all who help in this effort.
Nice job on the video’s! Thanks for taking the time and putting forth the effort to help others learn.
Ok, here is what I have at this point. But using these calls, the program must be run as administrator.
Add reference to Microsoft HTML Object Library
Here is my import section
Imports System.Runtime.InteropServices Imports mshtml
Here are the API def’s and a function to get text from internet explorer_server
#Region "API CALLS" _ Public Shared Function RegisterWindowMessage(lpString As String) As Integer End Function _ Public Shared Function SendMessageTimeout(hwnd As IntPtr, msg As Integer, wParam As IntPtr, lParam As IntPtr, fuFlags As Integer, uTimeout As Integer, ByRef lpdwResult As IntPtr) As IntPtr End Function _ Public Shared Function ObjectFromLresult(lResult As IntPtr, ByRef riid As Guid, wParam As IntPtr, ByRef ppvObject As IHTMLDocument2) As Integer End Function Public Const SMTO_ABORTIFHUNG As Integer = &H2 Public IID_IHTMLDocument As New Guid("626FC520-A41E-11CF-A731-00A0C9082637") #End Region ' Provide Handle of Internet Explorer_Server object Private Function DocFromDOM(ByVal hWnd As IntPtr) As String ' Create IHTMLDocument2 object Dim Doc As IHTMLDocument2 = Nothing Try ' Get Registered Windows message Dim nMsg As Integer = RegisterWindowMessage("WM_HTML_GETOBJECT") ' Create IntPtr object to pass as ref to SendMessageTimeout Dim ipRes As IntPtr ' Call SendMessageTimeout If (SendMessageTimeout(hWnd, nMsg, IntPtr.Zero, IntPtr.Zero, SMTO_ABORTIFHUNG, 1000, ipRes) = IntPtr.Zero) Then ' SendMessageTimeout returned nothing, make sure IHTMLDocument2 is nothing Doc = Nothing Else ' Call ObjectFromLresult to fill IHTMLDocument2 object ObjectFromLresult(ipRes, IID_IHTMLDocument, IntPtr.Zero, Doc) End If Catch ex As Exception ' Make sure IHTMLDocument2 is nothing Doc = Nothing End Try ' Process Doc for return If Doc Is Nothing Then Return Nothing Else ' Return the innertext Return Doc.activeElement.innerText End If End Function
Once you get the text, you will still have to parse it to find out what if anything is new.
Thanks for taking the time and the willingness to donate your hard earned money. Very few people do so it does mean a lot when someone takes that step.
I saw in your screenshot you had it labeled as “Internet Explorer_Server”.
I started working on trying to develop code to read the text from the Internet Explorer_Server and basically, I can copy the Internet Explorer_Server into an IHTMLDocument2 object. From there, I can get the whole chat text into a string object. I currently am playing with loading the string into a richtextbox, but there are other ways we can go about parsing the incoming chat too.
I will post some code once I get a better handle on the process and clean up my code.
Now How come I cant get the Content of Child Windows when I can get Content of the Main Windows and everything else in Crown IM.
The issue with getting text is the type of control the text is in. Going by your Screenshot above, you are trying to pull text from a “Internet Explorer_Server” control using the techniques used for an edit control. That is like trying to unlock your car door with your house key (it just won’t work).
I have not looked at Crown, but it may be possible to read the xml from the “Internet Explorer_Server” control and parse the incoming text that way.July 3, 2013 at 4:48 am in reply to: Is It Possible to Create Apps For Other Chats? Any Ideas? #38715
I wanna help out, but I also wanna know if this might give us or myself problems if there is any Laws in the EULA Laws about creating Apps.
As long as your app only mimics what the user can already do, it will never break EULA. They may not like things like the color faders, but as long as you have the ability to create the text in wordpad and paste it into the chat, using the sendmessage/postmessage API does not “break” the EULA in any way.
If you start modifying their app (loaders, patches, etc.) then you will definitely be in violation. And some chat applications are written in a way to prevent you from easily using the win32API.
But feel free to check them out for your self. If they have a standard Edit or RichEdit control, then you can easily use the same methods as what we are using with Pal.