Click here to Skip to main content
13,558,718 members
Rate this:
Please Sign up or sign in to vote.
Hi all

I have one application for barcode generation in c# and my actual application is in
Now in the C# application there is one button called encode. after clicking that it shows the generated bar code for a particular string.

Now i want that final barcode image to be placed ( a picturebox)in my application form..means the output of the C# application.

Is it possible to do..???

else please tell me some solution for that

Thank you
Posted 6-Jan-13 22:25pm
Updated 6-Jan-13 22:43pm
Christian Graus 7-Jan-13 4:27am
What do you mean by 'attach' ? Did you consider using a subject that makes sense, and is not generic to the point of being meaningless ?
Eyakem 7-Jan-13 4:44am
Duplicate question, please look at this thread
You need to generate Barcode in VB, correct?
Code-Hunt 7-Jan-13 4:49am
Please check my Answer...
IpsitaMishra 7-Jan-13 5:21am
+10 to Tadit for your effort Keep it up :)
Thanks a lot @IpsitaMishra.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You could convert the C# code that generates the barcode into a DLL. It is then a simple matter to call the barcode generator from your VB.NET application. Alternatively just rewrite it in VB.NET.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Suppose that you have an image in C# app, and you want to transfer the image to VB.NET app, placed in PictureBox1.
If both applications runs in same computer, you can use Clipboard.

Code for VB.NET app:
Private Sub ReceiveImage(ByVal state As Object)
    Dim hWait As New System.Threading.EventWaitHandle(False, System.Threading.EventResetMode.ManualReset, "Global\ImageTransfer")
        hWait.WaitOne() ' Waiting signal from your C# app
        Me.Invoke(New System.Threading.ThreadStart(AddressOf GetImageFromClipboard))
End Sub

Private Sub GetImageFromClipboard()
    PictureBox1.Image = Clipboard.GetImage()
End Sub

add this line in Form Load event:
System.Threading.ThreadPool.QueueUserWorkItem(New System.Threading.WaitCallback(AddressOf ReceiveImage))

To send an Image from C# app:
Image anImage;

// Tell your VB.NET app, there is an image in Clipboard
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

I am a little confused.
As I know, both C# and VB.NET in .net application are supported.
If you want to change the c# to , just need to rewrite it.
Here is an example:
Dim barcode As BusinessRefinery.Barcode.QRCode =
New BusinessRefinery.Barcode.QRCode()
barcode.Code = "QR Code"
barcode.Resolution = 104
barcode.Rotate = BusinessRefinery.Barcode.Rotate.Rotate270
barcode.Format = System.Drawing.Imaging.ImageFormat.Gif

Barcode Generator for VB.NET is a professional and flexible barcode generating component, enabling users to easily integrate dynamic barcodes into Visual Basic.NET development environments, including VB.NET ASP.NET & Windows Applications, VB.NET Class & Console Applications, SSRS for VB.NET and VB.NET Crystal Report.

Hope it helps!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01-2016 | 2.8.180515.1 | Last Updated 14 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100