|
i'm absolutly sorry .i need the coding in vb.net. i have wrongly chosen asp.net . i have got the solution and also i cant get statement u hav sent. pls explain it clearly
spriya
|
|
|
|
|
Hi,
I developed a windows application in Vb.Net 2003.It is working fine in this.
But when I am trying to convert this into .Net 2005 I am getting this error.
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.set_Site(ISite value)
at System.ComponentModel.Container.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(IDesignerSerializationManager manager, CodeStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)
I am seeing a lot of people reporting this error, on other forums, but no one has an answer
Please anyone help me how to resolve this problem.
Regards
Pavani.
|
|
|
|
|
What COM object are you using ? Is it registered ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How to send an HTTP request with VB.Net while using the cookies already stored by Internet Explorer?
|
|
|
|
|
You could try hosting IE as a control, and try to get access to the cooke info from there perhaps ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am having a lot of trouble with this when I thought that it was supposed to be really easy. I have a form designated to specific settings in my program. Specifically I need to manipulate a tab control (I got that part down.) But I can't figure out how to do this on another form and have code work for the other. This is essential or I can't implement any optional settings. Please, I only have a week until this thing is due.
|
|
|
|
|
Why don't you give us the code you have and let us know where you are getting an error and what error you are getting. Generally, if you have Form1 and Form2 and Form1 has the tabcontrol, you should be able to put code similar to this on Form2 to manipulate Form1:
Form1.tcMyTabControl.SelectedTab = tpMyTabPage
Hope this helps.
|
|
|
|
|
I have a thread running in the background of Form1 and the thread permanently opens up a new form, Form2, by calling the ShowDialog() method of Form2. On form2 I have a SaveFileDialog but if it tries to open I get this error:
"Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process."
What can I do to resolve this?
|
|
|
|
|
|
How do I best save a datatable to .csv format?
Thanks!
|
|
|
|
|
Depends on what databse you are using.
|
|
|
|
|
How so? I have a datatable in memory that I want to write to .csv. Can I use an adapter, or do I have to enumerate the rows and columns of the table, adding my own commas between each cell and writing the result as a text string?
Thanks!
|
|
|
|
|
cstrader232 wrote: datatable in memory that I want to write to .csv
Check this out http://www.devx.com/vb2themax/Tip/19703[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
|
Very sorry, I mis-read your post, I thought you asked about database not datatable
|
|
|
|
|
|
can someone explain Independentsoft.Webdav.Exchange.Resource.SendMessage component for me i need it in my project
|
|
|
|
|
Ebube wrote: can someone explain Independentsoft.Webdav.Exchange.Resource.SendMessage component for me
This might be far fetched, but perhaps Independentsoft[^] would know something about it?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
how can i make this dummy code in a project run as windowservice
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.ProcessMail()
End Sub
#End Region
#Region "NetCredential"
Private Sub InitSenderSession()
Try
'Dim credential As NetworkCredential = New NetworkCredential(UserName, Password, DomainName)
'Dim session As WebdavSession = New WebdavSession(credential)
'resource = New Resource(session)
'Dim mailBox As String = Hostname & "/" &Box & "/"
'Dim SenderMailbox = resource.GetMailbox(mailBox)
' SenderMailbox = resource.GetMailbox("http:///exchange/oe/")"http://s/exchange/m/EmailBox
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
#End Region
#Region "ProcessMail"
Sub ProcessMail()
Try
Dim insert As Boolean
Dim DirObj As New DirectoryInfo(Hostname)
Dim Dirs As DirectoryInfo() = DirObj.GetDirectories("*.*")
Dim DirectoryName As DirectoryInfo
Dim dNfNme As String
For Each DirectoryName In Dirs
Try
Console.WriteLine(DirectoryName.FullName)
Console.WriteLine(DirectoryName.Name)
pfcAccount = DirectoryName.Name
Dim di As String = DirectoryName.FullName & "\IncomingFolder\"
Dim pfaDirs As New DirectoryInfo(DirectoryName.FullName & "\IncomingFolder\")
Dim Files As FileInfo() = pfaDirs.GetFiles("*.*")
Dim Filename As FileInfo
For Each Filename In Files
Try
If (Filename.Attributes And FileAttributes.ReadOnly) Then
Filename.Attributes = (Filename.Attributes And Not FileAttributes.ReadOnly)
End If
Console.WriteLine(Filename.FullName)
Console.WriteLine(Filename.Name)
myfileName = Filename.Name
dNfNme = "/" & DirectoryName.Name & "/IncomingFolder/" & Filename.Name
Dim aTime As Date = Filename.LastAccessTime
' Dim a As Date = Filename.LastAccessTi
If getIncomingFile(Account, myfileName) = False Then
Dim credential As NetworkCredential = New NetworkCredential(diamondUserName, diamondPassword, DomainName)
Dim session As WebdavSession = New WebdavSession(credential)
session.UserMailbox = mailSubject & "/" & diamondEmailBox '"http://myserver/exchange/Administrator/"
Dim resource As Resource = New Resource(session)
"
message1.To = Email1
message1.Bcc = Email2
message1.Cc = Email3
If resource.SendMessage(message1) = True Then
insert = bllclass.InsertIncoming(DirectoryName.Name, myfileName, 0, dNfNme.Trim)
End If
Else
If IsSent = False Then
If getFileStatus(Account, myfileName, dbFullPath) = False Then
Dim credential As NetworkCredential = New NetworkCredential(UserName, Password, DomainName)
Dim session As WebdavSession = New WebdavSession(credential)
session.UserMailbox = mailSubject & "/" & EmailBox '"http://myserver/exchange/Administrator/"
Dim resource As Resource = New Resource(session)
Dim message1 As Message = New Message
If resource.SendMessage(message1) = True Then
End If
Else
insert = bllclass.UpdateIncoming(DirectoryName.Name, myfileName, dNfNme.Trim)
End If
End If
End If
Catch E As Exception
' MsgBox("Error changing attribute for {0}", Filename.FullName)
' MsgBox("Error: {0}", E.Message)
End Try
IsSent = False
Next
Catch E As Exception
'MsgBox("Error accessing {0}", DirectoryName.FullName)
'MsgBox("Error: {0}", E.Message)
End Try
Next
Catch ex As Exception
' MsgBox(ex.Message)
End Try
End Sub
#End Region
End Class
|
|
|
|
|
Start by creating a new project of type Windows Service. Then paste your code in. Then read up on windows services installation and running.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
thanks
pls can you look at that code an tell me how to invoke it if possible with sample code the code is a method inside a project do i need to invoke the entire project
|
|
|
|
|
Ebube wrote: can you look at that code an tell me how to invoke it if possible with sample code
For the right price. Thats what I do for a living
Seriously, if someone else writes your code then you never learn anything. There are plenty of sample windows service applications that you can use for learning.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
i understand can you give a link to the sample application you think can solve my problem
the one i have just write entry to eventlog
|
|
|
|
|
hi all,
how can i use Office 2007 Chart component on a Windows Form ?
however i find some link, but it is related to Office XP
anybody have idea or link that is helpful for me ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
To use an Office 2007 feature, you will have to use Visual Studio Tools for Office (VSTO). Another option would be to use Dundas or another charting API.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|