Jump to content
Xtreme .Net Talk

progload

Members
  • Posts

    9
  • Joined

  • Last visited

progload's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I came across this not to long ago, unfortunatly it's not in vb.net it's in c# but I think it could be converted with a little work. It's open source so take a look it may be somthing you could use, or help you work out what you want to do. http://www.routrek.co.jp/en/product/varaterm/granados.html Here is another one. http://www.codeproject.com/cs/internet/terminalcontrol.asp progload
  2. lpram is passed ByVal not ByRef and needs to be marshaled. Here is an example: How to set a hook in Visual Basic .NET http://support.microsoft.com/?scid=kb;en-us;319524&spid=8291&sid=89 Hope that helps.
  3. Just another note on this, I setup a small program to test it: using FAXCOMLib; using FAXCOMEXLib; FaxServerClass fs = new FaxServerClass(); fs.Connect("<your_computer_name>"); //specifies the machinename object obj = fs.CreateDocument("<your_filename>"); FaxDoc fd = (FaxDoc)obj; fd.FaxNumber = "<your_fax_number_to_send_to"; fd.RecipientName = "<your_recipients_name"; int i = fd.Send(); MessageBox.Show(i.ToString()); fs.Disconnect(); And came across another problem. Windows fax service will install without a fax modem installed in the computer. But the above code will Fail with a "Unknown Interop Error" if you have no modem installed. The only way I could get it to work is by installing a modem. I thought I would add this, Just in case anyone comes across this problem too. progload
  4. I'm going to re-edit this whole answer, You need to install your fax services, in windows printers and faxes. Windows Fax Service must be running to use faxcom.dll (FaxComLib) In the CS IDE reference the FaxControl 1.0 Type Library, that is where FaxComLib comes from, and it will show up in the references. progload
  5. Jbob, Ok, now I got it.. thanks.. You won't be able, in windows 2000/XP to send it directly using SendMessage as the message must be Translated, you'll need to use TranslateMessage instead. The MSDN WM_KEYDOWN documentation states(see crefs below for reference): "Windows 2000/XP: Applications must pass wParam to TranslateMessage without altering it at all." so I passed wParam off to TranslateMessage and It works just fine like this: Declare Function TranslateMessage Lib "user32.dll" (ByRef lpMsg As MSG) As Integer Public Structure MSG Public hwnd As Integer Public message As Integer Public wParam As Integer Public lParam As Integer Public time As Integer Public pt As Integer End Structure Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim hwnd As Integer = FindWindow(vbNullString, "Untitled - NotePad") '/// assuming you have notepad open. Dim x As Integer = FindWindowEx(hwnd, 0, "Edit", vbNullString) Dim myMsg As MSG = New MSG If Not x = 0 Then myMsg.hwnd = x myMsg.message = WM_KEYDOWN myMsg.wParam = Keys.B myMsg.lParam = 0 Dim ret As Integer ret = TranslateMessage(myMsg) Debug.WriteLine("TranslateMessage " & ret.ToString) End If End Sub I believe you can code it anyway you like from here and put your "sleep" code in and it should work just fine, it is here. cref: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_keydown.asp and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/messagesandmessagequeues/messagesandmessagequeuesreference/messagesandmessagequeuesfunctions/translatemessage.asp Hope this Helps you out, and If I can help you with anything else let me know. progload [Edited for missing functions] Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer Private Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWnd1 As Integer, ByVal hWnd2 As Integer, ByVal lpsz1 As String, ByVal lpsz2 As String) As Integer
  6. I'll give a try at helping you out, but... "sending this to a non-active non-focused window" Is Not enough information. What are you trying to send the keys to on this "Window" a list box, a textbox, a menu, a button, or what? And what will be the outcome of sending the keys? Thanks, progload
  7. Rothariger, I assume your wanting to "retrieve" the Date TagID stored in the picture. Something like this: Imports System.Drawing.Imaging ... ... Dim img As Image = Image.FromFile(dlg.FileName) For Each iPI As PropertyItem In img.PropertyItems Select Case iPI.Id Case 306 'PropertyTag DateTime imgDateTime = System.Text.ASCIIEncoding.ASCII.GetString(iPI.Value) Case 36867 'PropertyTag ExifDTOrig imgExifDTOrig = System.Text.ASCIIEncoding.ASCII.GetString(iPI.Value) Case 36868 'PropertyTagExif DTDigitized imgDTDigitized = System.Text.ASCIIEncoding.ASCII.GetString(iPI.Value) End Select ... ... you can find more info here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnhcvb04/html/vb04b15.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingimageclasspropertyitemstopic.asp progload
  8. neodammer, Have you tried using raw sockets and filtering for inbound to port 80? progload
  9. VB for windows CE comes in the embedded tools package the newest one is here: http://www.microsoft.com/downloads/details.aspx?familyid=f663bf48-31ee-4cbe-aac5-0affd5fb27dd&displaylang=en I'm sure if you search MS Site you will find the older one also.
×
×
  • Create New...