|
do you really need a .tlb file? you can put a com wrapper on the dll(class library) and then in vb6 you can do a createobject to it?
|
|
|
|
|
Could you please tell me how i can do that!
Thanks
|
|
|
|
|
Imports System.Runtime.InteropServices
<ProgId("Proj.XXXXXXX"), Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"), ComVisible(True), _
ClassInterface(ClassInterfaceType.AutoDispatch)> _
Public Class XXXXXXX
End Class
=============
Proj = project name
XXXXXXX = class name
From vb6 = set o = createobject("proj.xxxxxxx")
-------------
get a new guid from vb.net ide
|
|
|
|
|
hi
i want to read an xls file from vb.net and then write it to a text file..
obviously using streamreader gives me garbled output..is it possible to get meaningful data or am i wasting my time?
a few pointers please??
|
|
|
|
|
in fact im more interested in getting the macro code from excel files..wat i mean is i am interested in reading the macro code for some purposes.
-- modified at 8:43 Friday 12th January, 2007
|
|
|
|
|
You're pretty much wasting your time using a StreamReader, of any other file operation. Office files, prior to Office 12, used a multiple-stream format that was very difficult to decode manually. Your only hope is to use Automation to start an Excel instance, have it load the XLS file, then you can use the automation interface to get that scripts you want.
No, I don't have any examples.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
i got a solution..i automated excel to export the macros,which i could read easily as any normal text files..
|
|
|
|
|
what i really want is someone to help me make my game work.
its not that i havent read the stuff, but i cant understand the stuff.
i nid to add an object that could move up and down or left to write, so that the user will then prevent it from reaching the edge using appropriate keys.
please help.
Phunz
Phunz
|
|
|
|
|
This is a common issue. The issue is, you need to learn to program more basic stuff before you can write games. As you said:
phunziro wrote: its not that i havent read the stuff, but i cant understand the stuff.
That's because you're trying to do the hard stuff before you have a grounding that will enable you to do it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
how to set a property only of "desegn time" (hiding it at run time) in VB6?
Thanks.
|
|
|
|
|
Something like this:
Const m_nAmount As Long = 32
Public Property Get Amount() As Long
Amount = m_nAmount
End Property
Note that Let accessor is not defined.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Thanks .. but i have an ocx ...
this solution is wrong..
|
|
|
|
|
AlexB47 wrote: this solution is wrong..
The solution is OK, the problem is wrong!
If you are the developer of the COM library, then you've the power to make the property read-only. On the other hand, if you're the client of it, simply access the property only for reading, finally, if you are ? then, my friend, I don't known.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Then I explain myself better… I must have the property to set at design-time in the VB property page (uc of OCX), but in "side client code"(OCX) i must HIDE this property. If I do not define the property "let", it's not visible in the VB property...
|
|
|
|
|
There is no way to hide the property at runtime. If I remember correctly, there is no property in the VB6 runtime to tell the component it's in Design mode or Runtime mode.
You cannot change the visibility of the property. It needs to be public for the designer to work on the component and the user gets to set it's property. You cannot change that visibility at compile time.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
You can put this line in your property and during design it will allow any change and during runtime it will raise an error "or you can use a messagebox too" or just ignore the change:
Public Property Let EnableCheckMarkColumn(bVal As Boolean)
If Ambient.UserMode Then Err.Raise 382 '<--- won't let a change happen at runtime
mbEnableCheckMarkColumn = bVal
PropertyChanged "EnableCheckMarkColumn"
End Property
|
|
|
|
|
I forgot about Ambient! :-> Can you tell it's been 6 years since I've touched VB6??
Anyway...you're right. You can check for the run more, but you still can't change the visibility and hide it, like the OP wanted. Something he'll just have to live with...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Unfortunately, I still have to deal with and use it daily...we are slowly migrating stuff over to dotnet not as quickly as I would prefer...
I totally agree, on the visibility...
nathan
|
|
|
|
|
(EDIT: I just realized you are looking for VB6. This code/article suggestion is in .NET so I am not sure whether it will help you)
I believe you can set properties similar to what you want using ParentControlDesigners. An article that I wrote might be able to help you: Targeting Design-Time Events of User Controls. The article doesn't specifically cover it, but I am almost sure I ran into the situation you are looking for while I was writing it so it should lead you in the right direction.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
What is the best way to display a tif file in VB.Net?
What controls would anyone recommend?
|
|
|
|
|
I believe GDI+ can read tif. If not, you're out of luck.
If you don't want to draw it yourself, use a picture control. Load the tif from disc into a bitmap object, and pass it over.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
GDI+ can handle some TIFF files, but not all. Any TIFF's using JPEG compression are not supported.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have one text file with 4 rows, example
A B C D
1 2 3 4
1 2 3 4
I want to read it and display in datagrid how can i do?
Thanks
................
|
|
|
|
|
You'd think this would be very easy, but it has some surprising problems and complexity.
You can get a bindable component to read the CSV file for you here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|