|
They all have the ability to un-register themselves, but not delete themselves. You can't delete a file in code in the file is running.
You can write a small batch file to unregister the control and then delete it if you want.
regsvr32 -u <full path to control>
del <full path to control>
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the quick response. You have confirmed my view of the problem - and how to go about solving it:
1 - Let the ActiveX un-register itself (does this work correctly? Will this remove ALL registry entries related to the ActiveX? Does this require an actual function call, or does it happen automatically on component disposal? Just wondering...)
2 - Use a desktop shortcut to delete the ActiveX DLL from "Downloaded Program Files" directory. (I'm a little hazy as to what actually happens here - is this a true directory or more of a virtual one? Is the Dll actually located somewhere under the user's Documents and Settings?)
Anyway, thanks again for pointing me in the right direction.
|
|
|
|
|
Wait a minute... This is an ActiveX component in a web page? You'll have to supply a complete .CAB installation for the component, including the stuff to uninstall it. It cannot delete itself.
1 - The ActiveX control does NOT unregister itself unless your kick off the unregister code yourself. This can be done in code by calling the .DLL's DllUnregisterServer function or by using the RegSvr32 utility to call it. You still need an external program or batch file to delete the file.
2 - Yes, it's a true directory, under C:\Windows.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes, the ActiveX is being used in a web page. The challenge at hand involves removing it from the client's computer after use.
The ActiveX is in a CAB. It doesn't yet include an unregisterDLL function, so I'm going to have to add that. While I'm at it, I'll also add a function to create a "delete ActiveX" shortcut on the client's desktop. (We can do this on the client computer because the ActiveX is a "trusted" one, with full access to the client machine.) Then the ActiveX will have to be repackaged in a new CAB, complete with digital signature.
Anyway, thanks for clearing things up for me.
|
|
|
|
|
Hello,
Last time i had posted a query & now i'm answering it. We dont need to specify smtp server name if our Outlook is already configured. But i am getting a problem. How should we access the email id of perticular person from database & send mail only to that email id with which our query matches,
Example : "Select emailid from emptable where empid = '1' "
The below code is running fine when i give fixed address for m.To=manoj.jahagirdhar@hp.com
But i'm unable to access email id from database. Kindly help me!!
Below is the code which is working fine for fixed email id
Dim m As New MailMessage
m.To = "manoj.jahagirdhar@hp.com"
m.From = "manoj.jahagirdhar@hp.com"
m.Subject = "Congrats!!Your Account Is Created. Collect Password from your mail"
m.BodyFormat = MailFormat.Html
m.Priority = MailPriority.High
m.Body = "Your Login ID is '" & TextBox1.Text & "' & Your Account Password Is '" & Password & "'"
SmtpMail.Send(m)
|
|
|
|
|
Question is not that clear. From what i understood, i think query is returning the email id, and giving that email id to the m.To should send the email. If it is giving error, can u tell me what is the error it is showing?
Het Waghela
Be Humble in Victory and Strong in Defeat.
Het Waghela, Blog|Het Waghela DotNet Questions Link|More Links
|
|
|
|
|
Im doing accounting financial report and it involves vertical arrangement of the report design.
let say i put this in my page header section as title:
[Assets]
Then i need to get all assets name from database and for this i use group section to display it ( is it page header cant do this? auto added if there is more record).
Then i want to put the next title
[Expenses]
I need to put that expenses title as like in page header but the position of this expenses must below after asset title and the collection of assets.
Then expenses collection have many different types of expense and i want to display this into group section again and the position of this sure after expense title.
I can do this if i can 'add' page header after the group section OR after report footer but crystal report cannot do that.
How can i solve this?
|
|
|
|
|
Is it possible to populate a datagrid with an array and if so how is it done.
How can you add a new line to a Dataset that is used to populate a grid. i.e. inputted text field to be added to the datagrid without saving it to the database. The reason you want to view the details and if not happy then do not save input values
|
|
|
|
|
I remember in VB6 there are this boxes called Masked Boxes. Is this 'Masked Boxes' still available to use in vb.net? If so, where is it, I can't find it..
|
|
|
|
|
Its not available in dotnet. you need to manually add it as a com control
Jon
|
|
|
|
|
Thanz for replying me on this... Manually add it in COM control huh? Can u tell me how to add it in.. ?
|
|
|
|
|
|
Hmm, i couldn't get in www.codeproject.com/dotnet/activexnet.asp. Is this the correct link?
|
|
|
|
|
|
|
Umm, dun want to sound very stupid but, that link didn't actually tell me how to import the Masked Box ? Hehehe... Sorry for all the bother guys. I just recently migrated from VB6 and even in VB6 I was a very fresh beginner. So VB.net is a bit more complex and all. Hope you guys will bear with me at the moment with my weird questions.
|
|
|
|
|
Ok, its ok now. I got it. It is under Microsoft Masked Edit. Apparently my office dun have VB6 installed so I couldn't find it. Thanz for your help anyway you guys, you r great...
|
|
|
|
|
Not to be completely pedantic, but this goes especially if you are a beginner.
The language you use, and the ability to comprehend your question, goes a long way to being able to answer you and help you. Therefore, try to avoid words like "Thanz" for thanks and "dun" for don't. Native English speakers will not have much difficulty, but those that have english as a second/thrird/fourth language may well do.
|
|
|
|
|
I think there is one that someone made on this site. I know I have seen one somewhere..google it.
|
|
|
|
|
Ahh, found that masked Edit Box u mentioned using google. Thanz a bunch lespaul. U r great...
|
|
|
|
|
hi all
I could Run word by VB6...for example user open an exiting file and make some changes on content of that .doc file
when user close word u know this message appear : do u want to save the changes to "FileName.doc" ? yes/No ...now my problem:i want to control this user selected option (yes or no)in my program..i want to control that user click on yes or no? how can I take this control?
|
|
|
|
|
You cant really, but you dont actually need to.
All you need to do is code in the before close event to pop up your own message box then close word from code and suppress Words one from showing (this is an argument in the close method i think).
Try it yourself. If you have any problems i will try to get an example for you.
Jon
|
|
|
|
|
OK. A simple example for you. All it does is replace words save box with my own.
Private WithEvents oword As Word.Application<br />
Private WithEvents odoc As Word.Document<br />
Private Sub Command1_Click()<br />
<br />
Set oword = New Word.Application<br />
oword.Visible = True<br />
Set odoc = oword.Documents.Open("yourfile.doc")<br />
End Sub<br />
<br />
<br />
Private Sub oword_DocumentBeforeClose(ByVal Doc As Word.Document, Cancel As Boolean)<br />
<br />
If MsgBox("Do you want to save this file?", vbYesNo, "Save") = vbYes Then<br />
oword.Activate ' not required if oword is not visible<br />
odoc.Save<br />
oword.Documents.Close 'If using word 2000 or below i think you need the argument here to not save changes. That will suppress words messagebox but this works fine with word 2003<br />
<br />
oword.Quit<br />
Else<br />
oword.Activate<br />
oword.Documents.Close<br />
oword.Quit<br />
End If<br />
<br />
Set odoc = Nothing<br />
Set oword = Nothing<br />
End Sub
|
|
|
|
|
|
hi all
I could Run word by VB6...for example user open an exiting file and make some changes on content of that .doc file
when user close word u know this message appear : do u want to change to "file name.doc" ? yes/No ...now my problem:i want to control this user selected option (yes or no)in my program..i want to control that user click on yes or no? how can I take this control?
|
|
|
|