|
Thanks but here is where I declare that event handler.
Public Event StatusChanged As EventHandler <br />
<br />
Public Property CurrentStatus() As Integer <br />
Get <br />
Return _Status <br />
End Get <br />
Set(ByVal value As Integer) <br />
_Status = value <br />
RaiseEvent StatusChanged(Me, EventArgs.Empty) <br />
End Set <br />
End Property
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
Private WithEvents _ObjectName As Object
So what? You can declare event handlers all you want. Object will still not have an event called StatusChanged .
|
|
|
|
|
You've seen my posts before and should realize that I make my code generic. Object is just generic for the real class, I apologize that I didnt actually make up a name so as not to confuse people since Object is a class.
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
CleaKO wrote: You've seen my posts before and should realize that I make my code generic. Object is just generic for the real class
That's not a good idea when asking questions about your code. Copy and Paste the REAL stuff and it makes solving your problems a whole lot easier.
|
|
|
|
|
Hi,
I'm not sure exactly about your needs... try this plz:
Private WithEvents _ObjectName As New Class2
Private Sub UpdateStatus(ByVal sender As Object, ByVal e As System.EventArgs) Handles _ObjectName.StatusChanged
'Code to run here
End Sub
hope this helps
|
|
|
|
|
You're solution was very close, actually you cant set the New value in the same line but what I was doing differently was that in the other code I was declaring my class object within the WithEvents line and in the new one I was declaring the class and then another class for the event. OOPS!
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
Hi,
If you don't want to instantiate a new object in the declaration line you could do the following:
'-- somewhere in the code
_ObjectName = New Class2
AddHandler _ObjectName.StatusChanged, AddressOf SubRoutineName
hope this helps
|
|
|
|
|
How to move up and down row in gridview (vb.net)
Ashu
|
|
|
|
|
clear what you want to do... another thing, next time make your subject relevant to what you would ask.
|
|
|
|
|
You reposted the same question and got an answer. Why don't you continue this is your first thread and ask Christian what he meant?
|
|
|
|
|
Dave Kreskowiak wrote: reposted the same question and got an answer.
Another one of those "I didn't like the answer I got, so I'll try again" idiots
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Sadly, the computer world abounds with them...
|
|
|
|
|
Hi,
I'm not sure if there is a simpler way, but if you are talking about few rows you could use DataView and its sort property to solve your issue:
- Create a DataView based on a table that has an order column (int)
- Set the Sort property to the order column
- Add two buttons up/down
- When you select a row and click up or down you can change the value of the order column in the rows.
This could work if you are managing a transactions list in an accounting system or any system that deal with few rows, in addition the order column could be added on the fly and not part of the database.
hope this helps
|
|
|
|
|
I have this error : Configuration system failed to initialize when I try to start a program.
I read on google about this but I didn't find a solution for my problem.
please help.
Thanks
|
|
|
|
|
Hi,
What do you have in your app.config file!? What's the type of application that you are working on?
regards,
|
|
|
|
|
thanks for your help but for the moment I resolved this problem.
|
|
|
|
|
|
Hi am quite new to programing and would like to know if you can creat a stand alone Data base using tables without the use of SQL and without attaching the front end to an Access table.
Is this possible?
If so has any one got an idea of where to look for some code that i could look at please.
Thank you
|
|
|
|
|
JonCox wrote: Hi am quite new to programing and would like to know if you can creat a stand alone Data base using tables without the use of SQL and without attaching the front end to an Access table.
You can use a database that doesn't use SQL. Although I'm not sure what you'd achieve by that. Why do you not want to use SQL? (It is the standard language for writing queries)
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Hi there thanks for your reply.
Sorry i was refuring to SQL server. However, my ignorance is apparent, as I do not understand how i would call or instruct an application to use SQL. Also is it a component of visual studio?
Thank you for your time.
|
|
|
|
|
Theres nothing built in that will act as a database for you. You could make something similar using an XML file or some other file based storage, but if your new to programming that might not be the best place to start
The other alternative is using an external database. Do you want something that is small and file based (best suited for when just one app wants a database) or something bigger and memory based (that can handle alot of connections over a network)?
When you say wihtout the use of SQL do you mean the SQL language or Microsoft Sql Server?
If you don't want to use Access then don't :P theres plenty of other solutions out there,
If you want a memory based solution I'd recommend Microsoft Sql Server 2005 Express[^] sinces it's got the great price of free It's a solid product with alot of features.
If you want something file based I'd recommend SqLite[^]. It's small, fast and free but it'll take some effort to setup for use.
|
|
|
|
|
Thank you for your reply.
The program i am trying to creat is an update of an app that uses RAF files to store and access the data. However this has proven to be slow and resource heavy. I would like to be able to rewrite the app using a data table to see the speed difference and hopfully improve the programs response time. The problem was that i ended up creating four RAF files that where all being cross refrenced.
I was hopeing to creat a app that can use relationships.....however i failed miserably lol
Thanks once again for your reply and i will look into it a bit further.
|
|
|
|
|
Hi,
You can build a dataset/tables on the fly and saving it as XML.
'--Create DataSet (Database)
Dim DS as new dataset
ds.Tables.Add("Table1")
ds.Tables(0).Columns.Add("ID", System.Type.GetType("System.Int32"))
ds.Tables(0).Columns.Add("Col1", System.Type.GetType("System.String"))
'-- Add Data
Dim dr As DataRow
dr = ds.Tables(0).NewRow
dr.Item("ID") = 1
dr.Item("Col1") = "BMW"
ds.Tables(0).Rows.Add(dr)
'-- Check the added data
For Each tmpdr As DataRow In ds.Tables(0).Rows
MsgBox(tmpdr.Item(1))
Next
'-- save data
ds.WriteXml("c:\mydata.xml")
Hope this helps
|
|
|
|
|
Hi there thank you very much that is exactly what i needed.
|
|
|
|
|
hello,
the questions in the title.
how would I do this. The reason is I am using a panel which has a gradient color scheme and I want to drop the property grid on the panel. But I dont want to ruin the gradient effect.
Any Ideas??
thanks
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|