|
Thank you guys for your input
|
|
|
|
|
I wrote an app using some active-x com dlls in C#.NET
The app works fine on my computer where I wrote it
but when I install it on an other computer I recieve the following error:
<br />
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in TestApp.exe<br />
<br />
Additional information: Retrieving the COM class factory for component with CLSID {8B71E7FF-699F-4610-9379-DE3A92D519BD} failed due to the following error: 80040154.<br />
I've included all the dlls I use but still receive this error on the other machine. Do you have an idea why?
regards
Radgar
"Imagination is more important than knowledge." - Albert Einstein
|
|
|
|
|
My guess would be even through the dll's are on the PC they haven't been registered. I think you need to run the regsvr32.exe on those dlls. That's my best guess.
Hope that helps.
Ben
|
|
|
|
|
Thanks Ben but that's definitely not the problem.
Radgar
"Imagination is more important than knowledge." - Albert Einstein
|
|
|
|
|
Well, that's what error 80040154 says is the problem. It basically means "Class not found", whether that's in reference to a direct call by your code, or one of your .DLL's has a dependancy on another DLL that's not registered properly. It's possible that the COM Servers you registered have to be restarted.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am using DrawBezier to display a user defined bezier curve. I need the x,y values along the curve (not just points used to create the curve but each point along the curve). I have the mathematical formula but if the graphics is generating the points to paint is there a way to access the x,y locations of points it is painting? Thanks
|
|
|
|
|
Why don't you make your own method for that. May be the following code might help. If my memory serves me correctly, I've copied this code from a book by Charles Petzold on Windows forms programming.
<br />
<br />
public void DrawBezier(Graphics grfx, Pen pen, Point p0, Point p1, Point p2, Point p3)<br />
{<br />
Point[] curve = new Point[100];<br />
<br />
for (int i = 0; i < curve.Length; i++)<br />
{<br />
float u = (float) i / (curve.Length - 1);<br />
<br />
float y=((1-u)*(1-u)*(1-u)* p0.Y) + <br />
(3*u* (1-u)*(1-u)* p1.Y) + <br />
(3*u*u* (1-u)* p2.Y) + <br />
(u*u*u* p3.Y); <br />
<br />
float x=((1-u)*(1-u)*(1-u)* p0.X) + <br />
(3*u* (1-u)*(1-u)* p1.X) + <br />
(3*u*u* (1-u)* p2.X) + <br />
(u*u*u * p3.X);<br />
<br />
<br />
curve[i] = new Point((int) Math.Round(x), (int) Math.Round(y));<br />
}<br />
grfx.DrawLines(pen, curve);<br />
<br />
}<br />
|
|
|
|
|
My question is pretty easy, but i couldn't find any solution. how can i press a key\mouse button? as in...when my program runs it'll type "hello"..or click the left mouse button...any ideas?
|
|
|
|
|
Hello,
sharpiesharpie wrote: My question is pretty easy,
I would like to help, but I don't understand the question.
Maybe if you don't use ".." and finish the sentence I (or somebody else) can help.
All the best,
Martin
|
|
|
|
|
just press a key, make the program click the mouse, press a key etc.
|
|
|
|
|
Hello,
Again I'm not sure if I understand your question correct.
But I'm trying to answer.
If it's limited to a special control, you could use the KeyPress event of that control like:
if (e.KeyChar == yourcharacter)
{
//If you whant to click a button, you could use the PerformClick method.
yourbutton.PerformClick();
}
Hope it helps!
All the best,
Martin
|
|
|
|
|
:\
i don't mean clicking a button in my form...i mean clicking the mouse\keys...the physical ones...like the auto clickers for games like MUOnline, or VistaTask...just click a keyboard key\mouse.
|
|
|
|
|
SendKeys.Send()?
You want to click the physical keys though? Maybe make something out of lego?
Russell
|
|
|
|
|
err...what's SendKeys? and no..not lego >_>
and what about clicking the mouse?
|
|
|
|
|
^
Hopefully explains something about SendKeys.
I'm not sure if it will send key presses to a different app though. I assume you are trying to write an app to autoclick into another process. You want to be a bit careful doing this as some games will ban you for such behaviour.
Russ
|
|
|
|
|
Hello,
Mabe this freewaretool helsp you.
It's not C#.
It can be programend in a kind of script language.
Can simulate mouseclicks and keypress, and much more!
All the best,
Martin
|
|
|
|
|
how can i get the data that i am entering in a text box and display it as a subitem in a list control?
|
|
|
|
|
err..ListBox1.Items.Add(textBox1.Text);
|
|
|
|
|
thank you. can you also tell me how to make it enter for a particular field like row=0, column=3.
|
|
|
|
|
Hello everybody,
Basically the problem is that the UTF8Encoder is not able to get this char '²'.
Is this a known fact, or am I doing something wrong?
This is what I do in a test routine:
using (FileStream fs = File.OpenRead(filename))
{
byte[] b = new byte[10000];
UTF8Encoding temp = new UTF8Encoding(false,true);
int l=0;
FileStream fw= File.Open("copy.txt",System.IO.FileMode.Create);
while ((l = fs.Read(b,0,b.Length)) > 0)
{
string s= temp.GetString(b, 0, l);
Console.WriteLine(s);
}
fw.Close();
}
Thanks for your time and help
All the best,
Martin
|
|
|
|
|
Can your console output the character even if it is read correctly? If your console code page does not support it your program won't display it.
UTF8 is multibyte, so your read operation might split the byte stream in the middle of a character. Create a StreamReader with Encoding.UTF8 to avoid having to deal with this manually.
Edit: Are you sure your file is actually UTF-8 encoded?
|
|
|
|
|
Hello,
First, thanks for youre time!
Actually I started by using a StreamReader, with the result that the complete line was there but without the '²' character.
Any other suggestions?
All the best,
Martin
|
|
|
|
|
First of all, check the source file (in my experience the most likely error). The character should be encoded with the byte sequence C2 B2.
As a quick hack to test it rename the input file so it has a bin extension and load it in Visual Studio - you should now see the byte content in a hex format.
|
|
|
|
|
Hmm,
I did the test with following result "B2" and no character is shown.
When I open it with the "TotalComander" Bin style, it's also "B2" but the '²' is shown.
So uses UTF8 really multibyte, or only for special characters?
Thanks again for your time and patiance.
All the best,
Martin
|
|
|
|
|
UTF-8 use more than one byte for anything over Unicode character 127. Some refers to these as special, others refer to English characters as special.
|
|
|
|