|
my problem: I don't know how in VB6:
1) override DllRegisterServer in "ActiveX dll" project
2) explicitly assign GUIDs or registration script
In fact, the question is: are there in VB6 some patterns
or best practices to implement Plug-in's? (e.g. plug-in
category in Registry and interface to implement)?.. If
the common practice is the same, how to implement it by
means of VB?
Thanks,
)
|
|
|
|
|
A.Obraztsov wrote:
1) override DllRegisterServer in "ActiveX dll" project
2) explicitly assign GUIDs or registration script
You can't do either of these things in VB6. You can if you write your ActiveX .DLL in C++.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I Know ( I have 4 years experience programming ATL
and VC++. But the situation is following: I need to reengineer some set of components, implemented
in VB6, that I see to be easy implemented via one major
component and a set of plug-ins. I see that, but I cannot do that! I can rewrite the code in VC++, but it will take time and is not a fair solution. Also, I won't do that alone: I have only VB and Delphi developers.
I thought in VB might be some patterns to do that, avoiding
change of programming language and environment!
In fact, I am interresting in some way to do that, not
exactly by means of methods mentioned above. If I cannot
explicitly assign GUID, I could set "compatibilty" with
previous versions of my component etc, e.g. inherited
from MSIDL-compiled TLB.
Thanks for your answer,
A.Obraztsov
|
|
|
|
|
Hello,
I would like to know wether there is a way to align a toolbar control to the right side of a VB .NET form, istead of to the left side as default.
Thanks,
Tom Rahav.
|
|
|
|
|
Tom
You can just change the Dock property , in the design view, or as follows in runtime
ToolBar1.Dock = DockStyle.Right
|
|
|
|
|
Hi,
Thanks for the help, but I ment aligning the buttons on the tollbar to the right, while the toolbar itself is docked to the top of the form.
Thanks,
Tom.
|
|
|
|
|
Hi,
I have a VB Program In Which I am Using Some User Created Dlls,I made it in to a Setup Package and It was working properly,
Later I made some Changes in the Functionality of a Function in DLL(I did'nt made any Changes in Function Name) and Created a New DLL with Same Name.
I have unregistered the Old Dll,Deleted it,Copied my New DLL to the Same Location and Registered it,
At my PC(developer's PC) The program is Working Properly,But on User's PC in which I had installed my Program its Showing a Error "Run Time Error 429 : Active X cannot Create The Object" error.
Please look in to the Problem.
|
|
|
|
|
Is the dll set to 'binary compatability'? I think the default is 'Project compatibility' which would mean if you changes the dll you would also need to recompile the project that it is used in. You can change to 'binary compatability' from 'project properties' and chose the 'component' tab.
Jon
|
|
|
|
|
I want to implement a custom collection that works like an ADO row - it can be addressed like a hashtable or listarray, and is ordered.
I found an implementation in C#, but need to port it to VB.NET. The problem, however, is that I need to implement IDictionary and IEnumerable, both of which have a method called getEnumerator(). There seems to be no problem defining the two different versions in C#, but with VB.NET, I get an error saying that overloaded functions cannot differ by return type only. And if I allow the IDE to autogenerate the interface methods, it names the second one getEnumerator1().
I suppose I could lilve with having two differently-named enumerators, assuming it's clear which one has to be used, but it seems like a silly limitation of the language, which I always thought was essentially a replica of C#.
So is there something I'm not understanding, or is this really not possible in VB.NET?
|
|
|
|
|
VB.NET is not a replica of C#. There are differences, and some things that are possible in C# are not possible in VB.NET. The reverse may also be true, although I doubt it.
However, in this case there is no problem...it does not matter that the second one is named getEnumerator1 . When used through the interface, it will still be called getEnumerator .
my blog
|
|
|
|
|
Helo, I have application that using a server and client architecture. The application in the local machine is connected to the database in the server. The database has a table that store the path of the images. The path of the image is the path that exist in the server. If the application want to display the image from the local machine, it will try to get the path of the image. What I want to ask are:
- Does the application take the image first then transfer to local machine, or it just pass the path of the image to the local machine? If it just pass the path, I think it will raise an error, since the image is not exist in the local machine.
- How to cover the error?
- Or how to solve it in order the local machine can display the image from the path that exist in the server?
Learning .NET
|
|
|
|
|
your problem is having the following the solution.
You should get the network path of the image file, no matter from which machine you are accessing the image.
If you are using the FileSystemObject it returns you the network path of a file. This path should be stored into the database server. So, while accessing images from your database it returns u the network path of the image.
|
|
|
|
|
1. Ooh, i have said wrong thing before. Sorry. The image path is in another client computer. The server just function as a database server. The image path is saved to database server from another client. Thus, the image is in that client computer. Does it affect anything to what I have said before?
2. Is the network path same with the shared folder?
I usually store the path, like "C:\MyApp\Image\" to the database. How can I store the network path of the path in the client computer to the database?
3. I am using OpenFileDialog to retrieve my image, is the OpenFileDialog the same with the FileSystemObject? If not the same, how should I use the FileSystemObject?
Thanks for your help.
Sorry for having my bad English.
Learning .NET
|
|
|
|
|
Hi,
Actually, you'll need to create a shared on the server and store an UNC path (that is, \\SERVER\SHARE\file.jpg") in the server database. That should solve the problem.
Regards,
Serge (Logic Software, Easy Projects .NET site)
|
|
|
|
|
Hi,
I have a combobox, for users. It's a lookup, which gets the user names from the table "tblContacts" field "Name".
when the form loads, the combobox gets populated. There is also one button to add the user, if the user is not available in the table, and onClick the Add button, which will pop-up one more form, to add the new user. it does fine, adds the user to the table. but it dosen't populate the combobox immediately with the new user just added.
when the form loads, i was storing all the values in an Arraylist from the table and specifying the combobox datasource as the Arraylist.
can anyone tell me how to dynamically bind the combobox, which will reflect the new records added.
Thanx
vijay
|
|
|
|
|
That's is because you combo box's data source is set to ArrayList that is not updated when you add new user. The new user is added to the table without syncronizing the ArrayList. Try to replace all the values in the ArrrayList with the table when there is new user added.
I am not expert. I am just a beginner. Learning .NET
|
|
|
|
|
I have just started with VB.NET and was wondering how do i get things like windows version, ip of my machine, cpu and memory information.
I want to get them and display it in a label/textbox.
thx
|
|
|
|
|
I am not sure it works in .Net but here is how to
do it in vb. I just found this, so you have to find
a way to be compilable.
Thanks,
Shin
Option Explicit
Private Type SYSTEM_INFO
dwOemID As Long
dwPageSize As Long
lpMinimumApplicationAddress As Long
lpMaximumApplicationAddress As Long
dwActiveProcessorMask As Long
dwNumberOrfProcessors As Long
dwProcessorType As Long
dwAllocationGranularity As Long
dwReserved As Long
End Type
Private Type MEMORYSTATUS
dwLength As Long
dwMemoryLoad As Long
dwTotalPhys As Long
dwAvailPhys As Long
dwTotalPageFile As Long
dwAvailPageFile As Long
dwTotalVirtual As Long
dwAvailVirtual As Long
End Type
Private Declare Sub GetSystemInfo Lib "kernel32" ( _
lpSystemInfo As SYSTEM_INFO)
Private Declare Sub GlobalMemoryStatus Lib "kernel32" ( _
lpBuffer As MEMORYSTATUS)
Private Sub Form_Load()
Dim Sys As SYSTEM_INFO
Dim tMem As MEMORYSTATUS
GetSystemInfo Sys
GlobalMemoryStatus tMem
Debug.Print "Percentage of memory currently in use : " & Format(1 -
(tMem.dwAvailPhys / tMem.dwTotalPhys), "00.00 %")
Debug.Print "Total Available : " & Format(tMem.dwAvailPhys, "### ###
###")
Debug.Print "Total Physical : " & Format(tMem.dwTotalPhys, "### ### ###")
Debug.Print "Total Virtual : " & Format(tMem.dwTotalVirtual, "### ### ###
###")
Debug.Print "Processor Type : " & Sys.dwProcessorType
Debug.Print "Number of Processor(s) : " & Sys.dwNumberOrfProcessors
End Sub
|
|
|
|
|
thx...
lets see if this works...
|
|
|
|
|
The other example code that was posted should work, but it's easier to do with the System.Management namespace. If your just learning VB.NET, and have no other programming experience, it can be very confusing to use though. There are no articles on CodePorject in VB.NET, but there are in C#. Try this[^] for a list of articles.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am working on the outlook addin.
Dim otlkDoc as Outlook.application
Dim otlEmail As Outlook.MailItem
otlEmail = otlkDoc.Application.CreateItemFromTemplate("c:\abc.msg")
seems like this function CreateItemFromTemplate doesn't work for .msg file?
what i want to do is to load .msg file from local pc and add it into the outlook inbox.
anyone can help?
Shinya
|
|
|
|
|
Is there anyone who can help me to find a way to capture/handle the pressing of the arrow-keys in a VB-application. I have set the KeyPreview property of my form to TRUE but the effect of pressing arrow-keys is the focus-changing and not the execution of KeyDown-procedure . Thanks!
|
|
|
|
|
Hi, I found this might help you. In vb6 create a text box and go to event KeyDown. See the following code then you will get some idea from it.
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)<br />
<br />
MsgBox KeyCode<br />
<br />
End Sub
Roath Kanel
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I have some buttons in my form, so I had to make a roundabout way to solve the problem with the capturing of the arrow keys. First, I created a text box and place it behind a button (so the text box isn't visible but has the focus!); and second - I set the TabIndex property of the text box to 0, so when I press an arrow key, the KeyDown event of the text box will be executed (not the changing of the focus).
I wonder why in VB there isn't a way/property to turn off the focus changing when an arrow key is pressed, so the programmer can capture this event directly (by analogy with the TabStop property).
Thanks for the idea, Roath
|
|
|
|
|
Why you have to put textbox behind the command button? If you want to move from the first command to the other command button just set Tab Order property of each command button. We don't need to use text box behind the command button and it is very easy that you do not need to write the code.
Anyway, my name is Kanel not Roath. (Cambodia use Family name then First name style).
Roath Kanel
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|