Click here to Skip to main content
15,918,889 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: ADO.NET and VB.NET Access Database Pin
Kschuler10-Sep-07 8:51
Kschuler10-Sep-07 8:51 
QuestionBrowsing a DataTable Pin
dptalt10-Sep-07 5:33
dptalt10-Sep-07 5:33 
AnswerRe: Browsing a DataTable Pin
Kschuler10-Sep-07 7:49
Kschuler10-Sep-07 7:49 
QuestionProblems with Dataset configuration wizard Pin
2wit2woo10-Sep-07 3:04
2wit2woo10-Sep-07 3:04 
Questionreplace selected item of list box Pin
Rupesh Kumar Swami10-Sep-07 2:53
Rupesh Kumar Swami10-Sep-07 2:53 
AnswerRe: replace selected item of list box Pin
Luc Pattyn10-Sep-07 3:14
sitebuilderLuc Pattyn10-Sep-07 3:14 
GeneralRe: replace selected item of list box Pin
Rupesh Kumar Swami10-Sep-07 3:28
Rupesh Kumar Swami10-Sep-07 3:28 
QuestionSetting parent of word application Pin
Salman Sheikh10-Sep-07 2:12
Salman Sheikh10-Sep-07 2:12 
http://www.codeproject.com/cs/miscctrl/winwordcontrol.asp

I am using this control in my application. It works fine for the first time but every time after that (until we exit application and restart it ) instead of loading word inside the control it is loaded as a separate application. i have debugged the code (load document method) many times but there is no problem and all statements execute fine. one change i have made in the code is the closecontrol method and the change is


public sub closecontrol()
Dim dummy As Object = Nothing
Dim rcw As Object = Nothing
If wd.Documents.Count > 0 Then
wd.Documents.Close(dummy, dummy, dummy)
Marshal.FinalReleaseComObject(wd.Documents)
End If
wd.Quit(dummy, dummy, dummy)
rcw = wd
wd = Nothing
Marshal.FinalReleaseComObject(rcw)

deactivateevents = False

document = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
wd = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
end sub

i call this method when closing the form on which this control is placed.

please let me know if you have any idea about this problem

Salman Sheikh

AnswerRe: Setting parent of word application Pin
Paul Conrad16-Sep-07 8:34
professionalPaul Conrad16-Sep-07 8:34 
QuestionHow to Show Text in Label Pin
somsakchoto10-Sep-07 2:09
somsakchoto10-Sep-07 2:09 
AnswerRe: How to Show Text in Label Pin
Salman Sheikh10-Sep-07 2:13
Salman Sheikh10-Sep-07 2:13 
GeneralRe: How to Show Text in Label Pin
somsakchoto10-Sep-07 2:25
somsakchoto10-Sep-07 2:25 
AnswerRe: How to Show Text in Label Pin
Mbire10-Sep-07 2:23
Mbire10-Sep-07 2:23 
AnswerRe: How to Show Text in Label Pin
Christian Graus10-Sep-07 4:00
protectorChristian Graus10-Sep-07 4:00 
Questionvb.net 2005 Connecting to MySQL 5 [modified] Pin
Mbire10-Sep-07 2:07
Mbire10-Sep-07 2:07 
AnswerRe: vb.net 2005 Connecting to MySQL 5 Pin
Paul Conrad16-Sep-07 8:33
professionalPaul Conrad16-Sep-07 8:33 
GeneralRe: Combobox problem Pin
Dave Kreskowiak10-Sep-07 1:25
mveDave Kreskowiak10-Sep-07 1:25 
QuestionCreating Setup Problem Pin
juli Paris10-Sep-07 1:02
juli Paris10-Sep-07 1:02 
QuestionRunning a .mdb file in network Pin
tonymathewt10-Sep-07 0:55
professionaltonymathewt10-Sep-07 0:55 
AnswerRe: Running a .mdb file in network Pin
Tom Deketelaere10-Sep-07 1:12
professionalTom Deketelaere10-Sep-07 1:12 
GeneralRe: Running a .mdb file in network Pin
tonymathewt10-Sep-07 18:57
professionaltonymathewt10-Sep-07 18:57 
GeneralRe: Running a .mdb file in network Pin
Tom Deketelaere10-Sep-07 21:43
professionalTom Deketelaere10-Sep-07 21:43 
QuestionApplication Path Pin
Trupti Mehta9-Sep-07 23:17
Trupti Mehta9-Sep-07 23:17 
AnswerRe: Application Path Pin
Guffa9-Sep-07 23:59
Guffa9-Sep-07 23:59 
GeneralRe: Application Path Pin
Trupti Mehta10-Sep-07 23:41
Trupti Mehta10-Sep-07 23:41 

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.