|
|
Can anyone tell me how to get CLSID of my application and product id of my deployment project?
|
|
|
|
|
Hi,
You can get the CLSID of your program using VB.Net in the following manner:
BEGIN CODE
' Use Server 'localhost'. It can be a remote host!
Dim theServer As String = "localhost"
' Use programID 'HKEY_CLASSES_ROOT\DirectoryControl.DirectoryList.1'.
Dim myProgID As String = "DirectoryControl.DirectoryList.1"
' Make a call to the method to get the Type information of
' the given ProgID.
Dim myType1 As Type = Type.GetTypeFromProgID(myProgID, theServer, True)
Console.WriteLine(("GUID for ProgramID " + myProgID + " is: " + myType1.GUID.ToString()))
END CODE
However, if you are using VB 6.0 then you may use the following code snippet:
BEGIN CODE
In a VB6.0 project I had the following codes to get CLSID string from a ProgID:
' define some API functions and a structure data type for GUID
Function CLSIDFromProgID(ByRef szProgID As String) As String
' First, an API Win32CLSIDFromProgID Call
Win32CLSIDFromProgID(StrPtr(szProgID), udtCLSID)
' then, convert CLSID structure type to a long pointer to CLSID
' finally use API CopyMemory to get CLSID string
End Function
Hope this helps .
END CODE
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
Thanks for your help John Adams...
|
|
|
|
|
Hi All,
I am using Vb.net 3.5
suppose I am using "nsoftware.IPWorksSSL.dll", Which is Store in application Directory.
In my code I am writing such as..
at MdiForm.Designer.vb
Me.Xmpp1 = New nsoftware.IPWorksSSL.Xmpps(Me.components)
When The dll file is missing from the application Directory it give me a error message
"The 'nsoftware.IPWorksSSL.dll' file is not defined"
So, How can I Check in my code that the dll file is exist or not.
Please, Help me..
Good By
|
|
|
|
|
Try System.IO.File.Exists at the application's entry point before any use of the dll.
Eslam Afifi
|
|
|
|
|
But Where can I write the Code.
because,It is Unable to build the application.
I am using a control of that dll and if the dll is missing it give me error at the design time
|
|
|
|
|
So the problem is not about checking the dll at the start of the application. Make sure you referenced the file and it is at it's location. Try re-referencing it again. Maybe if you provide more details i'll be able to help. Try browsing the assembly in the Object Browser and see if it works.
Eslam Afifi
|
|
|
|
|
No actually not,
I am creating my application and debug with that dll and it is worked find.
but when I am using .exe file, at that time if that dll is missing then a message will display.
"The Application has encountered a problem and needs to close. We are sorry for the inconvenience "
|
|
|
|
|
Where is your .exe file? Does the dll exist in the same directory? If it doesn't, go to the Solution Explorer -> References and set the Copy Local property of the reference to true. See if this work?
Eslam Afifi
|
|
|
|
|
use following code given below :
if system.io.fileExists(application.startuppath & "\" & "your dll file name") then
print a msg that it exists
else
print a msg that dll file not found.
Hope this will be useful for you.
|
|
|
|
|
If you want your application to be able to start without the dll (which you have to if you want to check if the file exist), you have to load it dynamically instead of having a reference to it. That also means that you can't use any early binding, you have to use reflection to do late binding for anything that you use from the dll.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
How can I do this in my code.
Please, Give me a Guidline
|
|
|
|
|
Dear All,
I am trying to use form closing event for poping message for saving the data before closing the application with X at upper right corner.
But my code is not working. my application closes without poping message box.
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
Dim a As Integer
a = MessageBox.Show("Are you sure to close", "Text", MessageBoxButtons.YesNo)
If a = 6 Then
'Application.Run()
e.Cancel = False
Else
' Application.Exit()
e.Cancel = True
End If
End Sub
Thanks in advance........
kisran
modified on Tuesday, September 16, 2008 2:40 AM
|
|
|
|
|
Hello Kisran,
I am not sure whats wrong at your side. But your code works perfectly at my end.
In case you are not able to resolve it, you can probably try this slight modified
version of your code.
BEGIN CODE
<br />
Dim dr As DialogResult = MessageBox.Show("Do you wish to close the Form", "Closing Form", MessageBoxButtons.YesNo)<br />
If dr = Windows.Forms.DialogResult.Yes Then<br />
e.Cancel = False<br />
Else<br />
e.Cancel = True<br />
End If<br />
END CODE
I hope this works.
Regards,
Allen
Allen Smith
ComponentOne LLC
www.componentone.com
|
|
|
|
|
Thanks allen but this still not working.......
kisran
|
|
|
|
|
Try the following code :
Protected Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs)
dim res
res=msgbox("Do you want to close?",msgboxstyle.yesno,"sample")
if res=vbno then
e.cancel=false
else
e.cancel=true
endif
MyBase.OnClosing(e)
Hope the above code will work...
|
|
|
|
|
Still Not working Gagan............ Its giving compile time error on
MyBase.OnClosing(e)
Error: OnClosing(e) is not a member of system.web.ui
can you Please Help me
kisran
modified on Tuesday, September 16, 2008 2:39 AM
|
|
|
|
|
Try again this one:
Protected Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs)
dim res
res=msgbox("Do you want to close?",msgboxstyle.yesno,"sample")
if res=vbno then
e.cancel=false
else
e.cancel=true
endif
MyBase.OnClosing(e)
end sub
Put end sub after mybase.onclose(e) statement
|
|
|
|
|
Hello All,
How can I create a setup for updates using VS 2005?
This update setup should contain only new/modified files. And when this update setup file will run, it should automatically detect the installed path, and must be able to copy/overwrite the new files.
Thanks in advance...
Amit
|
|
|
|
|
Your question is pretty vauge for such a broad topic. There are all kinds of different settings that need to be tailored to your specific project. You should probably start by reading some articles[^] or doing some google searches[^]. You may want to specifically search for the keyword ClickOnce[^], which is an easy to use deployment for VS 2005 but has some limitations.
Hope this helps.
|
|
|
|
|
Simple databinding works fine with the following code.
Text.DataBindings.Add(Text",datatable1,"Name")
Could anyone suggest on how to do Databinding in Design mode in VS 2005
modified on Thursday, September 18, 2008 1:01 AM
|
|
|
|
|
Hello,
First of all, you need to set the DataSource and DataMember for the BindingSource. Then you can
use set the desired bindingSource.ColumnName in the Text property under DataBindings() in the
Properties Windows(Located at the top on the window) of the TextBox.
In the MoveNext and MovePrevious buttons, you can simply define the following code:
BindingSource1.MovePrevious()
or
BindingSource1.MoveNext()
For more information, you can visit the given link:
http://www.codeproject.com/KB/grid/BindSourceBindingNavCS.aspx[^]
I hope this will help.
Regards,
Allen
Allen Smith
ComponentOne LLC
www.componentone.com
|
|
|
|
|
I have a HTML help file
but my project is updated now how we change the images in this
Amit Battan Ror
battan20@gmail.com
|
|
|
|
|
I am using Vb.net 3.5 as FrontEnd.
When I am Open a Modal Form such as any Message box. I want to Chnage the Background Form Faded.
that means I want to Show the users the Active and DeActive form.
I am applying the Opecity to 50% of the background form,but that is a problem. becase, by changing the Opecity the Background form is transperant that is not I want.
when I am using another form as faded Form, and opened before the modal form that is not good enogh. because, the whole things get flicker, I need a smooth task.
Can it be Possible,So how can I do that. Please give me a suggestion.
|
|
|
|