|
I just want to click custom add in buttons by program.
I have 3 buttons in custom addin toolbar for ms word which is
developed by VB. I want to know the way to click one of buttons
in my addin toolbar by program.
VB6 Office2000
|
|
|
|
|
I have looked through various tutorials and figured out how to get one of them working.. made a little sample with the following setup:
1) Server (console app, with console.readline() to keep the listener open)
2) Client (console app that calls the remote code)
3) Class library which is the remote vb.net code.
What I don't understand is how am I going to use Remoting to send a signal from my Windows Service to the system tray icon..(Windows form) ? When the Service becomes active I want it to send a message to the desktop (System Tray) so that the System Tray can change its icon into an 'active' mode, or I will have alittle msn like window pop up.
What I know: put the server code in the system tray project, client code in the Service.
What I need to know: When the Client calls the Remote Code, how can I get this code (which is just a class library) to pop up a window or do something as mentioned above? I couldn't get the remote code to work any other way than just a class library, is there a way to have my entire form the remote code? (I tried that but then couldn't reference it in the server because i can only reference .dll , and the .exe wasn't a proper format I guess).
Any help would be appreciated. Thanks.
This is the code:
Class library ###########################################
Public Class SampleRemoter : Inherits MarshalByRefObject
Public Function getUser() As String
Return Environment.MachineName
End Function
End Class
###################################################
Server###############################################
Class RemotingServer
Shared Sub Main(ByVal args() As String)
Console.WriteLine("Registering our remote object...")
RemotingConfiguration.RegisterWellKnownServiceType(GetType(SampleRemoter), "SampleRemoter", WellKnownObjectMode.SingleCall)
Console.WriteLine("Create and register a channel...")
Dim ch As New TcpServerChannel(8080)
ChannelServices.RegisterChannel(ch)
Console.Read()
End Sub
End Class
###################################################
Client ###############################################
Shared Sub Main(ByVal args() As String)
Try
Console.WriteLine("Registering Channel...")
Dim ch As New TcpClientChannel
ChannelServices.RegisterChannel(ch)
Console.WriteLine("Registering remote object in local domain...")
RemotingConfiguration.RegisterWellKnownClientType(GetType(SampleRemoter), "tcp://localhost:8080/SampleRemoter")
Console.WriteLine(" Create remote object and execute method")
Dim sr As New SampleRemoter
Dim username As String = sr.getUser()
Console.WriteLine("Machine name of remote machine = " & username)
Catch ex As Exception
Console.WriteLine(ex.ToString())
Finally
Console.Read()
End Try
###################################################
|
|
|
|
|
I have recently begun working in a job with VB6. I am used to embedded C/C++, so there is a large learning curve for me.
What I am trying to do is make a class or module that can traverse all the controls on a form. I want a generic way to choose any given control within my code. I looked at the form methods, but cannont find anything that will return a collection of controls. The "Form.Controls" property looked promising, but would not return a collection of controls. It returns an object representing the controls. Is there any way to use this, or anything else in VB6 that would allow my to select controls within my code without knowing how many controls are on the form? Perhaps there is something visible through the tab order?
Thanks in advance,
Paul
|
|
|
|
|
THe .Controls collection is what your looking for. It returns the collection of contorls on the form. What's the problem your having? What do you mean by "select"? What exactly are you trying to do?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have actually managed to figure out exactly what I needed to do. I used the .Controls collection, but took it farther. I looped on the total number of controls to look at .Controls.Item(index). This allowed me to browse through every control on the form. I needed to do this because I was generically assigning data to them.
Thank you for your inteset in helping
On another note, I was concerned by the fact that the .Controls property returns an Object, not a Collection. How can I assign an object to anything? Can this only be done with a variant data type?
|
|
|
|
|
I have Created a Class with multiple properties.
Public Class Item
Private _Code as String
Private _Description as String
Public Property Code as String
... Get/Set _Code etc...
End Property
Public Property Description as String
... Get/Set _Code etc...
End Property
Public Sub FetchFromDatabase(Code as String)
... Code which lookus up the record in a SQL table and stores the field data in
... _Code / _Description
End Sub
End Class
Now I have a Windows Form with 2 Textboxes.
The first is not bound and the second is bound to the description prop of myitem class.
When I enter an itemcode in the first one it executes the fetch Command but the second one is not filled with the fetched description ...
I need some help here.
|
|
|
|
|
Hey,
Is there a way to locate a folder on a user's machine regardless of what operating system they are using.
I want to be able to locate the 'C:\Documents and Settings\user\Local Settings\Application Data\' folder and then copy my own folder to it when my program is installed.
Is this possible
thanks for your help
Chris
|
|
|
|
|
it sure is...
check out:
environment.getfolderpath(environment.specialfolders.localapplicationdata)
hope this helps.
-jim
|
|
|
|
|
Cheers Jim,
I will check this out, thanks for hte help
Chris
|
|
|
|
|
I made a report in Crystal Report 9.2 and I am displaying this report through VB.Net on a form. I want e-mail this report to an e-mail account accoridng to the user.
So Plz help me on this problem.
Thanks
Prakash
pkc
|
|
|
|
|
would any one have come across a system property which returns the appearance style? or is there a method to detect if which theme is in use
thanks
Mr_Wilber
|
|
|
|
|
|
I am programming Crystal Report in VB6 with Report creation API functions.
May i ask a question:how do i set a condition formula at runtime for section or report objects such as FieldObject, TextObject,... with Report creation API functions.
Please reply me soon.
Thanh you very much.
|
|
|
|
|
Hello,
I'm trying to create an installation package for my rather simple VB.net application and the users don't want to use it because they don't want to have to install the ".net" framework that it asks them to upon installation. I thought there was a way to include the libraries in the installation package (or the program itself) so they didn't have to do this?
How do I build it so they don't have to install anything from MS?
thanks,
JennyP
|
|
|
|
|
It appears that you can't. The .NET Framework files in the deployment solution don't actually end up in the final set up file, they just exist there to stop the setup project build from complaining about missing dependencies.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
If that's true, it's VERY lame... I should have used Borland.
JennyP
|
|
|
|
|
You are allowed to distrubute the redistributable on its own. And there are likely ways around it (creating a small installer bootstrap that calls one install after another is one that springs to ming). And I don't think Borland will be any different as, from my understanding, its a licencing issue rather than a technical one.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
bitpusher wrote:
If that's true, it's VERY lame... I should have used Borland.
For the second time in a week, I simply cannot understand how somebody can get to the END of writing an app and only THEN discover that their client machines need the Framework.
|
|
|
|
|
J4amieC wrote:
For the second time in a week, I simply cannot understand how somebody can get to the END of writing an app and only THEN discover that their client machines need the Framework.
Hello. In retrospect, I should never ASSuME anything, but I believed that there would be no real difference between 6.0 and .net---in 6.0 I was able to statically link the few libraries I used. In .net, it's not an option.
JennyP
|
|
|
|
|
VB6 had a runtime too, the only differences were:
1) It wasnt the 23Mb Monstrosity that is the .NET Framework
2) It was pre-installed on most users's machine as VB had been around quite some time.
Within a few years the same may be true for the .NET framework as 2) above, but for now you need the redist of the .NET framework.
|
|
|
|
|
there is a bootstrapper right here:
http://msdn.microsoft.com/vstudio/downloads/tools/bootstrapper/
|
|
|
|
|
There are projects out there that will install just the components of the .NET Framework that are needed to run your app. There is a HUGE downside to doing this though. If your clients eventually get around to installing the .NET Framework or expect that a .NET Framework Service Pack will fix a problem with your app, they are SOL because the fix won't install. The reason? The .NET Framework is not installed and the Service Pack will not install just the files it needs to fix your partial installation. Software has already hit the market that requires the Framework, so they'll have to install the thing eventually. Why not start with your app?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
There are projects out there that will install just the components of the .NET Framework that are needed to run your app.
Hello,
I'd very much like to use this if you know where they are? My distribution is VERY limited (less than 50, I'd say), and the lifetime is less than a year.
thanks,
JennyP
|
|
|
|
|
|
How do I create a sub prodecure and call that procedure from the navigation menu items.
|
|
|
|