|
Well, thanx for help anyway!!
|
|
|
|
|
I was hoping we might dig a little deeper. Does File.ReadAllLines ( or whatever it is ) help ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I checked my code and wondered if it was because RichTextbox only take the recent memory, that's why it only displayed one of it.
|
|
|
|
|
The rich text box will show exactly what you ask it to. If the function returns what you expect, then the problem is how you assign it to the rich text box.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Well, i solve the problem of display data. Thanx!!!
|
|
|
|
|
Is there an event or means of establishing when the user cancels a drag and drop operation?
Lets say the user is dragging something over my control. How will i know if the user cancelled the operation (i.e. by pressing escape)? Do i have to write custom code for it or is there an easy way?
Also, on a slightly related matter, how can i find out if the mouse button is down?
I need a mouse equivilent to My.Computer.Keyboard.CtrlKeyDown
Such as My.Computer.Mouse.LeftButtonDown
|
|
|
|
|
I think there's a syskey event for system keys. I know that the normal key events have flags for CTRL and ALT, so they don't generate an event by themselves ( I don't think )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i need a vb code for barcode Daily time record attendance. pls help. send it to my email add lustrac@yahoo.com or post it here.. thanks a lot..
chris
|
|
|
|
|
You seem to have this site confused with rentacoder.
There is code for reading barcodes on the site, the rest shouldn't be too hard. If it is, you can ask for help, but no-one will do your job for you.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
If you're writing any code, you can add parameters to the Paramaters collection. If you're not writing any code, I have no idea how all that wizard rubbish works.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I don't understand the question.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Probably a simple question but i have a class called LukeClass.
I have a Shared variable called LukeSharedVar in that class.
I do not create any instances of that class, but i call LukeClass.LukeSharedVar = "Luke"
Does a new instance get created? I dont understand what happens if you modify a shared property/variable of a class without having any instances of that class in memory...
|
|
|
|
|
No, setting the value of a static (shared in VB) member does not create an instance of the class.
The static members are stored in the memory area for the class. This memory area is allocated when the assembly is loaded. There is only set of the static members for a class, regardless if there are zero or a million instances of the class.
---
b { font-weight: normal; }
|
|
|
|
|
Excellent thanks for that.
|
|
|
|
|
Just to add to what's been said - a shared variable ( static in C# and C++ ) has the same value for all instances of the class, and if the variable is public, you can set it even if no instances exist ( although the existance of a public static variable is a bit of a red flag, what's it used for ? )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Well in my case, i have a class which contains information about a booking. I create multiple instances of this class (for multiple bookings) and store them in an array and i then pass that array to another section of my code which goes through and processes each booking in the array.
Each booking (instance of my booking class) has a peice of information which is the same across all bookings i.e. it does not booking-specific information. So i create a shared variable which stores the non booking-specific information for my processing function to use.
Doing it this way seems nicer to me than settings the same value for each booking instance.
|
|
|
|
|
I'd have tended towards having a struct which contains a list of booking info and a single ID, or passing the ID and array to a method that stores them. What if you have more than one instance of the class ( it should probably be a struct, as well ) that relate to different bookings ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I could do that but it would be messier given the fact that everything i need is stored inside the array of bookinginfo class instances as opposed to having to pass extra parameters to other functions... It would require more coding and extra copies of the non booking-specific information lying around.
Im not sure i understand exactly what you're saying though... How would a structure be better?
|
|
|
|
|
It's often more work to get the design 'right', but it saves you in the long run. If you ever need to have more than one booking in memory, your current design makes this impossible. A struct that contains an ID and a list of bookinginfo objects seems the best alternative to me.
A struct is passed by value, a class is passed by reference. A struct is more suitable for containers of data, where there aren't many methods or complex types, just a bunch of strings/numbers/etc.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
That is true about only having one set of bookings in memory at a time. I didnt think of that...
Ill have to do some more research on structures because i dont understand the concept of having a structure ID and how it works by value as opposed to by reference.
Thanks for the advice.
|
|
|
|
|
It's not too complex, a struct is a more lightweight object. The most significant difference is that a class is always passed by ref, so if you pass a class instance into a method, changing a property on that class changes it in the calling function as well. A struct is passed by value ( a copy is made ), so changes are not reflected in the calling object unless you specify that you wanted to pass by ref.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I understand. Thanks for your help.
|
|
|
|
|
Christian Graus wrote: ( static in C# and C++ )
and C and Java and Pascal and...
---
b { font-weight: normal; }
|
|
|
|
|
Hi, does anyone know what this error means and how I can resolve the issue? I have created a UFL for crystal reports in VS2005 and have created the assembly etc. It works fine in preview report, but when I load the program and try to load the report from the viewer it gives me the error:
"NonComVisibleBaseClass was detected
Message: A QueryInterface call was made requesting the default IDispatch interface of COM visible managed class 'CRUFL_VB_ReportFunctions.CrystalReport1'. However since this class does not have an explicit default interface and derives from non COM visible class 'CrystalDecisions.CrystalReports.Engine.ReportClass', the QueryInterface call will fail. This is done to prevent the non COM visible base class from being constrained by the COM versioning rules."
I have done some research online to find that the problem might be the MDA, I added the MDA key as described and set it to 0 but am still having problems with mda issues during the build and run within visual studio. Runs fine if I use the exe in the bin folder.
Any ideas? thank you
eatwork
|
|
|
|
|
Hi,
The code below should use the adodc control to retrieve data from the table and display them in textboxes.
In the contrary this error:object does not support named arguments was returned on
rctcon.recordsource= "select * from mytable" section of my code.
Dim rctcon as connection<br />
rctcon.connectionstring=MYstring<br />
rctcon.recordsource= "select * from mylist"<br />
set txtpolicy.datasource= rctcon<br />
txtpolicy.datafield="policyno"
Please how am I to use the adodc to display data in my textboxes.
thanks
Fikunmi Feyijin
Hicad Systems
Nigeria
|
|
|
|