Click here to Skip to main content
16,010,427 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Print RichTextBox Content Pin
Smithers-Jones25-Feb-10 0:50
Smithers-Jones25-Feb-10 0:50 
Questionhow to read message archieve ym in offline mode using vb6 code Pin
darni3324-Feb-10 18:26
darni3324-Feb-10 18:26 
AnswerRe: how to read message archieve ym in offline mode using vb6 code Pin
Dave Kreskowiak25-Feb-10 1:47
mveDave Kreskowiak25-Feb-10 1:47 
QuestionExternal input into application [modified] - solved Pin
chrispowell1234524-Feb-10 5:08
chrispowell1234524-Feb-10 5:08 
AnswerRe: External input into application Pin
nlarson1124-Feb-10 10:06
nlarson1124-Feb-10 10:06 
AnswerRe: External input into application Pin
Steven J Jowett25-Feb-10 5:52
Steven J Jowett25-Feb-10 5:52 
GeneralRe: External input into application Pin
chrispowell1234528-Feb-10 21:55
chrispowell1234528-Feb-10 21:55 
GeneralRe: External input into application Pin
chrispowell123451-Mar-10 3:04
chrispowell123451-Mar-10 3:04 
For anyone interested, here's how I've done it...

In 'desktop' I create a messageque called the handle off the application:

MessageQueue.EnableConnectionCache = True
     MessageQueue.Create(My.Computer.Name & "\private$\" & CStr(Me.Handle), False)


I've then written a sub called txtpdfchech to start checking the message que:

Dim que As New MessageQueue(My.Computer.Name & "\private$\" & CStr(Me.Handle))
      que.Formatter = New BinaryMessageFormatter
      AddHandler que.ReceiveCompleted, AddressOf txtpdfrecieved
      que.BeginReceive(New TimeSpan(0, 0, 1))



the starts recieving, on a new thread, for 1 second and whether it recieves a message or not starts another sub txtpdfrecieved. At the end of this, it starts the .beginrecieve again:

Private Sub txtpdfrecieved(ByVal message As Object, ByVal args As ReceiveCompletedEventArgs)
.
. Does stuff
.
CType(message, MessageQueue).Purge()
CType(message, MessageQueue).BeginReceive()
end sub



So the DLL sends the message like this:

Dim que As New MessageQueue(My.Computer.Name & "\private$\" & CStr(handle))
que.Formatter = New BinaryMessageFormatter
stringy = stringy & CStr(processtostart.MainWindowHandle)
que.Send(stringy)


where handle is the handle of desktop recieved from the non.net application and processtostart is the notepad or adobe reader just opened by the dll.

Chris
QuestionVB Webservice for WinCE project Pin
gengel24-Feb-10 4:32
gengel24-Feb-10 4:32 
AnswerRe: VB Webservice for WinCE project Pin
_Damian S_24-Feb-10 16:55
professional_Damian S_24-Feb-10 16:55 
QuestionAccess Front End Applications Pin
Paul Unsworth24-Feb-10 2:49
Paul Unsworth24-Feb-10 2:49 
AnswerRe: Access Front End Applications Pin
scottgp24-Feb-10 2:57
professionalscottgp24-Feb-10 2:57 
GeneralRe: Access Front End Applications Pin
Paul Unsworth24-Feb-10 3:03
Paul Unsworth24-Feb-10 3:03 
AnswerRe: Access Front End Applications Pin
R. Giskard Reventlov24-Feb-10 3:00
R. Giskard Reventlov24-Feb-10 3:00 
GeneralRe: Access Front End Applications Pin
Paul Unsworth24-Feb-10 3:07
Paul Unsworth24-Feb-10 3:07 
GeneralRe: Access Front End Applications Pin
R. Giskard Reventlov24-Feb-10 3:13
R. Giskard Reventlov24-Feb-10 3:13 
QuestionProblem with If Then Else End If block in Visual Studio 2008 code editor Pin
mnemonic6924-Feb-10 1:10
mnemonic6924-Feb-10 1:10 
AnswerRe: Problem with If Then Else End If block in Visual Studio 2008 code editor Pin
Eddy Vluggen24-Feb-10 1:28
professionalEddy Vluggen24-Feb-10 1:28 
GeneralRe: Problem with If Then Else End If block in Visual Studio 2008 code editor Pin
DaveAuld24-Feb-10 1:30
professionalDaveAuld24-Feb-10 1:30 
GeneralRe: Problem with If Then Else End If block in Visual Studio 2008 code editor Pin
mnemonic6924-Feb-10 1:40
mnemonic6924-Feb-10 1:40 
GeneralRe: Problem with If Then Else End If block in Visual Studio 2008 code editor Pin
DaveAuld24-Feb-10 2:07
professionalDaveAuld24-Feb-10 2:07 
GeneralRe: Problem with If Then Else End If block in Visual Studio 2008 code editor Pin
Eddy Vluggen24-Feb-10 1:43
professionalEddy Vluggen24-Feb-10 1:43 
GeneralRe: Problem with If Then Else End If block in Visual Studio 2008 code editor Pin
Dave Kreskowiak24-Feb-10 2:03
mveDave Kreskowiak24-Feb-10 2:03 
GeneralRe: Problem with If Then Else End If block in Visual Studio 2008 code editor Pin
Gideon Engelberth24-Feb-10 5:42
Gideon Engelberth24-Feb-10 5:42 
GeneralRe: Problem with If Then Else End If block in Visual Studio 2008 code editor Pin
Dave Kreskowiak24-Feb-10 5:52
mveDave Kreskowiak24-Feb-10 5:52 

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.