|
for1206 wrote: Is there any Class for creating Control Selection and Resizing Handles for my controls
No, there isn't. This functionality has to be built into the controls themselves, as well as some additional functionality added to the container you put them in.
You're going to have to extend the existing controls classes (Label, TextBox, ...) to make your own versions that support being moved around at runtime as well as containter controls to add support for drawing handles and resizing.
This is not something that can be explained in a few forum posts. It's rather complex and a bunch of points have to be covered to get basic functionality to work. You can learn more from these articles[^].
|
|
|
|
|
|
hi All
i want to Control the Concurrency in my Vb.net Application that is Connection to a SQl table. this is my thought and am open for suggestion. Firstly i want to Add an bit Field in my table and named it "Locked" e.g
Customer
+++++++++++++++++++++++++++++
pk_ID | Cname | Lastname | Locked |
+++++++++++++++++++++++++++++
if its "1" in the Locked field then its locked. So i want to have a Function in my DAL that returns a dataset, but when selecting records it should exclude those are not null in the "Locked" field, that means we don't select records that use locked. In my system we don't select Data for only viewing the, i was gonna create another object for Reader, but it was unnecessary. So when the user selects the records that are not locked, i want to have a Function that will locked those that are selected, so that another user cannot select them.
After the user has Finish with the Updating then the Lock is released , by setting the records that has been "locked" to Null.
My Question is this the good way to handle Concurrency ?
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
What happens if there is a crash while the user is editing a record? What happens if one user opens a record and then goes off and leaves it for a couple of hours?
|
|
|
|
|
hi Paddy
you are right, but now,my users share data amongst themselves, so if one open the record and go without releasing the lock, it wont be a Problem , because him alone can work on that record. the is a rule, and the Rule is that every should log off the system at the end of the day, and all the Lock will be released. if it crashes i will roll back the data and unlock them manualy.
please give more Suggestion.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswa wrote: i want to Control the Concurrency in my Vb.net Application that is Connection to a SQl table.
Then you're going to have to understand what concurrency really means. It isn't solved by locking records like this.
How you handle concurrency issues depends on your business rules. There is no single hard and fast strategy that works in all situations. Since I can't get to MS's Pattern & Practices site (there's a design guide that explains a bunch of this - I think it's call the .NET Data Access Architecture Guide), this[^] is about the best I can do right now.
|
|
|
|
|
Hi,
I am having MSFlexgrid with some contents from backend. In it at the last column at every row i need to add a checkbox over it. I tried with the following code. Its not throwing error. But i cannot see the checkbox. Please help me. And also i need to write a code when the checkboxes are select and click button it should do some things like "Accept" in backend.
Please help me. Its urgent.
MSFlexGrid1.Rows = rs.RecordCount
MSFlexGrid1.Cols = rs.Fields.Count + 1
Dim i, j As Integer
For i = 0 To rs.RecordCount - 1
For j = 0 To rs.Fields.Count - 1
MSFlexGrid1.TextMatrix(i, j) = rs.Fields(j).Value
If j = rs.Fields.Count - 1 Then
Load Check1(i + 1)
MSFlexGrid1.Row = i
MSFlexGrid1.Col = j + 1
Check1(i + 1).Left = MSFlexGrid1.CellLeft + MSFlexGrid1.Left
Check1(i + 1).Top = MSFlexGrid1.CellTop + MSFlexGrid1.Top
'Check1(n).Width = MSFlexGrid1.CellWidth
'check1(n).Height=
Check1(i + 1).Caption = "check1(" & i & ")"
Check1(i + 1).Visible = True
End If
Next j
Next i
Thanks in Advance,
Regards,
|
|
|
|
|
You can't see them because you haven't put the checkbox's IN the cells, you've put them WHERE the cells show up. ALl of your checkboxes are most likely sitting behind the grid instead of on top of it.
I have no idea how to do this since I haven't used VB6 and the MSFlexGrid in about 7 years. But, a quick 5 second Google for "vb6 checkbox in msflexgrid" comes up with these items[^].
|
|
|
|
|
Good Morning All and happy new year,
Am trying to avoid using a Wizard, am going code wise all the way. well the following was very easy when using a wizard ,but now doing database work with a wizard has ts Problems. i have written a function that return a dataset and takes a string parameter. Here is the code.
Public Function Get_Data_Straight(ByVal strNumkey As String) As DataSet
Dim con As SqlConnection
Dim strSQl As String = "SELECT Primary_ID, Boundary_area, Attrib_Code, Lis_Key, Func_Key, Actual_Extent, Improved_Value, Site_Value, Purchase_price, Purchase_date, prop_id, confidence_score, fin_ls_prediction, new_lis_key, new_func_key, Tshwane_Prediction, matchflag, source, flagtype, Locked FROM Property_mass WHERE (SUBSTRING(Lis_Key, 1, 4) = @Lis_key) AND (Locked IS NULL)"
Dim constr As String = "user id=sde;Password=XXXXX;Server=XXXXXXXXX;persist security info=False;initial catalog=Tshwane_Valuations_Train"
Dim cmd As SqlCommand
Dim cmb As SqlCommandBuilder
Dim da As SqlDataAdapter
Dim ds As DataSet
Try
ds = New DataSet
con = New SqlConnection(constr)
con.Open()
'Inituializing the Connection Object
cmd = New SqlCommand(strSQl)
'Telling the connection object where is the Database
cmd.Connection = con
'Initializing the adapter
da = New SqlDataAdapter
da.SelectCommand.Parameters.Add("@Lis_key", strNumkey)
' da.SelectCommand.Parameters.Add(New SqlParameter("@Lis_Key", strNumkey))
'we tell the adapter which object we are using
da.SelectCommand = cmd
da.Fill(ds, "Property_Mass")
Catch ex As SqlClient.SqlException
MsgBox(ex.Message)
End Try
Return ds
End Function
from the Above code i get the Following Error
An unhandled exception of type 'System.NullReferenceException' occurred in propdal.dll
Additional information: Object reference not set to an instance of an object.
And its pointing to this line
da.SelectCommand.Parameters.Add("@Lis_key", strNumkey)
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswa wrote: da.SelectCommand = cmd
You do this after you try to add the param. Seems like the selectcommand is null.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks man,the code is
da.SelectCommand = cmd
da.SelectCommand.Parameters.Add("@Lis_key", strNumkey)
Thanks man, its working you are Star.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
The trick in future is to create a breakpoint on the line that blows up, and step through it. Type da into the watch window, if it has a value, check if the SelectCommand has a value, and so on. Then when you know which one is null, you can fix it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you very much , i will sure do that.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi ,
I have to take backup and Restore in VB.net2003(frame work 1) and SQL Srver 2000. But I have no any coding in backup and retore. please send me backup and restore codingin VB.Net2003 frame work1 and SQL Server 2000.
_Vaani_
|
|
|
|
|
hi
There is one thing that i see you dont like doing,you dont research before you search, and you will never learn if you do that. you must Google before you post questions in the forum. Do you understand that?
here is your answer
http://www.aspfree.com/c/a/VB.NET/Simple-BackupRestore-Utility-With-SQLDMO-Using-VBNET/4/[^]
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
hi guys
in order to prevent from security like issues i am creting my exe using thinstall and it is working correctly from any system in my intrantet under partial trusted mode, it seems fine
but is there any drawback or bug regarding this method i want to know ?
thanks in advance
hello
|
|
|
|
|
can anyone point out to me why when handling the click events, if I change the borderstyle of the picturebox on Click then the DoubleClick even never gets handled?
When the borderstyle is changed the image disappears from the picturebox for a half a second. Is there something I should be doing to avoid this and could this be why it's not being handled?
Thanks in advance.
|
|
|
|
|
None of the issues mentioned is being replicated with VS 2005. Double click event is working fine as well as image is being displayed correctly, however you will get a small flicker when you change the border style.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Yeh - I'm not sure why it wasn't handling the DoubleClick. I had in the Click that it would get the image from the file again and the ones I was testing with were HUGE so I think that was stuffing it up a bit, but it still doesn't explain why the DoubleClick wasn't getting handled. I am using VS 2005, and now I have both being handled.
Thanks for getting back to me and my issue is now sorted... somehow LOL
Cheers
Russell
|
|
|
|
|
Hi,
I have a .NET web service which exposes a web method named "GetConfigurationItem". This web method returns an object of custom class. Here is definition of class:
class ConfigValue
{
String Name;
String Value;
}
Now the problem is when I call another web method which return a string there are no issues. But when I call the above method by capturing the return value in VB genreic data type 'Object' it throws an error "Invalid Procedure call or argument". I also tried by creating a similar class in VB client and then capturing the value in that object but in this case error is "Type Mismatch".
Could anybody please let me know where I am wrong> or is there any other way I can access such web methods.
Thanks in anticipation.
|
|
|
|
|
All a web service sends and recieves is XML, I imagine the ability to send/recieve a class is a non standard thing that .NET does, through .NET serialisation. So, an alternative may be to return a string which has your two values with a delimiter.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I want to create some flow charting in VB. I do not have Visio and will likely want the ability to distribute my project. What are my options? Am I forced to purchase a 3rd party component? If so, can anyone recommend one?
Thanks
EM
|
|
|
|
|
Depends on your skill level. You could write your own library to do it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Always happy to take the plunge but might be limited to time. As such, would want something flawless - quickly. I was also wondering if you could use a flowlayout panel or the more advanced layout panel and just use buttons - but assuming that I will still need to connect the buttons with the appropriate directional flow arrows.
Thanks
EM
|
|
|
|
|
I'm using Wizard generated controls in a database project.
I have a dataset, bindingsource, and table adapter. There is a datagrid bound to the binding source.
I'm trying to call RemoveAt() on the binding source, but it throws an error indicating that the list is
FixedSize and cannot be modified. How do I fix this?
Thanks in advance.
|
|
|
|