|
I mistook the term "Forms 2.0" for the .NET version.
Microsoft has an Interop Toolkit, which can be used to easily integrate forms from VB.NET in VB6 applications. That gives the option to use .NET to add new functionality to an old VB6 executable.
Not an answer to your question, but perhaps an option nonetheless.
|
|
|
|
|
Okey i thought you where talking about that...
I really need an answer for this question...
|
|
|
|
|
While using vb6 u can use resource file for multi language support
|
|
|
|
|
Could you be more specific?
Witch resource file?
|
|
|
|
|
my understanding is you want to give caption of control on ur forms in different languages, in vb addons there is an option to add resource file to ur project, just add resource file, in its text area add captions in different language, then programaticaly u can get captions of controls from resource file. for input text boxes you change their fonts to related language
|
|
|
|
|
The captions of my buttons/textboxes ect. are filled from a database, I cannot convert this to the usage of resource files cause of the functionallity of the program. I already tried changing the fonts and the charset property of the fonts but that didn't work as well.
|
|
|
|
|
this is the point where you are making the mistake, dont use database for captions, instead of database use resource file, please find example regarding using resource file in project, see msdn samples, there u find a sample using resource file, it is solution of ur problen coz it is also made for mulitlanguage support, if u cant file this sample i can mail u or tell u its exact name,
|
|
|
|
|
I'm sorry, but the usage of resource files is really not an option for me.
The application that i'm programming makes use of a database witch is also used by a remote application where you can dynamically update the captions(like an update server). I could use the resource file as a shadow for the database but that would mean reprogramming the hole application into the usage of resource files. And making a interfase for the shadown resource files and the database itself. This simply is too much work (application source is more than 65 mb).
|
|
|
|
|
This[^] resource might help you.
|
|
|
|
|
Thank you for your link, i've seen it before. Maybe it's me, but i cannot read a solution for my problem on this page, although the title of this webpage refers to my problem.
|
|
|
|
|
That site contains controls and code that you can purchase to use in your projects...
|
|
|
|
|
I have a similar project that currently use resource string. I need to support Arabic at run time. I got the same problem with switching languages in the control panel otherwise it will display ????
Have you found your solution? Please share. I'd move to database for the string table if I have to.
|
|
|
|
|
hi all,
how can i check whether any folder contains the permission for write ?
Please suggest.
|
|
|
|
|
Try this code.
This code set the permission. may be this Helps you.
Function SetPermissions()
Dim strHomeFolder, strHome, strUser
Dim intRunError, objShell, objFSO
strHomeFolder = "C:\Test"
objShell = CreateObject("Wscript.Shell")
objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(strHomeFolder) Then
intRunError = objShell.Run("%COMSPEC% /c Echo Y| cacls " & strHomeFolder & " /t /c /g everyone:F ", 2, True)
If intRunError <> 0 Then
Wscript.Echo("Error assigning permissions for user " _
& strUser & " to home folder " & strHomeFolder)
End If
End If
End Function
Thanks
Khatri Mitesh
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
|
|
|
|
|
I am writing a code where I need to construct a chain of points. I have the code in C, but for my limitations in this language I am trying to convert it to VB.NET. The problem is:
My main class is
public class Point
public x as double
public y as double
public shrared pl, pr as new point() 'previous and next point
End class
My goal is to be able to access the evolution of the point. So, I need this type of declaration
...
dim p0 the new Point()
...
p0.pr.x = 2
p0.pr.y = 4
...
What's happening is that when I that when I set p0.pr.x = 2 or p0.pr.y = 4 (or another property of pl or pr) all the values of x and y are changed. That is, p0.pr.pr.pr.pr...pr.x = 2 and p0.pr.pr.pr.pr...pr.y = 4. That should not happen. Can you tell me how to change the value of a variable only at a level of p?
Sorry but my english is terrible!!!
Thanks in advance
Wilson
|
|
|
|
|
wilson_borda wrote: What's happening is that when I that when I set p0.pr.x = 2 or p0.pr.y = 4 (or another property of pl or pr) all the values of x and y are changed.
No, that's not what's happening. What's happening is that the single instance that you reference with the static variable changes. Regardless of how many Point instances you create, they all share a single pl and a single pr instance.
If you are trying to create a linked list, the pl and pr variables can't be static. However, if you change them to be member variables, you can't create new instances of them in the constructor or you will create an eternal loop that fills the memory with Point objects.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks for reply. You are correct. I try to change to member variables and a exception occurs... I can't solve this problem. But you are right, the pl and pr variables can not be static...
|
|
|
|
|
If I unserstand correctly you wish to store a list of Points so you could have something list this :-
Public Class PointHistory
Private _myPoints As List(Of System.Drawing.Point)
Public ReadOnly Property Count()
Get
Return _myPoints.Count
End Get
End Property
Public ReadOnly Property Point(ByVal Index As Integer) As System.Drawing.Point
Get
Return _myPoints(Index)
End Get
End Property
Public ReadOnly Property CurrentPoint() As System.Drawing.Point
Get
Return _myPoints(Count)
End Get
End Property
Public Sub Add(ByVal NewPoint As System.Drawing.Point)
_myPoints.Add(NewPoint)
End Sub
End Class
wilson_borda wrote: Sorry but my english is terrible!!!
Never applogies for trying.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Thanks... My class "point" don't refers to drawing.point. My second choice is use a List or Collection implementation. Now I try to do this. But, in some parts of my code (not showed in the previous msg) is very dificult use List instead of a structure like my class...
|
|
|
|
|
Is the modified class below, more like what you are after?
Public Class PointHistory
Public Structure Point
Dim x As Int32
Dim y As Int32
End Structure
Private _myPoints As List(Of Point)
Public ReadOnly Property Count()
Get
Return _myPoints.Count
End Get
End Property
Public ReadOnly Property Point(ByVal Index As Integer) As Point
GetReturn _myPoints(Index)
End Get
End Property
Public ReadOnly Property CurrentPoint() As Point
Get
Return _myPoints(Count)
End Get
End Property
Public Sub Add(ByVal NewPoint As Point)
_myPoints.Add(NewPoint)
End Sub
Public Sub Add(ByVal x As Int32, ByVal y As Int32)
Dim newPoint as Point
newPoint.x = x
newPoint.y = y
_myPoints.Add(newPoint)
End Sub
End Class
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Yes, this is the idea. However, I have to modify my code because class "PointHistory" don't have recursive property like (a class inside the same class):
public class point
dim x,y as double
dim pl,pr as point
end class
I call like this
dim p0 as new point
p0.pl.pl...x=...
Now I use
dim hist as new pointhistory
... initialize hist (add points)
dim p0 as new pointhistory.point
p0=hist.pont(index)
....
Thanks again...
|
|
|
|
|
wilson_borda wrote: dim p0 as new pointhistory.point
p0=hist.pont(index)
Don't use the new keyword when you only want to declare a reference, as that will create an instance of the class. As you assign a new instance to the reference in the next line, the newly created instance will just be thrown away.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Public Class Point
Public x as Double
Public y as Double
End Class
Dim pts as new LinkedList(Of Point)
If you are converting the code, use all the features of your new platform. I'd even argue that you should use the PointF struct provided by the framework. I'm messing around writing game engines at the moment, and theres nothing more annoying than every damn library having their own version of Vector3 and Matrix.
|
|
|
|
|
Hi,
I am getting out of memory exception when I run my project Build. While resizing the forms and minimize/maximize the forms I am getting the Out of memory exception and sometimes application terminationg also.
As per my observation this error is coming when I am working with many open applications and long time continuously.
Will it be a code problem or any application or build settings we need to set?
Please let us know. This is very urgent for us very impartent.
Thanks in Advance,
AR Reddy
|
|
|
|
|
I was getting the same thing here using VS2008. We upped the RAM to 3 Gig in the box I'm using, and I only build when most code and design screens are closed, and never with any Crystal Reports open in the IDE.
Good Luck!
--------------------------------------------------------
Knowledge is knowing that the tomato is a fruit.
Wisdom is not putting it in fruit salad!!
|
|
|
|