|
I successfully converted a project from VB6 to VS2003 as VS2003 is what I had originally. Everything was working as expected. I just got VS 2008 and upgraded (opened) the project and now I get an error with one of the DLLs I wrote (I have a couple and the others worked fine)
the error is type 'MyXXX.XXX' is not defined, so I go to add a reference and I get the error:
A Reference to 'C:\mypath\MyXXX.dll' could not be added. Could not load the type library, Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)
Googled it but did not seem to find much directly related
any idea where I should be looking? (or doing?)
Thanks in advance,
No-e
|
|
|
|
|
Has that type library been upgraded as it's own project and recompiled??
|
|
|
|
|
Nope, have not touched it in years....
I have a couple, this one does not work, the others do.
No-e
|
|
|
|
|
The next thing I'd do is recompile that component under the new compiler and try it. It could be that the component is encounter a breaking change from .NET 1.1 to running under .NET 2.0.
|
|
|
|
|
Hi,
I'm sure I have seen this question posted before on CP but I am unable to find it if so. I have 2 ComboBoxes on a form both bound to the same data source. But when I change the selected index in the first the second changes also, and vise-versa.
Can somebody please give me some hints oh how to do this properly. Thanks.
(Just in case it matters, the data source is a generic list of user defined objects)
|
|
|
|
|
<EDIT>
Sorry - I just reread that and it didn't sound right. It should be BindingSource, not Navigator. Attribute it to rectal-cranial inversion.
</EDIT>
You have to stick 2 BindingSources's in between the combos and the datasource. Each combo will have it's own BindingSource between it and the datasource. Both BindingSources will have their DataSource properties pointing at the single data source.
modified on Thursday, July 30, 2009 12:19 PM
|
|
|
|
|
OK Dave thanks for that
EDIT: Just tried it and it worked perfectly. Should I be using the BindingSource object to do all of my data binding rather than binding directly to the data source?
modified on Friday, July 31, 2009 4:19 AM
|
|
|
|
|
Not really. I only use it when I've got multiple controls that need to see and navigate a single datasource independant of other controls.
Think of it this way. Every control on a form using the same datasource also uses the same binding manager. The binding manager maintain a currency manager (which has nothing to do with money!) which keeps track of which record is the current record all of the controls are looking at. When one control changes the current record, all the controls get pointed at the new current record.
The BindingSource class lets you escape that model and sets up another, seperate set of binding objects that does the same thing, independant of the first, or default set.
In your case, technically, you don't need two BindingSource objects. You only need one. I just used two objects for better code readability. What's easier to understand??
Dim bs As New BindingSource
bs.DataSource = data
ComboBox1.DataSource = data
ComboBox2.DataSource = bs
or
Dim bs1 As New BindingSource
Dim bs2 as New BindingSource
bs1.DataSource = data
bs2.DataSource = data
ComboBox1.DataSource = bs1
ComboBox2.DataSource = bs2
They work exactly the same...
|
|
|
|
|
Ah I see, understood
Thanks for taking the time to explain it so well.
|
|
|
|
|
Hello ! I have very irritating problem with progressbar control. It only manifests in Vista and Windows 7 ... The thing is, when I increase value, in Vista and Windows 7 there is nice animation that fill's up progress bar.
But that is also problem for me, because when I do something, and that is done, I display message (bla bla - DONE), but progress bar isn't full.
Here is screenshot:
Picture
I do progressbar.Update always after I change value, but it has no effect
|
|
|
|
|
Do you set myProgressBar.Value = myProgressBar.Maximum when your activities are completed?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
yes, and it fill's to the end, but other lines of code are executed before it is filled ...
Here is little sample:
myProgressBar.Value = myProgressBar.Maximum
myProgressBar.update()
msgbox "Done!"
and in that sample message box is showed before progress bar is filled to the end
|
|
|
|
|
The Update() method for any Control (ProgressBar included) simply causes that Control to re-paint itself, as it is. It does not cause it to update its data. So calling Update() is a waste of time in this case. applying the new value will cause a re-paint, eventually.
Short of calling Application.DoEvents (which I hate) I have no solution, sorry!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
It's a well known problem with Aero. I don't think you can do anything about it, unless you force users to select a theme with no slo-mo animation for progress bars.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
Yeah, I was afraid of that ... So there's no way to fix it (except to wait few seconds to be sure that it is filled up) ?
|
|
|
|
|
Yep, no way that I know of.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
I reached the same conclusion with a progress bar / background worker component I made. When testing for a CP article, under Vista I had the same problem - and no solution.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hi all,
The clients didn't mention it and I forgot to ask. So everyone get out the wet noodles and beat me with them. Okay, now that we've properly assigned blame I'm hoping someone can help me.
All the forms in my app have been designed at 1280x768. I need the application to also look right and fit on the screen at 800x600. Please tell me there's some quick solution? I tried using the me.scale property on the form and all its objects but that requires that I do something either with docking or anchoring. Is there a quick something out there that will check the resolution of the computer and resize the stuff on my forms and the forms themselves.
And yes, I know all about people using a lower resolution because they want things bigger and all. But that's just not an option here. And the real reason we need it is because our program will be used in 3d world countries where my client's convinced they may only have the smaller resolution available to them.
Help? Thanks in advance for any help you can give.
Denise "Hypermommy" Duggan
|
|
|
|
|
If the app wasn't designed for runtime scaling from the beginning, I doubt there is any fast & easy way to change it: it should be re-designed.
If that's not an option, then...
One solution is to implement a loop on all the controls upon form loading and resize and reposition them. Drawback: the resized/repositioned layout will not be as neat as the original.
Another solution, if your requirements are for two fixed resolutions, would be to manually design the form for both (in order to have a neat and good looking interface in both cases), leave it in one of the two layouts, and then switch to the second layout at runtime depending on the screen's resolution. Drawback: this would be a mess to manage for modifications.
I like the 1st solution best. Hope this gives you some ideas.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
I doubt there is anything readily available that combines those two.
My.Computer.Screen.WorkingArea will give you the available desktop space.
Next you'll probably have to loop through all controls, and scale them.
It might be quicker to just anchor all your controls, and use me.scale
My advice is free, and you may get what you paid for.
|
|
|
|
|
There is no easy quick fix for this. You application should have been designed with layout containers, docking, and anchoring from the start, even if the form isn't resizable. If it was, your solution wuold have been easy and quick.
You have no choice but to re-engineer the layout of your forms, by hand.
|
|
|
|
|
Where can I find out more about layout containers... starting with what they are, please? Thanks.
Denise "Hypermommy" Duggan
|
|
|
|
|
They're all in the ToolBox, under the Containers tab. FlowLayoutPanel, Panel, TableLayoutPanel, GroupBox, SplitContainer, ... All you have to do is look up each control at MSDN[^].
|
|
|
|
|
I have a database "Employee_Master", there I have a table emp_master
and I have another database "Purchase_Master", there i have a table mpr_master
So how to have a select query for this type of requirements?[sql server 2008]
select mpr_master.mpr_no,mpr_master.emp_id,emp_master.emp_name from mpr_master,emp_master where mpr_master.emp_id=emp_master.emp_id
Thanks
|
|
|
|
|
So we're talking SQL here not VB, but okay.
SELECT T0.*
FROM Employee_Master.dbo.emp_master T0
INNER JOIN Purchase_Master.dbo.mpr_master T1 ON T0.emp_id = T1.emp_ID
or
SELECT T0.*
FROM Employee_Master.dbo.emp_master T0
WHERE T0.emp_id IN (SELECT T1.emp_id FROM Purchase_Master.dbo.mpr_master)
etc.
My advice is free, and you may get what you paid for.
|
|
|
|