|
Peoples are interested in finding the mistakes in forums inspite of suggesting the solution.
Regards,
G.Manivannan M.Sc.,[IT],
Programmer,
Bangalore.
|
|
|
|
|
Its Good to read where you post before you post.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Its Not a time passing forum and its a purely discussion forum and i don't want reply like these.
Regards,
G.Manivannan M.Sc.,[IT],
Programmer,
Bangalore.
|
|
|
|
|
Problem: I need to be able to save printer and page settings to db and then apply them to a crystal report automaticly (at later point in time).
I'v been able to do this by serializing/deserializing the objects and then apply them to the crystal report.
This all works very nicly on XP
But on vista nothing of this seems to work, even worse if the user has set the print options (printersettings and pagesettings) on an xp machine and then try's to use them on a vista machine the programme craches completly (the other way around it keeps working ).
Question: how can I save 2 objects to db (system.drawing.printing.printersettings / system.drawing.printing.pagesettings) and then get them back from the db, wich is xp and vista compatible.
Or is there another (better) way to do this?
Google didn't help at all (this time)
|
|
|
|
|
What approaches have you tried doing besides serializing/deserializing?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
First sorry for the late answer but I was on holiday for the past 10days
So far I have tryed saving only the printername (using default settings then) but this doens't give us enough control over the printing.
I'v tryed to save more settings (pages,marges,...) but then there is the problem what to save because there are alot printers out there with specific needs.
I haven't found any better way than to serialize the settings to have all the settings in one place
any idea's are welcome
|
|
|
|
|
hi all,
how can i perform extractaction and compression of files using vb.net (without WINZIP or WINRAR mean using windows Utility or something else)
|
|
|
|
|
Private Sub Compress(ByVal Filename As String)
Dim targetfile As String = IO.Path.ChangeExtension(Filename, "zdx")
Using sr As New IO.FileStream(Filename, IO.FileMode.Open)
Using sw As New IO.FileStream(targetfile, IO.FileMode.OpenOrCreate)
Using gZip As New IO.Compression.GZipStream(sw, IO.Compression.CompressionMode.Compress, False)
Dim buffer(sr.Length) As Byte
sr.Read(buffer, 0, buffer.Length)
gZip.Write(buffer, 0, buffer.Length)
gZip.Flush()
gZip.Close()
End Using
sw.Close()
End Using
sr.Flush()
sr.Close()
End Using
End Sub
Here is the code to uncompress,
Private Sub UnCompress(ByVal filename As String)
Dim targetfile As String = IO.Path.ChangeExtension(filename, "doc")
Using sw As New IO.FileStream(targetfile, IO.FileMode.OpenOrCreate)
Using sr As New IO.FileStream(filename, IO.FileMode.Open)
Using gZip As New IO.Compression.GZipStream(sr, IO.Compression.CompressionMode.Decompress)
Dim buffer(sr.Length) As Byte
gZip.Read(buffer, 0, buffer.Length)
sw.Write(buffer, 0, buffer.Length)
End Using
End Using
End Using
End Sub
|
|
|
|
|
hi,
m new for the asp.net. will be glad if someone gives me an idea on how to download the file residing the the server folder from the client browser.
i googled many sites but haven't yet found the solution, though have already known how to upload into the server.
|
|
|
|
|
1st Solution
http://www.google.com/search?hl=en&q=asp.net+download+file[^]
Still, if you can not find than somewhat like this...
Response.ContentType = "image/jpeg";
Response.AppendHeader("Content-Disposition","attachment; filename=SailBig.jpg");
Response.TransmitFile( Server.MapPath("~/images/sailbig.jpg") );
Response.End();
|
|
|
|
|
I am knew in Programming. I am working in VS2005 prof and using VB code. I want to see all the members in a Group in active directory and write the members names and the group name to a Excel file. I know nothing about working with active directory. All I have is the LDAP. Please can someone help me???
|
|
|
|
|
|
My bad "new" in programming. I do not know how to code in C#. all i want is just the names of the members in a group.
I have a OU with groups in them. need to reed in every group the members and copy them in a excel file
|
|
|
|
|
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
|
|
|
|
|