|
gjx_junxian1989 wrote: Am i doin things the right way?
Copy'N'Paste coding? Hell No.
gjx_junxian1989 wrote: where i placed the codes in my program?
I have no idea hwere you placed any of this stuff in your app.
gjx_junxian1989 wrote: How do i define or declare the SMSEngine in the codes?
What SMS Engine? Your code snippet doesn't mention anything about an engine. Or are you saying that the code you posted IS the engine? If so, then your problems do not lie in knowing VB.NET, but the basic concepts of object oriented programming. These are design issues that I really can't walk you through in a forum post.
|
|
|
|
|
Hello,
We have a VB.Net program that uses GetObject() method. While executing the program, it gives the following exception.
"Unhandled Exception: System.Exception: Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.GetObject(String PathName, String Class)"
The same program is executing successfully in our production environment but not in one of the development environment. We came to know that the program referring to STDOLE.DLL which is not there on the development machine where the program fails. Even if we copy the same dll on that machine, it is not working. How can we install Primary Interop Assemblies seperately? we do not want to install Visual studio.net.
Please let me know what are all the dlls required to use GETOBJECT() method in VB.Net program?
Thank you in advance,
Raheem MA 
|
|
|
|
|
Are you sure the ActiveX component is correctly registered? The error you get is not an error of the GetObject function but that your ActiveX component is not registered correctly.
Try to registed the component by executing 'regsvr32 x:\path\myactivex.dll'.
Tosch
|
|
|
|
|
Thank you for quick reply,
We do not have STDOLE.DLL on our machine. So it cannot be registered right? What is required to install on the machine to get this dll? once again reminding you we do not want to install Visual studio.Net.
Thank you,
Raheem MA
|
|
|
|
|
You have to make a setup project from the computer that VS.net is installed on. After that you have to run the setup installation file on the required machine.
Shay Noy
|
|
|
|
|
I think this answer is not related to my question.
I read somewhere that STDOLE.DLL comes with Visual Studio.Net. Are there any alternatives to get this DLL installed without Visual Studio.Net?
Thanks.
|
|
|
|
|
I would like to understand:
Does the program, written on the machine which VS.net is installed on, run succesfully?
If yes, you have to create a new setup project including all the required files (also STDOLE.dll) and then run it in the relevant computer.
Do I understood correctly what you need?
Shay Noy
|
|
|
|
|
yes, our program is a console application which is called from formscape reports. we have copied only exe of the program in the production and running successfully.
On the production system, we have primary Interop Assemblies folder at the following path:
C:\Program Files\Microsoft.NET\Primary Interop Assemblies
Following are the contents of the folder:
1. adodb.dll
2. Microsoft.mshtml.dll
3. Microsoft.stdformat.dll
4. msdatasrc.dll
5. MSDDSLMP.DLL
6. MSDDSP.DLL
7. stdole.dll - This is reffered in our program.
We could not find this folder on development machine. That may be the reason we are getting the exception saying 'Cannot create ActiveX .....".
How can we install these dlls ?
Please shed some light in this scenario.
Thank you in advance
Raheem MA
|
|
|
|
|
|
Is there a preprocessor macro to get the current function name or is it available from a particular global class? I know there is a preprocessor macro to get line numbers if you use them.
|
|
|
|
|
Try this:
Reflection.MethodBase.GetCurrentMethod.ToString
Shay Noy
|
|
|
|
|
Thanks; I think that will work for my VB .NET projects. Do you happen to know a method that will work in VB6 as well?
|
|
|
|
|
No, I don't. You can check in google
Shay Noy
|
|
|
|
|
2 questions.
Is it possible to fire data from an excel sheet into MWD form via a macro in excel?
and
How?
I have never used this database before, and it is a bit of a legacy thing that needs to be addressed.
I have tried googling, but can't find much that helps, if you know of a good site that too would be useful.
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
I haven't used Works for yonks and yonks, but from memory it deals with csv files reasonably well. You could fire the data to a *.csv file and open it in works.
I googled microsoft works csv and got a fair few hits about works to excel you might want to have a look yourself.
I also found two links to a couple of works libraries Libwpd and Libwps (below) that might be worth further digging?
Libwpd[^]
Libwps[^]
Hope this is of some help.
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.”
|
|
|
|
|
Thanks Henry, I shall have a play with it in the morning.
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
Before you get out of bed, or wait till you're in the bathroom?
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.”
|
|
|
|
|
Probably at work, I am in bed as we speak!
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
Henry Minute wrote: Before you get out of bed, or wait till you're in the bathroom?
That has made me chuckle!
|
|
|
|
|
Liqz wrote: That has made me chuckle
Good.
It actually works on two levels, since the OP and I both utilize Mobile Broadband, so both scenarios are possible.
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.”
|
|
|
|
|
Hello,
I want to write a programme. It's mantality is as same as Autoit. I have a windows form and when ı clicked to Button, ı want to send 1 or 2 or Ctrl+Alt+F2. My friend is playing a game and said me: can you do this? I said yes. Soooo... I use Sendkeys.send() as below:
--------Button1.Click-----------------------
SendKeys.Send(Chr(Keys.D1))
System.Threading.Thread.Sleep1000)
SendKeys.Send(Chr(Keys.D2))
I use it but it sent 1(but Text form of 1 - string) 
|
|
|
|
|
First, controlling another application using SendKeys is about the poorst method you can use. SendKeys send keystrokes to whichever window with the focus, without caring about which window has the focus! You could be sending keystroked to Notepad when you actually wanted Calculator. There is no way to guarantee that every keystroke you send is going to end up going to the correct window.
Next, why are you converting the Keys to Characters?? Just send the Keys valoue, not the converted Chr value.
ms_cdr wrote: I use it but it sent 1(but Text form of 1 - string)
I don't have the slightest clue what you're trying to say here. This doesn't make any sense at all.
|
|
|
|
|
I'M trying to SAY this:
Can I control another program withmy windows programme?
My friend is playing a game. and said me :"can you write a program for me?" I said "ok". And program's function is that: when he push start button, in another programme automatically push 7.. I tried it...
Sorry ı dont know english very well. I tried to explain my problem.
|
|
|
|
|
It MAY be possible, depending on how the game is written. SendKeys doesn't work in all cases and it's problematic to use, at best.
If the game is using DirectX, SendKeys may not work at all. If it's a Windows forms app, then SendKey has a better chance of working, but is not guaranteed.
The best method, and the most complicated, is to craft window messages simulating keystrokes and sending those messages to the window handle of the game's main window.
|
|
|
|
|
I have this VB .NET app with a generic save method. When a menu item, or a toolbar button or a next button is clicked - if there are any changes it should save with a message.
In the code - to identify which was clicked I tried
<br />
If sender Is ToolBar1.Buttons("ToolBarSave") <br />
OrElse sender Is TabMain.Controls("btnAdminDataNext") Then<br />
MessageBox.Show("successfully saved!"<br />
End If<br />
Any idea, why and how to make it work?
Thanks.
|
|
|
|