منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : تحويل من سي شارب الى vb.net
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
الكود في الفديو ده 
رجاء المساعدة
https://youtu.be/YIrEw0UOA0Y
بعد عمل التقرير كما في الفيديو






هذا تحويل الكود من سي شارب الى vb.net


PHP كود :
Public Class Form1

    Dim imageUrl 
As String

    Private Sub btnBrowse_Click
(ByVal sender As System.ObjectByVal e As System.EventArgsHandles btnBrowse.Click
        Using ofd 
As New OpenFileDialog With {.Filter "JPEG|*.jpg"}
 
           If ofd.ShowDialog DialogResult.OK Then
                imageUrl 
ofd.FileName
                PictureBox1
.Image Image.FromFile(ofd.FileName)
 
           End If
 
       End Using

    End Sub

    Private Sub btnPrint_Click
(ByVal sender As System.ObjectByVal e As System.EventArgsHandles btnPrint.Click
        If Not String
.IsNullOrEmpty(imageUrlThen
            Using frm 
As New frmPrint With {._imageUrl imageUrl}
 
               frm.ShowDialog()
 
           End Using
        End 
If
 
   End Sub

End 
Class 

PHP كود :
Imports Microsoft.Reporting.WinForms
Imports System
.IO

Public Class frmPrint

    
Public _imageUrl As String

    
Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles MyBase.Load
        Dim fi 
As New FileInfo(_imageUrl)
        
ReportViewer1.LocalReport.EnableExternalImages True
        Dim pName 
As New ReportParameter("pName"fi.Name)
        
Dim pImageUrl As New ReportParameter("pImageUrl", New Uri(_imageUrl).AbsoluteUri)
        
ReportViewer1.LocalReport.SetParameters({pNamepImageUrl})
        
ReportViewer1.LocalReport.Refresh()
        
Me.ReportViewer1.RefreshReport()
    
End Sub

End 
Class