Click here to Skip to main content
15,890,438 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: LINQ: How To Make Order By Conditional? Pin
Alan Burkhart29-May-18 14:42
Alan Burkhart29-May-18 14:42 
AnswerRe: LINQ: How To Make Order By Conditional? Pin
Richard Deeming30-May-18 9:58
mveRichard Deeming30-May-18 9:58 
GeneralRe: LINQ: How To Make Order By Conditional? Pin
Mycroft Holmes30-May-18 14:27
professionalMycroft Holmes30-May-18 14:27 
GeneralRe: LINQ: How To Make Order By Conditional? Pin
Richard Deeming31-May-18 1:15
mveRichard Deeming31-May-18 1:15 
GeneralRe: LINQ: How To Make Order By Conditional? Pin
Alan Burkhart31-May-18 7:18
Alan Burkhart31-May-18 7:18 
GeneralRe: LINQ: How To Make Order By Conditional? Pin
Alan Burkhart31-May-18 7:33
Alan Burkhart31-May-18 7:33 
QuestionWebBrowser Javascript Error handing via HtmlWindow works in IE8 mode but not in IE10 or Edge. Pin
Jeffrey Cobb26-May-18 15:55
Jeffrey Cobb26-May-18 15:55 
QuestionOutlook Mail Drag Drop into Textbox of a Win Form Pin
HPS-Software24-May-18 18:41
HPS-Software24-May-18 18:41 
Task:

Two windows have been opened.
1. Outlook
2. the Windows Explorer

If you now take a mail from the Outlokk Inbox with the left mouse button, pull it over to the Windows Explorer and release it there over a folder then the mail is stored there as a file under the name e.g. Request.msg
Request is the subject of the mail.

Now the second window should be the application to be developed.
There should be a textbox above in which the mail is dropped.
So far I have the following code:

Private Sub TextBox1_DragOver(ByVal sender As Object, ByVal e As DragEventArgs) Handles TextBox1.DragOver
    'erlaubte DropEffects festlegen
    If e.Data.GetDataPresent("FileGroupDescriptor") Or e.Data.GetDataPresent("FileDropList") Then
      e.Effect = DragDropEffects.All
    Else
      e.Effect = DragDropEffects.None
    End If
  End Sub
 
  Private Sub TextBox1_DragDrop(ByVal sender As Object, ByVal e As DragEventArgs) Handles TextBox1.DragDrop
' Drop durchführen
 
    Dim ioStream1 As IO.Stream = DirectCast(e.Data.GetData("FileGroupDescriptor"), IO.Stream)
 
    Dim Array1(CInt(ioStream1.Length)) As Byte 'Array anlegen
    ioStream1.Read(Array1, 0, Array1.Length) 'Array füllen
 
    'Build the FileName from the FileGroupDescriptor block.
    Dim sFileName As New System.Text.StringBuilder("")
    Dim i As Integer = 76 'The FileName starts at position 76 in the FileGroupDescriptor. 

     While Array1(i) <> 0
      sFileName.Append(Convert.ToChar(Array1(i)))
      i += 1
    End While

    ioStream1.Close()
 
    MessageBox.Show(sFileName.ToString) 'der Dateiname wird richtig angezeigt
 
    'Mail Inhalt auslesen
    Dim ioStream2 As IO.Stream = DirectCast(e.Data.GetData("FileDropList", True), IO.Stream)
    Dim Array2(CInt(ioStream2.Length)) As Byte 'Array anlegen
    ioStream2.Read(Array2, 0, Array2.Length) 'Array füllen
 
  End Sub

The file name is displayed correctly but ioStream2 is allways nothing

"FileDropList" is probably the wrong parameter. But which one is the right one?

Microsoft.Office.Interop or
System.Runtime.InteropServices and
Dim objOL As New Microsoft.Office.Interop.Outlook.Application
may not be used because an error message is displayed on the Exchange Server.

How can I read the content of the mail?
Thanks in advance
AnswerRe: Outlook Mail Drag Drop into Textbox of a Win Form Pin
Richard Deeming25-May-18 2:35
mveRichard Deeming25-May-18 2:35 
GeneralRe: Outlook Mail Drag Drop into Textbox of a Win Form Pin
HPS-Software26-May-18 20:51
HPS-Software26-May-18 20:51 
GeneralRe: Outlook Mail Drag Drop into Textbox of a Win Form Pin
Eddy Vluggen26-May-18 23:05
professionalEddy Vluggen26-May-18 23:05 
GeneralRe: Outlook Mail Drag Drop into Textbox of a Win Form Pin
HPS-Software27-May-18 18:14
HPS-Software27-May-18 18:14 
QuestionSave in datagriedview in application Pin
Member 1361197220-May-18 8:13
Member 1361197220-May-18 8:13 
AnswerRe: Save in datagriedview in application Pin
Dave Kreskowiak20-May-18 11:40
mveDave Kreskowiak20-May-18 11:40 
GeneralRe: Save in datagriedview in application Pin
Member 1361197221-May-18 1:26
Member 1361197221-May-18 1:26 
AnswerRe: Save in datagriedview in application Pin
Richard Deeming21-May-18 2:11
mveRichard Deeming21-May-18 2:11 
GeneralRe: Save in datagriedview in application Pin
Member 1361197222-May-18 6:00
Member 1361197222-May-18 6:00 
QuestionWhat am I missing with Clone()? Pin
mo149218-May-18 13:48
mo149218-May-18 13:48 
AnswerRe: What am I missing with Clone()? Pin
Eddy Vluggen18-May-18 14:03
professionalEddy Vluggen18-May-18 14:03 
GeneralRe: What am I missing with Clone()? Pin
mo149218-May-18 14:10
mo149218-May-18 14:10 
GeneralRe: What am I missing with Clone()? Pin
Eddy Vluggen18-May-18 14:13
professionalEddy Vluggen18-May-18 14:13 
AnswerRe: What am I missing with Clone()? Pin
Richard Deeming21-May-18 2:06
mveRichard Deeming21-May-18 2:06 
QuestionHow can obtaing the filename of spool job? Pin
bGuidi7-May-18 4:59
professionalbGuidi7-May-18 4:59 
QuestionExternal Media player sdk for vb Pin
Asanka Akash Sovis5-May-18 22:27
professionalAsanka Akash Sovis5-May-18 22:27 
QuestionRe: External Media player sdk for vb Pin
Eddy Vluggen6-May-18 23:55
professionalEddy Vluggen6-May-18 23:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.