|
I am using VB 6. I exported table data into Microsoft excel sheet. Now I have to export data into Sun's OpenOffice excel format. What I have to do for this? Can any body help?
I used Excel.Application and Excel.worksheet for Ms. excel. What I have to for Open office?
Tnx in adv.
Balasubramanian K.
|
|
|
|
|
Try oooforum.org. You might find something there.
|
|
|
|
|
It would probably be easier to export it to CSV (if that's an option). That way you can open it in almost any program.
|
|
|
|
|
i can easily add single image in the mail but the error is when i try to add two images it picks only last one. below is the code in mail i get teh last image "DB" i want to get both images how can i get that.
Dim strHTML As String
strHTML = mmMailMsg1.Body.ToString.Replace("DM", "cid:DM")
strHTML = mmMailMsg1.Body.ToString.Replace("DB", "cid:DB")
View = System.Net.Mail.AlternateView.CreateAlternateViewFromString(strHTML, Nothing, "text/html")
resource = New System.Net.Mail.LinkedResource("E:\..\PC Case.jpg")
resource.ContentId = "DM"
resource1 = New System.Net.Mail.LinkedResource("E:\..\Stuff 3.jpg")
resource1.ContentId = "DB"
View.LinkedResources.Add(resource)
View.LinkedResources.Add(resource1)
mmMailMsg1.AlternateViews.Add(View)
Dim objSMTPClient As New System.Net.Mail.SmtpClient()
objSMTPClient.Host = System.Configuration.ConfigurationManager.AppSettings("ServerMail").ToString()
objSMTPClient.Send(mmMailMsg1)
|
|
|
|
|
Have you tried creating multiple views, adding a single image to each view, and then adding all the views to the message object?
My advice is free, and you may get what you paid for.
|
|
|
|
|
I have tried with Mutiple views also but the problem is still the same i get the last image.
If i try to send mail through CDO then i can easily attach as many images as i want but with SMTP it is giving problems
|
|
|
|
|
I managed to make my VB.Net application a single instance application by checking Process Id in Sub Main(). Now I want to load a form from existing running instance of the application. Can anybody guide me that how I can obtain an instance name by using hWnd?
Thanks in advance.
|
|
|
|
|
|
Many thanks for your reply. But it is not exactly what I need. My requirements are :
1- To check for an existing instance.
2- To load a form from existing instance based on command line parameter value (if found).
I have already ckecked for previously running instance and it works fine. What I need is to load a form from already running instance and perform search in existing instance. I have managed to obtain the hWnd value of runnig instance but don't know how to call form / function by using this hWnd value. I will appreciate for your help.
Thanks
|
|
|
|
|
research mutex...exactly what you want
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
I want to send my cursor to catch in try / catch block when one of my condition doesn't meet
how can i acheive that ?
Please look into the following code that explains a bit:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim i As Integer
i = Val(Me.txtErrMsg.Text)
Try
If i = 4 Then
' If i = 4 then I want to go to catch and display the message Now throwing exception
Else
Me.txtErrMsg.Text = "Normal"
End If
Catch ex As Exception
Me.txtErrMsg.Text = "Now throwing Exception"
End Try
End Sub
When i = 4 then I want to go to catch and show the message how can I do that ??
Thanks in advance
|
|
|
|
|
|
That isn't actually a good answer. You are using the exception handling system to modify regular program flow rather than respond to exceptional events. Exceptions are very expensive to handle and should not be used unless the thing throwing the exception is a very unusual case that you don't expect to happen, but need to handle if it does.
You also say in your blog post that "in the catch part you can do all your garbage collection and closing the instances." That is a very bad idea. It means you have to write the code twice, once for the good cases where everything works, and once for the bad cases, where things don't work out. What you should be really doing is creating a Finally block so that the resrouces get cleaned up regardless of whether the method ended well, or not.
|
|
|
|
|
Your code would be better written as:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim i As Integer
i = Val(Me.txtErrMsg.Text)
If i = 4 Then
Me.txtErrMsg.Text = "Now throwing Exception"
Else
Me.txtErrMsg.Text = "Normal"
End If
End Sub
Exceptions are expensive. They take many clock cycles as the runtime has to figure out how to back out of what ever it was doing.
|
|
|
|
|
I would like to make a game loop but at the same time I need complete control over the form. I used the following concept but ran into a serious problem. The moment the loop is entered nothing else responds.
This is a windows forms application using vb.net 2008.
I added a module
Module Game
Public Finished as Boolean = False
Public Sub Start()
While Not Finished
My.Application.DoEvents()
End While
End Sub
End Module
The 'Start' sub procedure is called from the forms load even and that is the entire program. When run, the form does not even show up. I don't want to add Me.Show() before running the loop since it defeats the purpose if it's stuck anyway. I need the loop to run while at the same time I need full access to the controls on the form without any stalling or pausing. Does anyone know how to make a properly functioning loop run in parallel to the form?
|
|
|
|
|
You should be spawning a thread for your loop, there are many articles and threads here to help with threading.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You should look into the BackgroundWorker object if you are on .NET 2 or above. You can do it in any version with raw threads, but BackgroundWorker is MUCH easier to manage.
|
|
|
|
|
i want to capture video using pocket pc (WM5) , encode it then store it and transmit it using UDP packets
@ the laptop side the packets'll be recieved , decode and display them one at time
which means streaming technique in delivering the video ;
split the video into parts , transmit these parts in succession (using UDP packets) and enable the receiver to decode and playback the video as these parts are received without having to wait for the entire video to be delivered (on pocket pc side: capturing video - encoding - storing - sending ) so the streaming in sending only :
1- partition the compressed video into UDP packets.
2-start delivery of these packets.
3-begin decoding and playback at the receiver while is still being delivered.
.i've problem in disply the video on the desktop as soon as the first packet is recieved
note
i use VB.NET or C# no problem
plz i need ur help
thanks alot
modified on Friday, August 8, 2008 9:44 AM
|
|
|
|
|
salam ellayan wrote: i've problem in disply the video on the desktop as soon as the first packet is recieved
Well, that's a bit vague. What kind of problem?
|
|
|
|
|
i want to capture video using pocket pc (WM5) , encode it then store it and transmit it using UDP packets
@ the laptop side the packets'll be recieved , decode and display them one at time
which means streaming technique in delivering the video ;
split the video into parts , transmit these parts in succession (using UDP packets) and enable the receiver to decode and playback the video as these parts are received without having to wait for the entire video to be delivered (on pocket pc side: capturing video - encoding - storing - sending ) so the streaming in sending only :
1- partition the compressed video into UDP packets.
2-start delivery of these packets.
3-begin decoding and playback at the receiver while is still being delivered.
.i've problem in disply the video on the desktop as soon as the first packet is recieved
note
i use VB.NET or C# no problem
plz i need ur help
thanks alot
|
|
|
|
|
Hi All;
I'm running some query's against SQL 2005 server. When I run the query's in SQL server they return Null values because there is no data yet.
In my VB code the same query's generate the System.IndexOutOfRangeException: There is no row at position 0. error. I have not been able to come up with a way deal with this.
It seems to happen before this fill line happens
datafromDS(0) = Me.DataSet11.Tables("tblMyTable").Rows(0).Item(0)
Any suggestions on how to handle this. There are times when new records have been added that have Null data in them.
TIA
Rafone
Statistics are like bikini's...
What the reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
First make sure you have a table, then check the rows
If not me.dataset11.tables.contains("tblMyTable") Then
'blow up no table -- or however you want to handle it
Exit Sub
ElseIf me.dataset11.tables("tblMyTable").rows.count = 0 Then
'blow up no rows -- or however you want to handle it
Exit Sub
End If
'Process Records
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Also check the value of Item(0) against DBNull.Value and the target type.
|
|
|
|
|
After going back and trying this again this trap is working. Thanks.
many hours later...
meh
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|