|
Are you looking for:
DataGrid1.DataSource = Dat_Arr
You'd much better off moving your data to a DataTable object. You'll get alot more flexibility.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Cheers Dave, I'll try this read up on datatables too.
DPF
|
|
|
|
|
hi everybody
does anbody know how can i send fax via vb .net?
any free components or something?
tank you guys so much
|
|
|
|
|
You can user winfax services and winfax assemble to develop a simple fax application
|
|
|
|
|
Hello
I've got two DataGrids, both with a scrollbar. Now I will that datagrid2 automatically scroll with the datagrid1. You can see this effect in word, when two documents are open on the same window...
I've not found any possiblity to set the scrollbar position
Any idea?
Greetings from switzerland,
BuddelWilli
|
|
|
|
|
Ok, I've got the solution:
'http://www.sys-con.com/dotnet/article.cfm?id=454
|
|
|
|
|
Hi all of you
I am student , and our supervisor ask us to make a short course registration system, but i couldn't do the following
(The user is allowed to attempt to log-in to course database a maximum of 3 times in a session. If they fail to log in after 3 attempts, they are prevented from logging into the session from this or any other terminal.
If the user-id is not recognized at all, the terminal is frozen for 5 minutes.
If the user-id is recognized but the password isn't, the student record is 'locked' for the full session.
In either type of log-in failure, the attempt is logged on a fault logging database. If the log-in is successful the student is added to the session's attendance list.
If the login is successful, the student's attendance record for the whole course is updated).
plz, i need your help because i am vb.net beginner
thankx
|
|
|
|
|
hello sara, there r many problems but there have easy way to solve it, i mean there have now good database management systems like oracle 9i,so programmers no need to waist there time to make above things,that above your question covers the ORACLE 9i database system very easily,only need to put values,if u can find the oracle 9i database administrator fundamental 1 book u ll meet the 14 th chapter,its easy to understand
|
|
|
|
|
Dear rajith2005,
Thank you very much for your suggestion, but the supervisor ask us to do it using ado.net and vb.net , i want to use sql server as database, but really i don't know how to lock and unlock recorde, or what does mean by the terminal is frozen for 5 minutes.
thank you
|
|
|
|
|
dear sara, u welcome
ik now wht u mean,bt i just get oracle to do it,cuz me doin OCA these days ,its easy .i dnt know much abt VB.NET even,bt i try to help u,ill ask it my friend,bye
|
|
|
|
|
hi
its might not be a good solution but might help.
what u have to do is add a field in the USER_INFO_TABLE named ACCOUNT_STATUS and have a variable in the form LOGIN_TRY. set the LOGIN_TRY to zero on form load event and on every fail attempt add one to it. when LOGIN_TRY=3 then set the ACCOUNT_STATUS to Disable and close the form.
when ever the form is load its should checked the status of ACCOUNT_STATUS and if it is ok let the user try to login else reject it.
to do the second thing have a Variable (Above Variable can also be used if coded carefully.) and set it values to zero on form load event then when invalid id is enter increment its value. when its has a value of 3 enable a timer with value set to five mins and disable all the control on the form so its forzen (what i understand the application will be runing in full screen mode). in timer event(didn't remember what has been a while sine i coded in VB.net might be tick or somethinglike that) enable the form controls and disable the timer after five mins the event will fire and its was start inputing again.
ur thirds problem is autoslove when u do the first thing.
hopefully it will work.
Allah Hafiz
Computer... Programming... What That
|
|
|
|
|
Dear Bad Sector,
Thank you very much
I will try it now
best regards
|
|
|
|
|
OK, I'm working on a project and I have come stuck on one important feature of my application. A brief backgroud is that this is a trading application, my problem/question comes when I try replace the MS FlexGrid with the DataGrid. I am trying to acheive the same effect with this function using the datagrid, but I just cant seem to get it work correctly, here are the methods:
'================================================================================
' Public Methods
' ===============================================================================
'--------------------------------------------------------------------------------
' Adds the market depth row to the book
'--------------------------------------------------------------------------------
Public Sub updateMktDepth(ByVal tickerId As Integer, ByVal rowId As Long, ByVal marketMaker As String, _
ByVal operation As Long, ByVal side As Long, ByVal price As Double, ByVal size As Long)
Dim bookentry As String
bookentry = marketMaker & vbTab & price & vbTab & size & vbTab & "0.0" & vbTab & "0"
If operation = OPERATION_INSERT Then
If side = BID Then
grdBidBookEntries.AddItem bookentry, rowId + 1
Else
grdAskBookEntries.AddItem bookentry, rowId + 1
End If
ElseIf operation = OPERATION_UPDATE Then
If side = BID Then
grdBidBookEntries.RemoveItem rowId + 1
grdBidBookEntries.AddItem bookentry, rowId + 1
Else
grdAskBookEntries.RemoveItem rowId + 1
grdAskBookEntries.AddItem bookentry, rowId + 1
End If
ElseIf operation = OPERATION_DELETE Then
If side = BID Then
grdBidBookEntries.RemoveItem rowId + 1
Else
grdAskBookEntries.RemoveItem rowId + 1
End If
End If
' recalc the average cost and cumulative size
Call UpdateLists
End Sub
________________________________
'--------------------------------------------------------------------------------
' Flush the deep book
'--------------------------------------------------------------------------------
Private Sub Form_Load()
Dim bookentry As String
' flush the book entries and add the column headers
grdAskBookEntries.Clear
grdBidBookEntries.Clear
bookentry = "MM" & vbTab & "Price" & vbTab & "Size" & vbTab & "cumSize" & vbTab & "avgPrice"
grdAskBookEntries.AddItem bookentry
grdBidBookEntries.AddItem bookentry
End Sub
Private Sub UpdateList(ByVal lstBookEntries As MSFlexGrid)
' need to recalc the cum
Dim val As String
Dim size As Integer, cumSize As Integer
Dim price As Double, totalPrice As Double
Dim iLoop As Integer, jLoop As Integer
For iLoop = 1 To lstBookEntries.Rows - 1
'Calculate the cumulative size & average price
cumSize = 0
totalPrice = 0
For jLoop = 1 To iLoop
lstBookEntries.row = jLoop
lstBookEntries.Col = 1
price = lstBookEntries.Text
lstBookEntries.Col = 2
size = lstBookEntries.Text
cumSize = cumSize + size
totalPrice = totalPrice + (price * size)
Next jLoop
lstBookEntries.row = iLoop
lstBookEntries.Col = 3
lstBookEntries.Text = cumSize
lstBookEntries.Col = 4
lstBookEntries.Text = Round((totalPrice / cumSize), 4)
Next iLoop
End Sub
___________________________________________________
P.S Market Depth just shows the best 10bids and the best10 offers, when I try to implement the same using a datagrid, it does not disply correctly, any suggestions welcomed!
|
|
|
|
|
The ListView and DataGrid controls don't understand Tabs, and there is really no "cell" like in a MSFlexGrid either.
Also, you're keeping your working data inside the control itself. Don't. Keep your working data in seperate arrays, DataTables, hash tables, what have you, and use the controls for visual presentation of that data.
In your case, I would recommend using a DataTable or a set of DataTables in a DataSet. You will then have much more flexibility using the DataGrid to display and edit your data.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the feedback, I have sort of "accidently" come to the same conclusion with the use of the DataGrid!
Regards
|
|
|
|
|
I have a password on my windows form application, and I want it to expire after like 10 minutes of the program being inactive, and force the user to enter it again. Does anyone know how to do this efficiently? I tried a few ways but they all pretty much had a procedure running constantly in the background which kind of slowed stuff down. What do you think would be the most efficient way to do this?
|
|
|
|
|
What kind of procedure - have you tried using a System.Timers.Timer ??
|
|
|
|
|
well yeah, but that's still a problem. I was originally thinking that every 10 minutes i could have the timer fire, and check a boolean variable isIdle or something, and if it's false, then don't reset the PW, and if it's true, then reset the PW. However, that means I would have to trap every user input event: clicks, mouseOvers, keyboard inputs, and that would result in a lot of events and code that's inefficient. Plus, with the decent number of forms that i have it would just take a real long time to insert that code everywhere. is there something else you had in mind when it comes to the timer?
|
|
|
|
|
There's no reall good way to do this. But, check into the Application.Idle event. This fires just before the application is about to, well, go idle. When it fires, setup a Timer for 10 minutes and enable it.
The problem comes in where there is no Application.WakeUp event. So, you'll have to also check into the Application.AddMessageFilter method to add a filter that checks to see if the Timer is running, then looks at the message to see if it is a keyboard or mouse message, and upon seeing one, disables the timer.
In the Timer Tick event, add your code to "reset your password".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm using VS .NET 2003, and I have an application with a bunch of menuItems. When the mouse goes over these menuItems, I want to change the status bar on the bottom to describe what clicking on that item would do. However, the menuItems don't have a mouseOver or mouseHover event associated with them. Anyone know if I'm missing something here, or if I'm not, can anyone help me out with adding this functionality programmatically?
|
|
|
|
|
|
I have a datagrid that you need to scroll to see all the columns. However, the first column identifies what you are looking at, so when the user scrolls I'd like to "freeze" the first column so it does not scroll. Does anybody know of any code that would do this. If not, does anybody have an idea of how to go about enhancing the class to provide this functionality?
Thanks,
Ron
|
|
|
|
|
all,
can anyone tell me how to expose nested classes to consumers via .net webservices?
Thanks
"Opportunity is missed by most people because it is dressed in overalls and looks like work."
- Thomas Edison
|
|
|
|
|
I have a small application, doesn't do much, but I have the main screen that pops up with name mainScreen. When I click on a menu button to show another form, in the click event i have
Dim f as New Upload <--(Upload is the name of the form I'm showing)
f.Owner = Me
Me.Enabled = False
f.Show
Now, when I hit the ok button on the Upload form, I want it to hide, and then manipulate some controls back on the mainScreen form. However, I don't know how to reference it. I can't just say mainScreen.control blah blah, and I can't use Me.Owner to get to the controls either. I tried saying Dim f as New MainScreen blah blah but that doesn't work because that won't reference the mainScreen object that's already open, it creates a new one. How do I do this? I know it's simple but I just can't seem to find the syntax to do it
|
|
|
|
|
|