Dear All, I have designed a JPG file and want to use in splash screen in my vb.net project. I have set this image in form's background image property. In this JPG file, the blank space is filled with white background by default. But I dont need to show this white background in splash screen. Someone told me that there is a way to do this job by using transparency key. I tried alot by setting form's transparency key to white and also form's back color to white, but it doesn't work. Can anyone help me... Thanks Ovais
Ovais Memon
Posts
-
How to use Transparency key in Splash Screen -
IListSource ImplementationThats what i was doing so far, but the problem is that i m unable to customize column names in the grid. Acc. to your suggestion, i suppose to name the columns for each class at the time of binding with the grid..
-
IListSource ImplementationThanks for your reply dear, but I have only one grid which is binded by different classes at different scenarios.. For e.g. Instead of having separate grids for Employees, Leaves, Allowances, Deductions (to show thier respective detail), i've a single grid. When i hit Employees button, it fills with Employees class, when i hit Leaves button, it fills with Leave class, and so forth.. Hope you understand my problem. Ovais
-
IListSource ImplementationHi All, I have made a project in VB2008 in which I have bind my Grid to Class as a datasource. The column names of Grid are the property names of the class. But I need to have customize column names for my properties in the Grid. One way is to add an attribute _ for example before each property. But it is so hard to name each and every property as i have thousands of properties in this project. Someone has told me that there is a way by using IListSource.. Does anyone have any idea about that?? Regards Ovais
-
ClickOnce DeploymentHi all.. I have created a .Net desktop application by using NHibernate. I want to use ClickOnce Deployment but i am getting problem that hibernate.cfg.xml not found.. The specified file is placed in debug and release folders. Also, when we include Application Files in Publish settings, hibernate.cfg.xml not shown there.. Plz help me out... Ovais.
-
Image not loading in Crystal ReportDear All, I have some problem in loading an image in crystal report. I am using VS 2005 with CR 9. I have a table adapter in which i used an unbound column "Image" of type System.Byte. And I used the following code to set image. .... Dim s As String = dt.Rows(0).Item("ImagePath").ToString Dim fs As FileStream = New FileStream(s, FileMode.Open, FileAccess.Read) Dim image(fs.Length) As Byte fs.Read(image, 0, Convert.ToInt32(fs.Length)) dt.Rows(0).Item("Image") = image ................................(1) fs.Close() .... But it throws an exception at (1) [Unable to cast type of System.IConvertible to type System.Byte] I used to debug the code, and when i reached at (1), i found the datatype of dt.Rows(0).item("Image") = System.DBNull Although it is set to type System.Byte at design time in Table Adapter. Please help me out Regards, Ovais
-
Loading image dynamically in crystal reportI have a field of Image path on database and I need to display the image of student in crystal report. I am using VS2005 with crystal report version 9. I have added the unbound column named "Image" of type system.byte in Data Set and at the load event, I have write the following code. Dim da As New DataSet1TableAdapters.AdmissionFormTableAdapter Dim dt As New DataSet1.AdmissionFormDataTable da.FillByStudentID(dt, _studentID) Dim dtCopy As New DataTable ''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'Code Start to Set Image ''''''''''''''''''''''''''''''''''''''''''''''''''''''' Dim blankFile As String = "C:\Program Files\blank.JPG" If dt.Rows(0).Item("ImagePath").ToString <> "" Then Dim s As String = dt.Rows(0).Item("ImagePath").ToString If FileIO.FileSystem.FileExists(s) Then Dim fs As FileStream = New FileStream(s, FileMode.Open, FileAccess.Read) Dim image(fs.Length) As Byte fs.Read(image, 0, Convert.ToInt32(fs.Length)) dt.Rows(0).Item("Image") = image fs.Close() Else Dim fs As FileStream = New FileStream(blankFile, FileMode.Open, FileAccess.Read) Dim image(fs.Length) As Byte fs.Read(image, 0, Convert.ToInt32(fs.Length)) dt.Rows(0).Item("Image") = image fs.Close() End If Else Dim fs As FileStream = New FileStream(blankFile, FileMode.Open, FileAccess.Read) Dim image(fs.Length) As Byte fs.Read(image, 0, Convert.ToInt32(fs.Length)) dt.Rows(0).Item("Image") = image fs.Close() End If ''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'Code End to Set Image ''''''''''''''''''''''''''''''''''''''''''''''''''''''' dtCopy = dt.Copy Me.rptAdmissionForm1.SetDataSource(dtCopy) Me.rptAdmissionForm1.SetParameterValue("ID", _studentID) When I run the code, error comes that "unable to cast type of system.byte to system.IConvertible", although the datatype of column "Image" is system.byte, and when I debug the code, it shows the datatype of dt.Rows(0).Item("Image") = System.DBNull, Please help me out..!
-
Dynamically Loading Image in Crystal ReportI have a field of Image path on database and I need to display the image of student in crystal report. I am using VS2005 with crystal report version 9. I have added the unbound column named "Image" of type system.byte in Data Set and at the load event, I have write the following code. Dim da As New DataSet1TableAdapters.AdmissionFormTableAdapter Dim dt As New DataSet1.AdmissionFormDataTable da.FillByStudentID(dt, _studentID) Dim dtCopy As New DataTable ''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'Code Start to Set Image ''''''''''''''''''''''''''''''''''''''''''''''''''''''' Dim blankFile As String = "C:\Program Files\blank.JPG" If dt.Rows(0).Item("ImagePath").ToString <> "" Then Dim s As String = dt.Rows(0).Item("ImagePath").ToString If FileIO.FileSystem.FileExists(s) Then Dim fs As FileStream = New FileStream(s, FileMode.Open, FileAccess.Read) Dim image(fs.Length) As Byte fs.Read(image, 0, Convert.ToInt32(fs.Length)) dt.Rows(0).Item("Image") = image fs.Close() Else Dim fs As FileStream = New FileStream(blankFile, FileMode.Open, FileAccess.Read) Dim image(fs.Length) As Byte fs.Read(image, 0, Convert.ToInt32(fs.Length)) dt.Rows(0).Item("Image") = image fs.Close() End If Else Dim fs As FileStream = New FileStream(blankFile, FileMode.Open, FileAccess.Read) Dim image(fs.Length) As Byte fs.Read(image, 0, Convert.ToInt32(fs.Length)) dt.Rows(0).Item("Image") = image fs.Close() End If ''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'Code End to Set Image ''''''''''''''''''''''''''''''''''''''''''''''''''''''' dtCopy = dt.Copy Me.rptAdmissionForm1.SetDataSource(dtCopy) Me.rptAdmissionForm1.SetParameterValue("ID", _studentID) When I run the code, error comes that "unable to cast type of system.byte to system.IConvertible", although the datatype of column "Image" is system.byte, and when I debug the code, it shows the datatype of dt.Rows(0).Item("Image") = System.DBNull, Please help me out..!