Click here to Skip to main content
15,929,597 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Need Help..... Pin
toxcct20-May-05 4:27
toxcct20-May-05 4:27 
Generaldeleting a control programatically in vb.net Pin
jlart19-May-05 18:32
jlart19-May-05 18:32 
GeneralRe: deleting a control programatically in vb.net Pin
SophieJTaylor19-May-05 20:38
SophieJTaylor19-May-05 20:38 
GeneralRe: deleting a control programatically in vb.net Pin
SophieJTaylor19-May-05 20:47
SophieJTaylor19-May-05 20:47 
GeneralRe: deleting a control programatically in vb.net Pin
oykica19-May-05 21:52
oykica19-May-05 21:52 
GeneralRe: deleting a control programatically in vb.net Pin
jlart20-May-05 4:13
jlart20-May-05 4:13 
GeneralRe: deleting a control programatically in vb.net Pin
Scott Page20-May-05 6:10
professionalScott Page20-May-05 6:10 
GeneralProcess Handles for Explorer Pin
SophieJTaylor19-May-05 16:50
SophieJTaylor19-May-05 16:50 
I'm fairly new to VB.NET, so forgive me if the answer to this question is simple:

I'm trying to control a Windows process from within my own application, so need to know the handle of the thread of the launched process. If I run an application such as Notepad which I start with:

Process.Start("Notepad.exe")

..... I can find enough information about the Notepad application by using a ProcessModuleCollection and a ProcessThreadCollection to get a handle ('hWnd') for the Notepad thread - but I admit the code I need to use for that is not very pretty if many instances of Notepad are running. However - at least I can gain external control over Notepad (and some other applications).

However, if I substitute "Explorer" in the code to replace "Notepad" to try to access and control Windows explorer, every time I try to get ANY information, I get an unhandled Exception even at the stage of declaring the process collection - which I suspect is a Windows security issue (??). If I handle the exception, the best information I can get from the exception is the message "Process has exited, so the requested information is not available".

I need to get the Handle of the Explorer thread that I have launched so that - for example - I can programmatically resize, move (or whatever) the specific Explorer window that I have launched.

Can anyone help me through the maze, please? (Or am I just not seeing the wood for the trees ?)



Sophie
QuestionHow to order columns in C1FlexGrid ! Pin
lucdt19-May-05 16:04
lucdt19-May-05 16:04 
GeneralMSComm Control Pin
19-May-05 12:31
suss19-May-05 12:31 
Generalcalculate number of days between dates Pin
milktoast18219-May-05 10:24
milktoast18219-May-05 10:24 
GeneralRe: calculate number of days between dates Pin
rwestgraham19-May-05 10:36
rwestgraham19-May-05 10:36 
GeneralRe: calculate number of days between dates Pin
milktoast18220-May-05 9:09
milktoast18220-May-05 9:09 
Generalbad help Pin
Anonymous19-May-05 10:03
Anonymous19-May-05 10:03 
GeneralRe: bad help Pin
Christian Graus19-May-05 16:30
protectorChristian Graus19-May-05 16:30 
Generalfirst tuesday of the month Pin
fuel2run19-May-05 8:37
fuel2run19-May-05 8:37 
GeneralRe: first tuesday of the month Pin
Christian Graus19-May-05 16:32
protectorChristian Graus19-May-05 16:32 
GeneralRe: first tuesday of the month Pin
fuel2run19-May-05 20:01
fuel2run19-May-05 20:01 
GeneralWindows 2000 Server and Vb.net Pin
ga051019-May-05 7:32
sussga051019-May-05 7:32 
GeneralNeed help !! Pin
Member 193588019-May-05 7:25
Member 193588019-May-05 7:25 
GeneralRe: Need help !! Pin
Christian Graus19-May-05 16:33
protectorChristian Graus19-May-05 16:33 
GeneralRe: Need help !! Pin
Member 193588019-May-05 17:59
Member 193588019-May-05 17:59 
GeneralRe: Need help !! Pin
Christian Graus19-May-05 18:06
protectorChristian Graus19-May-05 18:06 
GeneralRe: Need help !! Pin
rudy.net19-May-05 17:27
rudy.net19-May-05 17:27 
GeneralRe: Need help !! Pin
Member 193588019-May-05 18:01
Member 193588019-May-05 18:01 

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.