|
So you were able to attach to the process, move in to debug mode, but then it died on you? I'm not sure but that might be because debugging a service starting from OnStart can be problematic because if you spend too much time in OnStart, your service won't actually start. You might try putting a sleep right before you do your database connection, provided that is not in OnStart, and let OnStart run without any breaks. Then maybe you can get into debug mode before the connection happens and then step through the code from there.
|
|
|
|
|
i put the break point on timer fire . on pressing f11 it jump to dim log line. then to sub new . the yellow point disappear.then the error "cannot start from the command line or debbuger....."
Dim log As New EventLog("Application", ".", "Diamond eMail Solution")
Private Sub TimerFired(ByVal sender As Object, ByVal e As ElapsedEventArgs)
'Working()
'getApplicationData()
ProcessMail()
End Sub
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
|
|
|
|
|
Hiii
I m working on outlook 2003 add ins using vb.net. and i want to inset the particular text at the end of the curent message in reply window not at the bottom of the message.
Ex:
Hiii
Mr XXX
From
M [Insert Text Here]
---------------------------------------------------------------------------------------
From:khatrimitesh@hotmail.com
Sent: Sunday, June 22, 2008 6:00 PM
To: mitesh.khatri
Subject: Outlook Project Specs
Mitesh
Regards
M
I want to insert the text at the <inset text="" here=""> location not at the end of this message in reply window.
Please suggest how i do this.
Thanx
~Khatri Mitesh
|
|
|
|
|
Dear Gents,
I have added a image in picturebox say image1.jpg when form s loaded. In a button click I want to check whether image in a picture box is image1.jpg or some other else.
Pls help me to achieve this
Regards
Azeem
|
|
|
|
|
an imagebox has a property 'initailimage'
my suggestion would be to put the image1.jpg into this property (and never change it)
then compare the imagebox.image to the imagebox.initialimage
I vagly rember doing something like this in the past and it did work so...
|
|
|
|
|
If picturebox1.Image = image1 then
do something...
End If
Just replace [image1] with the location of the image you want to check.
How many bytes of text have I typed in my lifetime??? Man, I wish I kept track...
|
|
|
|
|
First, I am assuming you marked the other two answers (which would have worked) as a bad answer. Don't do this if you do not understand what they are saying, it just agravates other forum dwellers.
Second, you should be able to store unique picture information in the Tag property (as a string), and then compare the unique values of different images when replacing the image. I would suggest the unique value be the filename of the picture.
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
|
|
|
|
|
Thanks a lot.
Absolultely corrct.
Regards
Azeem
|
|
|
|
|
Hi all,
i have a problem where i have a recordset of about 200 records containing customer names, for each record, i have to open a crystal report passing the recordset data as parameter and then exporting that report to html format (4.0)
main problem is that when i run the program it works fine for few records and then it gives an error
"Unhandled win32 exception occured in vb6.exe[7828] "
and thus terminating the program.
this error appears randomly sometimes after 15 records and other times after 50+ records.
i am attachign the code with this thread please havea look at the code and do suggest me a solution. it looks as if its related to memory management.
thanks in advance.
regards,
atin...
code
Private Sub Command1_Click()
stdt = CDate(strStDt)
seldt = CDate(strSelDt)
'rs is recordset db is connection object
rs.Open str1, db, adOpenDynamic, adLockOptimistic
Set cry = New CRAXDRT.Application
ReDim strCS(1 To rs.RecordCount)
For i = 1 To rs.RecordCount
strCS(i) = rs.Fields(0)
rs.MoveNext
Next i
rs.Close
Set rs = Nothing
db.Close
Set db = Nothing
Set rep = cry.OpenReport("DtrList-xbndrstatement.rpt")
For i = 1 To UBound(strCS)
rep.EnableParameterPrompting = True
rep.DiscardSavedData
rep.ParameterFields.GetItemByName("seldate").AddCurrentValue seldt
rep.ParameterFields.GetItemByName("stdate").AddCurrentValue stdt
rep.ParameterFields.GetItemByName("stCus").AddCurrentValue strCS(i)
With rep
.ExportOptions.FormatType = crEFTHTML40 'exporting to html format'
.ExportOptions.DestinationType = crEDTDiskFile
.ExportOptions.HTMLFileName = "C:\" + strCS(i) + ".html"
.Export False
End With
Next i
Set rep = Nothing
cry.CanClose
Set cry = Nothing
End Sub
|
|
|
|
|
Hi,
I am trying to debug a .net 2003 windows service on a remote computer using VS2003.
I am connected to the remote pc by a VPN.
I have installed the msvcmon.exe on the remote and ran it in tcpip mode.
I am able to connect to the remote computer and service process using debug, Processes in VS2003. Using Tcpip.
But I put a breakpoint on a line and the debugging is not being hit.
Is this a futile exercise???
Should I upgrade my service to 2005 and use that debugger??
Or is it something I am missing??
Malcolm
|
|
|
|
|
hi ,
I m developing application which contain information about chemical compound. all formula of chemical compound contains superscript & subscript. I store value in database using sub & sup Tag .but crystal report does not support these tag
how can we change formula to subscript & superscript form in crystal Report as following
NH4Al(SO4)2.12H2O
Any help will be appreciated
Thanks in advance
K.mani
Software Engineer,
C-Tech Environmental Labs PVT Ltd,
Chennai(India)
By
K.mani
|
|
|
|
|
Does crystal support RichText Format? If so you could store your forumlas in Rtf or convert to Rtf.
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
Hi,
i want to add a comment to DataGrid cell just like in Excell i am using VB.Net 2003 thanks.
Mohammad Al Hoss
|
|
|
|
|
Here[^]
(Didnt saw the link so not sure if it helps)
|
|
|
|
|
This link is for .net 2005 and i am using 2003 but thanks for your help
Mohammad Al Hoss
|
|
|
|
|
Hi,
i have a project in which i mostly use Public Sub or Sub declaration because i am used to it. Most of those subs, could have been actually even Private Sub. Do i gain something if i change those subs(public subs or subs) and make it private sub in performance issue(for example memory)?
thanks in advance...
|
|
|
|
|
No difference in memory or performance.
This is a design issue, not a performance one.
|
|
|
|
|
No differences in performance. But if you are making everything public, you are breaking the OO rules. So only expose the needed methods/properties to the outside than exposing everything.
|
|
|
|
|
Public declaration not effect the performance but it is not a good programming to declare all variable and member declare public.
Thanx
~ Khatri Mitesh
|
|
|
|
|
Hi Friends,
In my VB 6.0 application, I am using database connection in a module. But now i need to place the connection in .ini file so whenver there is a change in connection string i can change .ini file. So pls. help me how to create .ini file for db connection and also how to call that file from my application. Please help me.
Thanks and Regards,
|
|
|
|
|
aaraaayen wrote: In my VB 6.0 application, I am using database connection in a module. But now i need to place the connection in .ini file so whenver there is a change in connection string i can change .ini file. So pls. help me how to create .ini file for db connection and also how to call that file from my application. Please help me.
IIRC, you can use API calls to read INI files from VB6.
HTH
|
|
|
|
|
|
I have a small app that extracts email addresses from the body of any mail message in a folder. That part is working fine.
I now want to extract the email addresses from any attachments also and I am having a problem opening them. (These are bounced email messages, so the real detail is in the attachment. The attachments are generally emails - no word/excel files or anything like that). I just want to get the body of the attachment as a string that I can pass to my regEx based extraction routine.
I have tried:
Private Sub ReadAttachment(ByVal theAttachment as Attachment)
Dim fs As FileStream = File.OpenRead(theAttachment.PathName)
Dim theMsg As String = fs.ToString
SaveEmailAddresses(theMsg)
End Sub
And
Dim theItem As MailItem = CType(theAttachment, MailItem)
Which both fail.
I can't find anything about opening attachments on Google - lots about saving and sending.
Any pointers on how to do this will be welcome.
Cheers.
|
|
|
|
|
After a bit more research, I have half an answer.
What I have managed to (sort of) get working is, save the attachment and then open it as a mail item.
I.E.
Try
theAttachment.SaveAsFile("c:\TempAttachment.msg")
Dim theItem As MailItem = CType(theONS.Application.CreateItemFromTemplate("C:\TempAttachment.msg"), MailItem)
Dim theMessage As String = theItem.Body.ToString
SaveEmailAddresses(theMessage)
Catch ex As InvalidCastException
Dim theFileName As String = String.Concat("c:\TempAttachment", theErrorFile, ".msg")
theAttachment.SaveAsFile(theFileName)
theErrorFile += 1
Catch ex As System.Exception
SaveEmailAddresses("Attachment@Failed.to.Open.com")
theErrorCount += 1
MsgBox(ex.ToString, MsgBoxStyle.Critical, "Error")
Finally
File.Delete("c:\TempAttachment.msg")
End Try
The problem now is that only some of the attachments are being cast as MailItems correctly. The other half throw a InvalidCastException.
As far as I can see, there is little difference between the two types of attachments. Both use the same outlook message window when opened from the saved copy. In the original email, the ones that work have the "email" icon and the ones that don't have a different icon. (Sort of a circle with some wires coming from the top right).
Any one know how I can cast these last attachements as MailItems?
|
|
|
|
|
Does anyone know if there's a painless way to get an instantaneous reading for CPU Utilization? I realise I can use a PerformanceCounter to call .RawValue but I have no idea how to convert that to anything that means anything. I don't want to have to take 2 values (ie. using .NextValue or .NextSample on the performance counter) as I know how to do this (see the example code below)
Dim myCounter As System.Diagnostics.PerformanceCounter = New _
System.Diagnostics.PerformanceCounter()
myCounter.CategoryName = "Processor"
myCounter.CounterName = "% Processor Time"
myCounter.InstanceName = "_Total"
Console.WriteLine(myCounter.NextValue().ToString())
System.Threading.Thread.Sleep(1000)
Console.WriteLine(myCounter.NextValue().ToString())
I realize that the CPU utilization value is a sampled value and *not* an instantaneous one but I'm thinking there must be a way to query whatever value Task Manager currently has - but I can't see a way of doing that?
(If you're wondering, I have a time critical app that I'd like to record a timestamp with current CPU Utilization in a log - the value doesn't have to be perfect but having a value is better than not having one.)
Thanks!
|
|
|
|