TheSwamp

Code Red => .NET => Topic started by: matinau on March 14, 2013, 12:42:23 AM

Title: Cross hair disappearing?
Post by: matinau on March 14, 2013, 12:42:23 AM
I have an application that creates viewports and applies an associated named view. Everthing works perfectly accept
the cross hair randomly disappears after viewport / setview creation? Any thoughts? It's got me stumped :-(

Title: Re: Cross hair disappearing?
Post by: huiz on March 14, 2013, 04:44:03 AM
It happens sometimes in Civil3D too, after a selection or a dialog. Only thing that helps is switching to Model or Paper and back. Programmatically you could try things like:

Autodesk.AutoCAD.ApplicationServices.Application.UpdateScreen()
Autodesk.AutoCAD.Internal.Utils.SetFocusToDwgView()
Title: Re: Cross hair disappearing?
Post by: matinau on March 14, 2013, 07:21:08 PM
....ah, so simple!!!! On initial tests your fix seems to be working

Thanks so much Huiz
Title: Re: Cross hair disappearing?
Post by: matinau on March 14, 2013, 08:10:23 PM
doh...the cross hair still disappeared? Thought you'd cracked it earlier
Title: Re: Cross hair disappearing?
Post by: Jeff H on March 14, 2013, 09:05:37 PM
This would be a complete hack, but I had the same problem in just vanilla version and was not from any code, but here (http://www.theswamp.org/index.php?topic=40148.msg454119#msg454119) Jeff_M gave me a tip and it might have been from the control changing the cursor to arrow and back that made crosshair reappear.



To mess with a guy I worked with I wrote some code that changed the cursor to a penis.
If you want me to I will try to see if I can find it and will leave the penis part out.
Title: Re: Cross hair disappearing?
Post by: WILL HATCH on March 15, 2013, 12:29:35 AM
To mess with a guy I worked with I wrote some code that changed the cursor to a penis.
If you want me to I will try to see if I can find it and will leave the penis part out.

you mind posting that?

I can think of someone who deserves it...
Title: Re: Cross hair disappearing?
Post by: matinau on March 15, 2013, 06:47:33 AM
Thinking my problem could be a graphic card issue? Doesn't seem to happen on my colleagues pc?

:-o penis cursor!!! that could go viral, post away, definitely have some peeps in mind for that one
Title: Re: Cross hair disappearing?
Post by: Jeff H on March 15, 2013, 11:38:12 AM
I got it somewhere and will dig it up.
Title: Re: Cross hair disappearing?
Post by: WILL HATCH on March 15, 2013, 12:39:57 PM
I got it somewhere and will dig it up.
Can't wait...
:whistle:
Title: Re: Cross hair disappearing?
Post by: Jeff H on March 15, 2013, 01:53:55 PM
It must be on my old laptop and will get in it this weekend and find it.


Until then this might help IFart (http://www.theswamp.org/index.php?topic=42469.msg476660#msg476660)
Need to update it to keep number clicks persistent between sessions but that would be easy.
Title: Re: Cross hair disappearing?
Post by: Jeff H on March 19, 2013, 12:46:36 AM
I can't find and I thought I it was function from COM/ActiveX API that let me set to cursor to a image file. Maybe it was a transient graphic that followed the cursor but worth redoing so unless anyone has better idea will throw something together this week or weekend.



Title: Re: Cross hair disappearing?
Post by: WILL HATCH on March 19, 2013, 12:51:25 AM
that would be epic.  With April first around the corner I can see a good use for it.
 :lmao:
Thanks Jeff! 
Title: Re: Cross hair disappearing?
Post by: Jeff H on March 20, 2013, 10:08:28 AM
Sorry for hijacking the thread, and now I think I see how I did it and was set system wide but set and removed in AutoCAD.

By the way it is hard to give a good explanation when a big project is in a rush to get out and someone walks up on you and your drawing a penis.
I am sure the old style out of date editor in Visual Studio for cursor files also gave added a extra level of creepiness to it.
Title: Re: Cross hair disappearing?
Post by: WILL HATCH on March 20, 2013, 10:40:05 AM
I think I'll try to combine the random farts with the penis. The fart could trigger a toggle on the penis. Thanks for the inspiration jeff!