Click here to Skip to main content
15,921,884 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionvb.net desk app using app.config file Pin
dcof1-Jun-18 11:21
dcof1-Jun-18 11:21 
AnswerRe: vb.net desk app using app.config file Pin
Dave Kreskowiak1-Jun-18 13:24
mveDave Kreskowiak1-Jun-18 13:24 
GeneralRe: vb.net desk app using app.config file Pin
dcof4-Jun-18 9:56
dcof4-Jun-18 9:56 
GeneralRe: vb.net desk app using app.config file Pin
Dave Kreskowiak4-Jun-18 11:13
mveDave Kreskowiak4-Jun-18 11:13 
GeneralRe: vb.net desk app using app.config file Pin
dcof5-Jun-18 4:21
dcof5-Jun-18 4:21 
GeneralRe: vb.net desk app using app.config file Pin
Dave Kreskowiak5-Jun-18 5:45
mveDave Kreskowiak5-Jun-18 5:45 
GeneralRe: vb.net desk app using app.config file Pin
dcof5-Jun-18 7:48
dcof5-Jun-18 7:48 
GeneralRe: vb.net desk app using app.config file Pin
Dave Kreskowiak5-Jun-18 8:11
mveDave Kreskowiak5-Jun-18 8:11 
QuestionInserting to new table in between two table in ms word from vb.net Pin
Osioghole Clifford28-May-18 13:50
Osioghole Clifford28-May-18 13:50 
QuestionLINQ: How To Make Order By Conditional? Pin
Alan Burkhart26-May-18 16:05
Alan Burkhart26-May-18 16:05 
AnswerRe: LINQ: How To Make Order By Conditional? Pin
Richard MacCutchan27-May-18 1:05
mveRichard MacCutchan27-May-18 1:05 
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 

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.