|
Hello !
i have finished my application in vb.net 2010 / Net Framework 4 / with Entity Framework 41/ Crystal reports.
on My PC where i have created the application , everything run fine.
now , i want to install and run my application on another PC where Visual studio is not installed .
Except my application , what other packages should i install on other pc to run my application.
Thank you !
|
|
|
|
|
you will more than likely need to make sure that the 4.0 framework is installed and also the crystal reports runtime
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Thank you !
But can you give me some link where to download these packages ?
Thank You !
|
|
|
|
|
|
I want to integrate an "old DLL" in which a function is called, in which I must pass two structures ByRef. The functions and structures:
<System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, CharSet:=System.Runtime.InteropServices.CharSet.Ansi, Pack:=1)> _
Public Structure BitRec
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=20)> Public iBit() As Integer
Public iState As Integer
Public iTime As Integer
End Structure
<System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, CharSet:=System.Runtime.InteropServices.CharSet.[Ansi], Pack:=1)> _
Public Structure MixCalcRec
Public dLeistung As Double
Public dTemp1 As Double
Public dEinlauf As Double
Public dAuslauf As Double
Public dStempelWeg As Double
Public dDrehzahl As Double
End Structure
<System.Runtime.InteropServices.DllImportAttribute("DPCALC", EntryPoint:="_CalcMixData@28", CallingConvention:=System.Runtime.InteropServices.CallingConvention.StdCall)> _
Public Shared Function CalcMixDataDLL(ByRef AnalogData As MixCalcRec, ByVal iArraySize As Integer, ByRef BitArray As BitRec, ByVal iBitSize As Integer, ByVal iMode As Integer, ByVal dbDistance As Double) As Integer
End Function
Public Function CalcMixData(ByRef AnalogData As MixCalcRec, ByVal iArraySize As Integer, ByRef BitArray As BitRec, ByVal iBitSize As Integer, ByVal iMode As Integer, ByVal dbDistance As Double) As Integer
Dim ireturn As Integer = 0
Dim iSizeOfOneStruct1 As Integer = Marshal.SizeOf(GetType(MixCalcRec))
Dim iTotalSize1 As Integer = iSizeOfOneStruct1 * iArraySize
Dim pUnmanagedAnalogDaten As IntPtr = Marshal.AllocCoTaskMem(iTotalSize1)
Marshal.StructureToPtr(AnalogData, pUnmanagedAnalogDaten, False)
Dim iSizeOfOneStruct2 As Integer = Marshal.SizeOf(GetType(BitRec))
Dim iTotalSize2 As Integer = iSizeOfOneStruct2 * iBitSize
Dim pUnmanagedBitDaten As IntPtr = Marshal.AllocCoTaskMem(iTotalSize2)
Marshal.StructureToPtr(BitArray, pUnmanagedBitDaten, False)
ireturn = CalcMixDataDLL(pUnmanagedAnalogDaten, iArraySize, pUnmanagedBitDaten, iBitSize, iMode, dbDistance)
Marshal.FreeCoTaskMem(pUnmanagedAnalogDaten)
Marshal.FreeCoTaskMem(pUnmanagedBitDaten)
CalcMixData = ireturn
End Function
After calling the Function in the DLL wrapper i get an error that I attempted to read or write in protected memory. Can someone help me with that? What am I doing wrong? I think the structures and the DLL declaration are OK. I guess something's wrong in the DLL wrapper.
Thanks for your help.
|
|
|
|
|
Hi guys, I have a question...
I created an Image TIF Viewer and its working fine (Zooming, Move Up Down Left Right, Rotate, Next and Previous Page).
This image viewer is not that high level app cause I just use Panel and Picturebox in it. The problem is I can't run this program to a lower version of windows so I decided to use Visual Basic 6. The problem is some of the datatypes is new to me, I just found them in the Internet.
This is the part that I don't know how to convert it in VB6
I use this code to view the multi-tiff image
Dim objGuid As Guid = (objImage.FrameDimensionsList(0))
Dim objDimension As System.Drawing.Imaging.FrameDimension = New System.Drawing.Imaging.FrameDimension(objGuid)
imgTotalPage = objImage.GetFrameCount(objDimension)
objImage.SelectActiveFrame(objDimension, imgPage)
the Guid and this System.Drawing.Imaging.FrameDimension , is there a same type of this in VB6?
Any answer/reply/comment is appreciated.
Thanks in advance...
modified 9-Feb-12 5:38am.
|
|
|
|
|
Easy. Don't
VB6 to vb.net ==>logic
vb.net to vb6 ==> very wrong choice
there must be another reason why your program won't work.
Is the framework that you use installed on that other computer.
Jan
|
|
|
|
|
It will be Difficult to impossible to rollback code to previous versions of Visual basic especially from the .net framework to version 6.
If you are adamant on using VB6 then I would look at 3rd party controls to do what you are after.
Sorry but that is my 2 cents on the subject.
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
There is no direct conversion for the code you posted. You'd have to write your own libraries to duplicate the functionality provided.
Considering you want (for some very bad reason) to use VB6, I'd suggest using a 3rd party control for this, IF you can even find one any more.
Windows 8 will NOT have VB6 runtime support, so I suggest you rethink what you want to support. in the way of Windows versions.
|
|
|
|
|
Actually I created the program to remove the use of third party.
The reason is, you must buy the license.
If that's the case, I'll try to find an another way...
|
|
|
|
|
System.Drawing.Imaging.FrameDimension existed already in .NET 1.1 - hence you can use it from Windows 2000. But you will need a very old version of Visual Studio to create a program targeted to framework version 1.1.
|
|
|
|
|
He's after earlier than that! VB6
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Hi everybody,
I want to populate a datagridview with a generic list(of object), and from different sources I have 2 ways to do so, either
dataGridView1.DataSource = list or (after binding the datagridview to a bindingsource)
Bindingsource1.Datasource = list Unfortunately both ways won't work for me, and I wonder why. Either way I tried, I refreshed the datagridview afterwards and also controlled that the list was definitely populated.
Does anyone have an idea what might be wrong in my approach?
Thank you
Mick
|
|
|
|
|
I know of two ways to get a DGV automatically display a collection of data:
1.
stuff the data in a DataTable, then simply establish a binding between DT and DGV. Once the DT is fully populated, the DGV columns, their HeaderText, Width, etc are all set automatically.
2.
or have a collection of some type (not: object) with a number of public properties, then give the DGV a number of columns and bind each column to a property of the type in the collection, using DataGridViewColumn.DataPropertyName[^]
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
Hi Luc,
thank you for your hints . I tried both ways, and after a little bit of fiddling I could make either way work. On the way I found an interesting piece of code (how to convert a generic list into a datatable[^]), which might also be interesting for others.
Have a nice weekend, regards
Mick
|
|
|
|
|
you're welcome.
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
The class that is in the list, is it using public variables i.e.
public class foobar
public id as integer = 0
public name as string = string.empty
end class
if so I dont know why it does it but that always leaves the gridview empty until your define properties e.g.
public class foobar
private _id as integer = 0
private _name as string = string.empty
public property ID as integer
end property
public property Name as string
end property
end class
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Data binding uses reflection, it looks for properties with the specified names.
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
Thanks Luc
Thats my something learnt for today now I'm off to make snow angels
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Thank you, Simon - this was exactly one of my basic errors! After defining properties instead of the fields in the class, everything worked out.
Have a nice weekend with a lot of snow angels and , regards
Mick
|
|
|
|
|
Your welcome Michael and have a good weekend yourself
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
hi, i'm trying to do a looping like this,
if i input 5 then,
1
121
12321
1234321
123454321
1234321
12321
121
1
my teacher code structure is like below,
confuse level : 99999
for (loop the row)
select case
case 1
for
if
end if
next
case 2
if
end if
end case
next
what i do,
Private Sub btnView1_Click(sender As System.Object, e As System.EventArgs) Handles btnView1.Click
Dim input As Integer = Nothing
Dim spaces As String = Nothing
Dim numbers As String = Nothing
'##INPUT
input = CInt(InputBox("Insert Max Value", "Value"))
For a As Integer = 1 To (input * 2) - 1
'##SPACES
If a <= input Then
For b As Integer = 1 To (input - a)
spaces += " "
Next
Else
For b As Integer = 1 To (a - input)
spaces += " "
Next
End If
'##NUMBERS
If a <= input Then
For c As Integer = 1 To a
numbers += c.ToString()
Next
Else
For c As Integer = 1 To ???
numbers += c.ToString()
Next
End If
'##OUTPUT
ListBox1.Items.Add(spaces + numbers)
spaces = ""
numbers = ""
Next
End Sub
can someone correct '???' in my code?
thanks before..
modified 7-Feb-12 22:14pm.
|
|
|
|
|
Are you getting an error, or is the output not what you expect ?
My advice is free, and you may get what you paid for.
|
|
|
|
|
??? = a step -1
but that will only give you half of the diamond
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
I try this in vb6 and it really a nice code
Private Sub Command1_Click()
List1.Clear
Dim inp As Integer
Dim spaces As String
Dim numbers As String
inp = CInt(InputBox("Insert Max Value", "Value"))
Dim a As Integer
Dim b As Integer
Dim c As Integer
For a = 1 To (inp * 2) - 1
If a <= inp Then
For b = 1 To (inp - a)
spaces = spaces + " "
Next
Else
For b = 1 To (a - inp)
spaces = spaces + " "
Next
End If
If a <= inp Then
For c = 1 To a
numbers = numbers & c
Next
Else
For c = 1 To (inp * 2) - a
numbers = numbers & c
Next
End If
List1.AddItem spaces + numbers
spaces = ""
numbers = ""
Next
End Sub
|
|
|
|