|
AutoCAD 2005 and 2006 have managed assemblies you can use. Otherwise you can ActiveX interface that AutoCAD has supported since AutoCAD 2000.
--
Joel Lucsy
|
|
|
|
|
Thank you for u answer but please give me some example.
|
|
|
|
|
I might be able to, but you didn't say what version of AutoCAD you had, what approach you'd like to take, nor the scope of what you're trying to attempt.
--
Joel Lucsy
|
|
|
|
|
I have autocad 2006. I want to develop my application can view AutoCad File (DWG) with some feature like zoom-in zoom-out.
|
|
|
|
|
It sounds like you're trying to create a viewer external to AutoCAD. This isn't really possible without licensing specific things from AutoDesk.
--
Joel Lucsy
|
|
|
|
|
So I'm making an application that alters another Windows program. I want to do it buy synthesizing mouseclicks. I have that aspect working, what I need to do now is determine the location. I'm using GetWindowLocation, However the values it returns are kind of absurd. SO I'll post my code(stolen mostly from another post) and if anyone can figure out where I went wrong...
<br />
[DllImport("user32.dll")]<br />
private static extern bool GetWindowPlacement(IntPtr hWnd, ref WindowPlacement placement);<br />
public struct WindowPlacement{<br />
public uint length;<br />
public uint flags;<br />
public uint showCmd;<br />
public POINT ptMinPosition;<br />
public POINT ptMaxPosition;<br />
public RECT rcNormalPosition;<br />
}<br />
public struct POINT{<br />
public long x;<br />
public long y;<br />
}<br />
public struct RECT{<br />
public long left;<br />
public long top;<br />
public long right;<br />
public long buttom;<br />
}
That's my structure definitions.
I call it like this
<br />
WindowPlacement Place;<br />
GetWindowPlacement(Handle, ref Place);<br />
Ok so there it is, the values return seem pretty absurd. Negative numbers 15 digits long and such, nothing I can make a mousepointer move to without errors. Anyhelp would be great.
jake
|
|
|
|
|
In C++, a long and an int are both the same size. Change the longs to ints in POINT and RECT, and the rcNormalPosition will become valid and accurate, I've just tested it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi
how i can make a stand alone c# windows application?
thanks
|
|
|
|
|
select the project type Windows Application in Visual Studio?
The only thing you need is the .NET framework
|
|
|
|
|
Hey guys;
I want to know how can I syntax colorize a textbox. Like puting a little squiggly MSword underline under a text or letter.
Any ideas please write.
Thanks
|
|
|
|
|
Two words - owner draw. You have to handle drawing something like that yourself, the textbox does not support it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Please search a bit yourself before posting. Searching for 'syntax textbox' here on CodeProject gives you an article which is no two days old.
|
|
|
|
|
I think in a textbox you cant do that.
A RichTextBox much better basic for it.
I think you can start if you read the RichTextBoxExtended in docs.
But I remember somwhere I find a code shomething like yorur wish, if I find it, post it to you.
|
|
|
|
|
Does anyone have any references on how to find out the mail settings on a PC using C# ? The program I'm working on needs to send emails and I'm hoping that I can get the mail server details and reply address from outlook withouth the user having to enter them.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Christain,
Can we look up the info in the windows registry? For example, in the key:
HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\
or somewhere in the user profiles
|
|
|
|
|
Outlook is not set up on this PC, so I can't check, but I'll look into that tomorrow. A registry solution would suit me, I'm worried about trying to connect to different versions of outlook.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I need an application that keeps record of process starts and closes in several computers, more exactly, a windows service. This is for monitoring computer use at my university and make statistics on who uses more what programme and whatnot.
I'm not sure how to do it, but I'm guessing it's with WMI, maybe an event triggered? I don't know for sure.
I only need to know when a process was started/killed/closed and what process it was, I can do the other features (not listed here) myself.
If someone can just give me a hint or anything it'd be great
Thank you very much
|
|
|
|
|
|
Still can't find anything related to the user-triggered start of a process, sure that says how my service can start a process, but not how to actually know when the user has opened, say, Visual Studio.
|
|
|
|
|
I don't know if you can write a system wide hook on every time a process is started. If I was going to do that, I'd do it in C++. However, failing that, there is a Processes property which returns all the processes on the PC - GetProcesses. I'd have hoped the link I gave you ( which is about creating diagnostic programs like what you're writing ) would offer a better method, but failing that, you can always poll running processes regularly, and work out which processes get started and stopped.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
In VS 6.0 there was a control for IP addresses. Is there not one in C#? Also how do I move the text of a group box over to the right with out it effecting anything inside of it. I'm not grouping anything together just using it to tell the end user what this section of controls are.
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
There isn't one built into the framework in .NET 1.x. However, it's quite easy to implement, several people already have done this, for example, this CP article[^].
Also, there is a masked text box built into .NET 2.0 that allows you to do things like IP addresses, phone numbers, zip codes, etc.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice
Judah Himango
|
|
|
|
|
Hi all,
I create a Web Service project called 'eSelectService' and another Class Library project called 'MonerisVO', and a Windows Form project called 'maps' as well.
The reason why I need the Class Library project is because I don't want to have more than 30 parameters when I try to invoke the Web Method. I used the class in Class Library as a value object to contain all the information I need.
Here is the problem:
When I debug the Web Service project, I add the Class Library project's output (Trans.dll) as a reference. Everything works fine.
But when I want to invoke the Web Service via my Windows Form project the compiler says "cannot convert the MonerisVO.ValueObject from eSelectService.ValueObject." So I remove the Trans.dll from the Windows Form project's references. But the new problem is I cannot see the methods in Trans.dll, even the overloaded constructor.
My guess is maybe I get some configuration options wrong.
Is there anybody has the same problem like me? Or is there any good ideas?
Please help me out.
Thanks a lot.
Grace
|
|
|
|
|
Hi all,
Here is the source code:
//Web Services
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using MonerisVO;
namespace eSelectService
{
public class GateWay : System.Web.Services.WebService
{
public GateWay()
{
InitializeComponent();
}
[WebMethod]
public string test(string host, Trans tr)
{
//Can invoke the method here in the Web Services.
return "host=" + host
+ ", order_id=" + tr.OrderID
+ ", amount=" + tr.TotalAmount;
}
}
}
//Web Forms
using eSelectService;
...
private void btStart_Click(object sender, System.EventArgs e)
{
eSelectService.GateWay gt = new eSelectService.GateWay();
eSelectService.Trans = new eSelectService.Trans();
trans.Init("order_id_test", "4.01");
MessageBox.Show(" result=" + gt.process);
}
//Class Library: Trans.class
...
public class Trans
{
private string order_id;
private string amt;
public TransactionVO(){}
public string OrderID
{
get
{
return order_id;
}
set
{
order_id = OrderID;
}
}
public string TotalAmount
{
get
{
return amt;
}
set
{
amt = OrderID;
}
}
public Init(string id, string amt)
{
this.orderID = id;
this.TotalAmount = amt;
}
}
|
|
|
|
|