|
Hello all,
I'm new to this forum site,I found a problem here with my vb program. I need found multiple field of data for 1 main id. Can I put a button to a vb6 grid? My idea is if I click that button,then it will linkup another vb6 grid to show the data that using the same id.
Example such as this: Student A take 3 subject for this semesterin Uni,so the subject column of this student row will be a button. So when I click the button it will expand a new grid from the column so we can see the subject took y the student.
Hope someone can give me ome guidelines for this problem or any sample reference for this using VB6 codes? I have read some sample or VB.NET but not VB6.
Thanks for reading and hope someone might give me some idea/solution. Thank you~!
Regards
JACSON
|
|
|
|
|
First, VB6 is dead. It has not been supported by Microsoft for some time now, and the runtime will not be supported by Windows 7. Support for VB6 by the community and third party controls is also waning. If this is new developement, I highly suggest abandoning VB6 and moving to VB.NET.
Google results for "vb6 add button to msflexgrid[^]".
|
|
|
|
|
Actually its not a toally new system. i am trying to improve the system by adding in the button into one of the grid so easier to display for the user to check it. Anyone can give me any idea about this?
Thanks for reading~!
|
|
|
|
|
Why do you want to add a button? Why not trap a mouse click anywhere on the row and display the next row?
|
|
|
|
|
Hi i have a datagrid which has textbox with calendar icon image when i click the calendar and select a date the date should display
and the code which i wrote for it is:
but its not working i dono why?Can anyone help me how to modify the code and make it work
my source html for datagrid text box is:
<asp:TemplateColumn HeaderText="Start Date">
<ItemTemplate>
<asp:textbox id="txtFStart" runat="server" Width="80px"></asp:textbox>
<asp:ImageButton id="imgDate" runat="server" ImageUrl="Images/calendar.gif" Height="18px"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateColumn>
and the code behind page i have written as:
Dim imgDate As ImageButton
Dim txtStart As TextBox
Dim strtxtboxID As String
If e.Item.ItemType = ListItemType.SelectedItem Then
txtStart = DirectCast(e.Item.FindControl("txtDate"), Web.UI.WebControls.TextBox)
strtxtboxID = txtStart.ClientID
imgDate = DirectCast(e.Item.FindControl("imgDate"), Web.UI.WebControls.ImageButton)
imgDate.Attributes.Add("OnClick", "Javascript:window.open('Calendar.aspx?textbox=" + strtxtboxID + "','Calendar_window','width=200,height=180,left=315,top=500');")
End If
|
|
|
|
|
Post this in the ASP.NET Forum. It has little to do with VB.NET.
|
|
|
|
|
This is probably really simple, but I'm not sure how to do it, and didn't see an answer when I searched the VB.NET message board here, so gonna ask.
In VB.NET, how do I get the windows login name of the person logged onto the computer.
|
|
|
|
|
Environment.UserName
|
|
|
|
|
Damn! Beat me to it!
|
|
|
|
|
Sorry. Other opportunities will arise though.
|
|
|
|
|
Environment.UserName gives you the account name that started the current thread.
|
|
|
|
|
Dave Kreskowiak wrote: the account name that started the current thread.
Strange way of putting it.
MSDN states "... gets the user name of the person who is currently logged on to the Windows operating system."
I see no way to change my account name while my process is running and possibly creating new threads,
so I assume your statement is correct.
|
|
|
|
|
Luc Pattyn wrote: the account name that started the current thread.
Strange way of putting it.
Actually, the .NET 1.0 through 2.0 documentation says exactly that:
Gets the user name of the person who started the current thread.
The .NET 3.0 and above documentation says the user that is currently logged on. Though, I don't think that's entirely accurate considering you can have multiple people logged in at the same time. So, it's got to be the account (security context) the thread is running as.
Luc Pattyn wrote: I see no way to change my account name while my process is running and possibly creating new threads,
so I assume your statement is correct.
Sure you can - impersonation.
|
|
|
|
|
Gee,
I am unfamiliar with impersonation, i.e. I never needed it in my code.
The way I understand it now is the original sentence ("the user name of the person who started the current thread") was correct but not all that clear: a first thread started by person A can start to impersonate person B, then launch a second thread, which would have B as starter, hence both threads would then get different values from Environment.UserName
And the new sentence ("the user that is currently logged on") is not accurate at all, since
1. several people can be logged on at the same time, so which one would it be (I guess the one
that launched the process)
2. it does not reflect the subtleties of the former sentence.
Once more, a lot is hidden behind a simple sentence. IMO when they change the words, they should
explain exactly why they changed them...
Regards,
|
|
|
|
|
Luc Pattyn wrote: Once more, a lot is hidden behind a simple sentence. IMO when they change the words, they should
explain exactly why they changed them...
I agree. I hate that Microsoft tends to "dumb down" the documentation. It misleads the new people comming into the game. I'd like to see full details about the implementation of each method in each class and deeper examples of concepts, such as creating your own data-bound controls. I can do it, but there's just too many newbie's that don't understand how controls work.
|
|
|
|
|
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
|
|
|
|