|
hi all
i want to draw some couple of point into form(or picture box).
sample coordinates for some points are following
PointNo----- X----- Y <br />
1----- 0.4064 ----- 7.4848 <br />
2----- 2.5184 ----- 7.4848 <br />
3----- 6.3904 ----- 7.4144 <br />
4----- 9.5584 ----- 7.344 <br />
5----- 5.44E-02----- 4.176 <br />
6----- 2.8704 ----- 3.8944 <br />
7----- 6.9536 ----- 4.3168 <br />
8----- 9.7696 ----- 3.6128 <br />
9----- 1.1104 ----- 1.2896 <br />
10----- 5.616 ----- 1.0784 <br />
11----- 9.84 ----- 0.8672 <br />
12----- -1.05 ----- 8.603703704 <br />
13----- 2.209259259----- 8.603703704 <br />
14----- 7.994444444----- 8.685185185 <br />
15----- 10.60185185----- 8.603703704 <br />
16----- -1.05 ----- -0.603703704 <br />
17----- 5.142592593----- -0.603703704 <br />
18----- 10.68333333----- -0.359259259 <br />
19----- -3.16347308----- 10.54256687 <br />
20----- 2.377079047----- 10.3067987
Problem is that some value is negative and so small. So how can i draw the point on form which contains negative value.
simply i want to ask that how can i calculate scale for X and Y axis so all of my point is easily visible on form or picture box.
|
|
|
|
|
sunil goyalG wrote: simply i want to ask that how can i calculate scale for X and Y axis so all of my point is easily visible on form or picture box.
It's simple gradeschool math. Get the highest and lowest values in each axis. This gives you the bounds of the graph. Then it's a simple matter of dividing by the available space to get your scaling values. Multiple each point by the scale value and you've got your graph.
|
|
|
|
|
Hi,
am using crystal report in my application.Am binding a stored procedure to populate the data on to the crystal report. These days i used to pass only one parameter to stored procedure and i get the data accordingly. But now i need to pass two discrete parameters, based on which the data has to be populated.
I posted the old code below which i use now. In that i send MONTH(@month) to the stored procedure and i get the corresponding data. but now i want to send both month and year to stored procedure and get the crystal report populated..
Dim crParameterDiscreteValue As ParameterDiscreteValue
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldLocation As ParameterFieldDefinition
Dim crParameterValues As ParameterValues
crParameterFieldDefinitions = rptDocument.DataDefinition.ParameterFields
crParameterFieldLocation = crParameterFieldDefinitions.Item("@month")
crParameterValues = crParameterFieldLocation.CurrentValues
crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
crParameterDiscreteValue.Value = month
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
Please help me out .......
|
|
|
|
|
Hi i want to change listindex of DataGridViewComboBoxCell, it can be changed by assigning value to cell like DataGridView1.Rows(1).Cells(1).Value = 1, but my DataGridViewComboBoxCell is dynamic so it updates runtime also, when it reinitiated its default values got null and it displays blank. because it is reinitiated at runtime so i dont know what could be its default value next time, i want to change it to first item in the list as default value, but DataGridViewComboBoxCell dont allow any change in listindex. can anyone help
|
|
|
|
|
I have no idea what you're trying to get at. Perhaps a simpler explanation would help.
|
|
|
|
|
The basic question is this: How do you set the value of a combobox cell? Example:
At runtime, you create a comboboxcell, and add Yes and No as items.
Now, you want to display the Yes in the cell. No luck. Setting .Value does not help. The Yes does not appear.
|
|
|
|
|
Hello friends,
I am using VB Appliction(let it be X) to load the txt files to SQL server. The application is taking the files from a shared folder. Some other tool(Y) is creating these txt files and placing them in the shared folder.
By chance, a situation happend if both application is running simultaneously. Then my application may getting a chance of loading half created files(creating by Y) to the server.
I dont want to load such files.Want to load it to the server by next time,by that time the files will be fully generated by y.
What i want is want to check last folder update time. If the folder is recently updated(means some files recently added) then dont want to run my application.
So please help me to get the last folder update time. So i can compare it with system time and can decide, whether i want to run my application
Thanks and regards
Jishtih
|
|
|
|
|
What you're asking isn't really reliable. The folder will not change it's Last Modified Time upon a write of a file inside it. It will only do this upon the creation or delete of a file.
You should be inventorying the files in that folder, checking the time the files was created, then giving an appropriate amount of time for the other process to complete before opening those files and processing them.
|
|
|
|
|
Hi,
If you are going to write any code that manipulates files or folders then you need to become familiar with the classes in the System.IO namespace. There aren't many and it won't take you long to browse through the documentation and get an idea of what they do.
In answer to your specific question about folder update time take at look at either System.IO.Directory or System.IO.DirectoryInfo and you will find the answer.
Alan.
|
|
|
|
|
Hi,
I'm currently working on a VB6 project witch has to be able to display texts in different languages(NL/US/FR/RU ect.). The problem as you all know with this is that the text end up looking like "???". To solve this i can set the regional settings in the control panel to the corresponding language. But this means that the computer has to restart every time you setup a different language.
All controls also have a Charset property but if i set those to the right value(for instance 204 for using russian) it doesn't seem to have any effect.
After some searching on the net i found out this is caused by the translation of unicode to ansi in the controls of VB6 (i don't know for sure that i'm using unicode). To solve this you can buy libaries that do this translation for you so the VB6 controls can't mess it up. But i have no money;)
Another solution would be to use Forms 2.0 controls that are able to handle unicode. But then i cannot redistribute my software. And they also didn't work (still showing ???).
After all of this it seems kind of impossible to solve this problem, but i cannot believe there isn't a solution. It does work if i set the regional settings to the right language, can't i do the same thing without using the regional settings? I really need help here.
Greetz, Willem
|
|
|
|
|
willempipi wrote: But then i cannot redistribute my software.
Why not? The .NET runtime is a free download, AFAIK.
|
|
|
|
|
|
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.
|
|
|
|