|
ok, think i found out myself.
thanks anyway.
simply created a new class which inherits from panel, create a public event "scroll", override wndproc, catch WM_VSCROLL and WM_HSCROLL, and raise the scroll event.
|
|
|
|
|
klappklapp wrote: but there is no scroll-event for panels in visual studio 2003!
I didn't notice that you said that in your original post. No, the 2003 version of the Panel doesn't have a Scroll event, you what you did was correct. Create your own version of the Panel, adding support to look for Scroll messages.
|
|
|
|
|
I wonder if anyone can help me with the following problem.
I am trying to update a grid element within a array
e.g.grdGridArea.Item(x - 1, 6) = 50
This element was added in another procedure using InsertAt.
The array is populated no problems until I get to this element where I then get the following error;
Run-time exception thrown : system.data.dataexception.
This is driving me nuts so is there anyone that can tell me how this is happening then fix it
It is properly something simple.
|
|
|
|
|
You've given the exception type, but you failed to tell us what the exception's Message is. Without that, it's pretty difficult to tell you anything useful.
|
|
|
|
|
I am getting an err.number = 5
The problem is when I try and assign a double value to the element I get this err number. Works fine with the others but crashes as above.
Hope this help.
|
|
|
|
|
Got the following error message....
An unhandled exception of type 'System.Data.DataException' occurred in system.data.dll
|
|
|
|
|
None of this is the contents of the Message property of the exception you're getting.
Err is the old VB's error object, that's just about useless. You should NOT be using ON ERROR .... in your VB.NET code. You should be using Try/Catch blocks instead. Comment out the ON ERROR .... lines in your code so you can see a proper exception message.
On top of that, how about posting the code snippet that throws the exception.
|
|
|
|
|
I do not use err or ON ERROR as I use try etc. I just done err hoping for any clues.
For x = 1 To dTotalGridLines
dRate= Val(txtRate.Text)
grdArea.Item(x - 1, 6) = dRate <===== THIS IS WHERE IT CRASHES
dValue1 = Val(grdArea.Item(x - 1, 5)) * Val(txtRate.Text)
grdArea.Item(x - 1, 7) = dValue1 <===== THIS IS WHERE IT CRASHES
Next x
It is a straight forward statement. I reckon it could maybe be when I insertat. Could it be that I am not formatting the element at insertion.
|
|
|
|
|
You still haven't answered my question. What is the exact exception message??
The old Err.Number says that it's an "Invalid procedure call or argument". Since the old meanings are so vague, I can only guess that the column your trying to assign a value to is not a number type or you're trying to assign a floating point value to an integer type column.
|
|
|
|
|
Sorry, I am still a bit rusty with the .Net stuff. I done the following which returned the following. Hope this is what you require.
? ex
{System.Data.DataException}
[System.Data.DataException]: {System.Data.DataException}
HelpLink: Nothing
InnerException: Nothing
Message: "Cannot set Rate."
Source: "System.Data"
StackTrace: " at System.Data.DataRowView.SetColumnValue(DataColumn column, Object value)
at System.Data.DataColumnPropertyDescriptor.SetValue(Object component, Object value)
at System.Windows.Forms.DataGridColumnStyle.SetColumnValueAtRow(CurrencyManager source, Int32 rowNum, Object value)
at System.Windows.Forms.DataGrid.set_Item(Int32 rowIndex, Int32 columnIndex, Object value)
at Valuation.frmPropertyDetails.cmdApply_Click(Object sender, EventArgs e) in C:\Code\NET\project\frmArea.vb:line 4602"
TargetSite: {System.Reflection.RuntimeMethodInfo}
|
|
|
|
|
Sorry, I am still a bit rusty with the .Net stuff. I done the following which returned the following. Hope this is what you require.
? ex
{System.Data.DataException}
[System.Data.DataException]: {System.Data.DataException}
HelpLink: Nothing
InnerException: Nothing
Message: "Cannot set Rate."
Source: "System.Data"
StackTrace: " at System.Data.DataRowView.SetColumnValue(DataColumn column, Object value)
at System.Data.DataColumnPropertyDescriptor.SetValue(Object component, Object value)
at System.Windows.Forms.DataGridColumnStyle.SetColumnValueAtRow(CurrencyManager source, Int32 rowNum, Object value)
at System.Windows.Forms.DataGrid.set_Item(Int32 rowIndex, Int32 columnIndex, Object value)
at Valuation.frmArea.cmdApply_Click(Object sender, EventArgs e) in C:\Code\NET\project\frmArea.vb:line 4602"
TargetSite: {System.Reflection.RuntimeMethodInfo}
|
|
|
|
|
It looks like the Rate column in your dataset is ReadOnly, or the value you passed isn't of the proper type and cannot be converted to the type expected by the Rate column.
|
|
|
|
|
How to create folder ?
How to test exist folder or file(duplicate) ?
VB.Net
|
|
|
|
|
Use System.IO namespace which contains the function to create folder and files in VB.NET
The System.IO.File.FileExist function used to check for an existing file it will return the boolean value.
With Regards
Yogesh Agarwal
|
|
|
|
|
But i would like to know the function which can create folder.
Thank you for your help.
Best Regards,
VB.Net
|
|
|
|
|
try this
System.IO.Directory.CreateDirectory("c:\read the help files")
|
|
|
|
|
hello.. i want to know how to make fingerprint software using vb.net
actually i will focus on fingerprint enhancement and ridge reconstruction only
can anyone help me or maybe just let me know where to find the source
thanks,
faz
|
|
|
|
|
Start at a eLancing website.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
This:
ayie wrote: just let me know where to find the source
is a direct contradiction to this:
ayie wrote: i want to know how to make fingerprint software using vb.net
Noone is just going to hand over that kind of project to you. Since that kind of technology is usually very proprietary and expensive. You're going to have to Google this one yourself. I'd searching for "fingerprint enhancement", or maybe "fingerprint ridge reconstruction algorithms".
I hope you're brushed up on your math skills.
|
|
|
|
|
How can I check whether a specific area (rectangle) on a panel
is blank or not?
I have a panel on which a graph is drawn.
I also want to print text on this graph.
However I do not want my text to interfere with my plot.
Therefore I need to check in advance if the area, where
I want to print my text, is blank or not. If not, I can
move my text so that there is no interference.
scubapro32
|
|
|
|
|
I do not know if there is any short cut but there is a long way but it works..
U will be knowing the back color of ur plot...
Traverse thought the plot and compare the color of all the point with ur plots back color
Plz do let me know if u find some thing which is a better method
Good luck...
|
|
|
|
|
Thanks for your reply...
The 'blank' backcolor of my panel is white.
The plot is black.
But how do I traverse through the plot?
Getpixel does not work with panels!
|
|
|
|
|
A faster method would be to do the math that calculates the largest area available, based on the line graph itself. Going pixel-by-pixel won't do you much good and is a very expensive operation.
Things to consider are what is the total available area in the graph? What is the biggest possible size you want the textarea to be?? Where does the graph intersect that area?
Once the graph passes to the right of the area you want the text in, you can stop looking at resizing the text area.
Basically, you'e calculating the intersection between two lines. Does the line you're drawing for a point on the graph intersect the line that is the bottom of the text area?? If so, then you either have to move the textarea or resize it to fit in the space between where your textarea starts and the intersection of those two lines.
Google for "calculate intersection of two lines" for the math to help you do this.
|
|
|
|
|
Thanks Dave,
but I think mathematics won't do the trick here.
First of all it's not a line graph, but more
a 'random' plot of peaks as seen in an 'chromatogram'.
Therefore a function of the line, and the chromatogram
(sums of near Gaussic functions) is not available.
|
|
|
|
|
Scubapro wrote: but I think mathematics won't do the trick here.
BS. Your drawing code still has to draw something from point A to point B. Whatever that something is, even if it's just a single point, you can still test for an intersection between either a line and a point (which side of the line the point is on), or if the point falls inside the area of the textarea.
|
|
|
|