15,893,668 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Stuart Nathan (Top 44 by date)
Stuart Nathan
9-Oct-12 13:18pm
View
What about MS Office? Can I do that at least?
Stuart Nathan
9-Oct-12 12:01pm
View
I am thinking of AutoCad, Word or Excel opening a file for read etc.
Obviously I can use COM, but this involves having different versions for different versions of Word.
I am also happy if an application does not return a file path.
I looked at the code but it is extremely complicated, and I really need to understand what it does.
I am also looking at Restart Manager (rstrtmgr.dll) but this is also complicated.
Stuart Nathan
22-May-12 13:23pm
View
Yes I also discovered this. However it was easier to change the declaration. Thanks anyway
Stuart Nathan
22-May-12 8:27am
View
I think the answer is because I used a System.Timer instead of a Windows,Form.Timer
Doing some investigation
Stuart Nathan
13-May-12 16:02pm
View
Yes I know this. But how to do this with say AutoCAD LT that does not expose its objects etc.
Stuart Nathan
13-May-12 13:16pm
View
Imagine any MDI Application. Click on the tab represententing a document/drawing/spreadsheet etc. This becomes the Active Document.
Stuart Nathan
18-Apr-12 13:03pm
View
Had a good look at this link, but it doesn't seem to address the advantages or disadvantages, despite saying so in its intro. Perhaps I misunderstood it. Can you help?
Stuart Nathan
11-Apr-12 5:43am
View
I need to remove the task associated with the eventlog entry.
Stuart Nathan
10-Apr-12 16:41pm
View
There is no code.
Just go to the Event Viewer
Stuart Nathan
10-Apr-12 10:11am
View
I have written a windows service that writes to an EventLog.
<pre>Private WithEvents omLog As System.Diagnostics.EventLog</pre>
and I can read these entries in then Windows Event Viewer application.
Control Panel>Administrative Tools>Event Viewer
I thought I would then try out in the Actions Pane:-
Attach Task To This Event
I asked it to put up a message box, which I no longer want.
How do I delete this task?
Stuart Nathan
25-Nov-11 12:53pm
View
I wanted to ACCEPT solution. I only see REJECT.
I also guessed it was about permissions, but I would have thought that c:\ was permitted to everyone. Thanks for that.
Stuart Nathan
24-Nov-11 6:55am
View
OK. My Class is designed to be "inprocess" to AutoCad and sets up various tools to be used inside AutoCad.
I still cannot debug my class by telling VS to start external programme.
But I have discovered how to at least get the AutoCad process to attach.
Now I can at least step through.
But why does it fail here.
Dim objWriter As New System.IO.StreamWriter("c:\debug.txt")
objWriter.Write(a)
objWriter.Close()
error message is:System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access to the path 'c:\debug.txt' is denied.
Stuart Nathan
23-Nov-11 7:18am
View
I'm not that clever, and I don't understand Interop.
What I did was this.
In my AcadClass, (written in VB / VS2008 ) I added a reference to an Autocad dll - acdbmgd.dll
VS Properties description is "Implementation of the ObjectDBX .NET Managed Wrapper"
However it was not under the .NET tab
The object browser shows all the properties etc.
It compiles correctly.
Stuart Nathan
25-May-11 6:06am
View
Thankyou for your trouble. I also don't understand it, but it does append and not over-write.
So I have gone back to first principles and I now read the file and write it back.
Thanks again.
Stuart Nathan
24-May-11 7:56am
View
Private Declare Ansi Function WritePrivateProfileSection Lib "kernel32" Alias "WritePrivateProfileSectionA" (ByVal Section As String, ByVal Text As String, ByVal FileName As String) As Int32
Stuart Nathan
24-May-11 7:34am
View
Because ini files caqn be easily read by Notepad and editted.
XML files are not so easy to edit, and neither is the Windows Registry which Microsoft recommend.
Stuart Nathan
20-May-11 18:39pm
View
I don't understand why you are so rude. I am sitting here on my own, trying to learn how to programme properly, and one way is to ask questions. Normally people who answer questions tend to understand the level where people are - after all, if we were all as clever as you, there would be no need to ask our questions. All you do is to put me off returning to the site.
As for 3 or 5, frankly I don't care as I don't actually understand how it helps. Experts Exchange, which I used to use before it became so commercial, at least allowed you to use your points to ask further questions.
Stuart Nathan
19-May-11 6:14am
View
Had a quick look, and although this seems the correct answer, it does look too complicated for me to get my head around. I also didn't get how you release the memory when the last app closes.
Stuart Nathan
18-May-11 13:04pm
View
eg.
App1 loads AutoCad
App2 is loaded as internal process to AutoCad
App3 is a windows service keeping time.
I don't understand middle layer class?
Stuart Nathan
18-May-11 13:02pm
View
Yes I know. I had already mentioned that in my Q.
Any other ideas?
Stuart Nathan
6-May-11 11:18am
View
I should explain that Autocad only loads external apps. It does not automatically execute them.
Stuart Nathan
6-May-11 11:16am
View
I have had a look at your solution above, and it is too complicated for me to understand. My own experience is to program simply. (I am not a professional programmer).
As I wrote earlier, I am trying to talk to AutoCad of which there are many releases with varying object models etc.
I have two problems.
The first is to attach my application to AutoCad and to run an application loaded into Autocad. I am using GetObject and CreateObject to do so (with some difficulty - I don't know why), but I could use late binding and define an Object. As long as I can send a message to Autocad to execute the internal application.
The second problem is to write an application (APP2) that can be independant of APP1. I have decided thanks to your posts, to revert to what I used to do which is to write and read files or the Windows Registry to communicate. (There is not much data required to pass).
The second problem will need recompiling for every version of Acad. But loading the correct version is simple, as AutoCad looks at the windows registry to see what additional apps it needs to load.
Reading the posts, it seems to me that there is a whole discussion to be had about whether keeping solutions simple or using the latest technology. My own view is not to trust technologies I don't fully understand or (more importantly) control. What if Microsoft decide not to support or change a technology?
It would be nice to know your views.
Stuart Nathan
6-May-11 3:54am
View
Please see my comment to Willempipi
Stuart Nathan
5-May-11 12:27pm
View
Yes you are correct, but APP1 would really like to access AutoCad, but AutoCad comes in many versions. People do not automatically upgrade to the latest release because it is so expensive. Although it is now R2012, many are still using R2000.
So I thought that APP2 could deal simply with AutoCad, and be recompiled for the various different flavours. Which APP2 I use is still something in the future.
Stuart Nathan
5-May-11 12:24pm
View
I had never heard of WCF so I looked it up and I believe WCF is new to Framework 4.
I am using 3.5
Stuart Nathan
1-May-11 15:11pm
View
OK. I dare to come back to my question.
The original question said that I wished to slide the control away, not show and hide it.
Nishant understood this by suggesting a timer.
Now to be fair to everyone, I didn't truly understand the problem and I mislead you and myself.
If I remove the form paint, then it slides nicely.
So it is the painting of the form that causes the problem.
I admit that I do paint the form, which is why all the controls have a transparent background.
I try to prevent the repaint by having a variable set True when the slide event happens which causes the paint event to exit quickly, but this doesn't work.
Is there any way I can 'fix' the form while the sliding occurs?
Stuart Nathan
26-Apr-11 3:25am
View
The vote button on the solution
Stuart Nathan
25-Apr-11 16:00pm
View
I'm sorry, but do you expect me to download the application Sharp Development?
I'm used to Visual Studio. (Actually VB, but that's OK)
Stuart Nathan
25-Apr-11 13:39pm
View
Listview (first) code above shows Me.AllowDrop = True
Should the form it is on also be set true, although I have tried all combinations.
Stuart Nathan
25-Apr-11 13:22pm
View
OK. I am not asking you to hold my hand.
But why point to websites that either don't load or don't point anywhere helpful.
Which CSharp library do you mean?
Come on.
I did a lot of searching on the web before asking the question. Nobody seems to know the answer, so I guess neither do you.
Sorry to be so critical.
Stuart Nathan
24-Apr-11 17:26pm
View
The whole idea is to do it myself.
I know this might seem stupid, but programming is a hobby and I want to learn more.
Using someone else's dll doesn't do it for me.
Sorry.
Stuart Nathan
23-Apr-11 11:35am
View
I tried to simplify the question and I'm sorry.
In fact I am using a timer.
The form is quite complicated, and I guess it repaints as it slides, despite my using SuspendLayout and ResumeLayout.
Visual Studio Solution Explorer panel though is quire complicated, so ....
Stuart Nathan
23-Apr-11 5:47am
View
Sorry. I pressed a key and found I couldn't go back and edit.
Perhaps you could explain how to.
What are they used for?
Stuart Nathan
22-Apr-11 11:14am
View
Actually one of the controls did raise the event, but not the other.
Still it seems to be working - so a big thankyou!
Stuart Nathan
22-Apr-11 11:05am
View
I have had a look at the form on which these controls are placed and yes
KeyPreview=True
I have set it to false and debugging.
Stuart Nathan
22-Apr-11 8:39am
View
KeyPreview does not seem to apply to a control - only a form.
Stuart Nathan
15-Apr-11 4:14am
View
I looked at the articles and got a bit lost.
A little bit of code would help.
Thanks
Stuart Nathan
11-Apr-11 6:51am
View
No point in posting code, as VB doesn't get to Sub New() before executing another application which I see on Task Manager.
Is there any code executed before it gets to my code?
Stuart Nathan
10-Apr-11 18:21pm
View
Actually yes in code using FileAttributes - it returns Normal. Also properties are NOT read-only. I thought AutoCad locked files using .dwl files, but they aren't there.
Stuart Nathan
10-Apr-11 11:03am
View
I understand, and I have been right through the manual which by the way, is nowhere near as comprehensive as the R2000 manuals, and I get no help for my problem.
Stuart Nathan
10-Apr-11 10:57am
View
Finally, the code you point to is for acdbmg.dll, and that assumes your inProcess. I am using Autodesk.AutoCAD.Interop.dll
Stuart Nathan
10-Apr-11 10:55am
View
I remarked the first .Documents.Open in the getobject successful and the drawing fn had not been loaded because acadApp = CreateObject(ProgId) raises the error.
However it is a strong possibility that Autocad has locked the file, except there is no .dwl file present.
Also, I don't understand why Acad is in Task Manager - indeed I saw the Markup Set Manager for a moment.
Stuart Nathan
9-Apr-11 10:55am
View
Actually it is not a good answer, because it still doesn't work.
Stuart Nathan
23-Mar-11 11:22am
View
0) Yes
1) No
2) My code and running o0n any CPU
Show More