I'm creating a program to generate PDF files in VB.Net.
Everything is working fine except that the image is being displayed with a blue background while the image provided doesn't have any.
Following are the lines of code being used:
sColor = IIf(mvarEncodeASCII85, ToASCII85(ImgColor),
(System.Text.Encoding.GetEncoding(1252).GetString(ImgColor)))
The image is a bitmap image.How can i solve the problem?
Matt JohnPosted Sep 28, 2009, 2:00 AM
Hi readers,
The following simple example demonstrates similarity in syntax between VB and VB.NET. Both examples pop up a message box saying "Hello, World" with an OK button.
Classic VB example:
A VB.NET example, MsgBox or the MessageBox class can be used:
SubEnd Substatements when the corresponding button is clicked in design view. Visual Basic .NET will also generate the necessaryClassandEnd Classand statements. The developer need only add the statement to display the "Hello, World" message box.Call).Command1andButton1are not obligatory. However, these are default names for a command button in VB6 and VB.NET respectively.Handleskeyword is used to make the subButton1_Clicka handler for theClickevent of the objectButton1. In VB6, event handler subs must have a specific name consisting of the object's name ("Command1"), an underscore ("_"), and the event's name ("Click", hence "Command1_Click").MsgBoxin theMicrosoft.VisualBasicnamespace which can be used similarly to the corresponding function in VB6. There is a controversy about which function to use as a best practice (not only restricted to showing message boxes but also regarding other features of theMicrosoft.VisualBasicnamespace). Some programmers prefer to do things "the .NET way", since the Framework classes have more features and are less language-specific. Others argue that using language-specific features makes code more readable (for example, usingint(C#) orIntegerSystem.Int32). (VB.NET) instead ofThe following example demonstrates a difference between VB6 and VB.NET. Both examples close the active window.
Classic VB Example:
A VB.NET example:
Note the 'cmd' prefix being replaced with the 'btn' prefix, conforming to the new convention previously mentioned.
Visual Basic 6 did not provide common operator shortcuts. The following are equivalent:
VB6 Example:
VB.NET example:
VB.Net is excellent language for applications;
Thanks
renu yadavPosted Mar 17, 2009, 1:24 AM
thanks for your response..but this does not work in my case.I have developed a application in visual basic which dynamically generates pdf files.but i have now upgraded the application to vb.net.that is why i am getting the problems...i have provided the problamatic lines of code..if u can help i can provide u with the complete code..
Praveen KumarPosted Mar 17, 2009, 1:02 AM