
Talyrond
Avatar/Signature-
Posts
38 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Talyrond
-
Heres how I solved this problem in my app. In the constructor of my Direct3D control, I hook up the� DeviceResizing� event AddHandler Me.Device.DeviceResizing, AddressOf CancelResize And the CancelResize sub: Protected Sub CancelResize(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) 'If the window is to small or minimized, cancel the resize event to prevent crashing. If Me.Width = 0 OrElse Me.Height = 0 Then e.Cancel = True End If End Sub
-
I have a bootstrapper setup so MDX is now a prerequisite, see the link: http://www.gotdotnet.com/workspaces/workspace.aspx?id=7e8e8cbd-b447-4a9d-a984-9379d1a0c190 From memory I had a bit of work to get it going, but it works well and will install DX9.0c and MDX if needed.
-
drawing line without invalidating whole screen
Talyrond replied to msmeth's topic in Graphics and Multimedia
You may want to take a look at this thread on another forum: http://www.vbcity.com/forums/topic.asp?tid=95435 Download the last Rubberband project I did. As marble_eater suggested unless you are drawing more than 3-4 thousand lines I would redraw all the lines every time. Always avoid using CreateGraphics, you will never get flicker free graphics. -
Finding a free lance graphics coder
Talyrond replied to Mick Dugan's topic in Graphics and Multimedia
I think Bob Powell offers consultancy: http://www.bobpowell.net/ -
Not sure if this is what you need: If Me.DesignMode Then MessageBox.Show(" I am in design mode!") End If
-
Depending on what you are doing, I think doubles are the way to go, all computational geometry is performed with doubles, all be it in C or C++. But that does not matter. I guess you are hitting floating point arithmetic errors, I spend a lot of time dealing with this issue! It�s something that has to be dealt with I�m afraid.
-
Theory on creating an EOB like graphical engine
Talyrond replied to EFileTahi-A's topic in Graphics and Multimedia
Looks like OpenGL would do the job: http://www.csharpopenglframework.com/ -
Back to OPenGL, if it's your thing, then you may interested in this: http://www.devdept.com/code/oglf/index.php I have ported to VB as well, it's real easy to use the OPenGL.cs file as a class library in vb. Enjoy Talyrond
-
Not sure if this is what you are looking for: http://blogs.msdn.com/mharsh/
-
If performance is an issue I would use a profiler, you will be amassed where bottle necks occur Talyrond
-
Just a point of interest, performance is a real issue with my CAD system, I have spent many an our deliberating over what perform better. The day I tried out a performance profile (I use ANTS profiler) it was a revelation, I kid you not, with in two hours I saw a 15 fold increase in speed in a key area. You can hone in on bottle necks, you will be surprised what sort of thing cause performance issues. If you are serious about performance, you need a profiler.
-
Need help implementing GDI drawing in .net
Talyrond replied to qmp's topic in Graphics and Multimedia
gmp, I dont know what you requirements are for your app, but I would guess that GDI+ is more than adequate. I would recommend checking out this link and the whole site: http://www.bobpowell.net/manipulate_graphics.htm Have a look and then decide what approach you want to take -
Thanks for taking the time to look at my problem Iceplug. Yes that sounds like a viable solution, good idea! I know you have a lot of experience in this field, so would you say that I have used the matrix correctly and that the effect I am seeing is just a limitation of GDI+, that�s my real worry, my package will making extensive use of them so I don�t want to be coding with sub standard techniques, that I need to re do later! Cheers Talyrond
-
Hi all I am programming the zoom on by CAD system. The problem I have is when I what to zoom in on very small primitives. I have attached a small project to demonstrate, the program draws a horizontal line and scales it to fit with a 10 pixel border. If you change the m_startX and/or the m_endX to any value you want you will see that the line scales as expected When the line is 0.00059 in length or smaller it will not be drawn, for example if you had: m_startX = 0 m_endX = 0.0005 So my question whether I am using the Matrix transformation correctly? Or have I hit some sort of limit. I know that I am talking about very small numbers, but I will be working with these sorts of sizes. I have a couple of ideas to work around this but I am interested in what is really going on, so I have a better understanding. Any help would be appreciated, I am struggling with this one. Cheers! Small Units.zip
-
Hi, unfortunately GDI+ cant take advantage of any hardware acceleration, you have to wait for Avalon for that, so that leaves DirectX which you have tried. If you are developing a commercial app you may want to take a look at : http://www.vgdotnet.com/ But of course there are $$$! involved
-
Have you tried using the Anchor property of the text box? If you anchor to the right I think this may be what you are after
-
Hi, yes this is possible, see the attached project I did as a test for myself a while ago. Basically there is an exe (unmanaged, but that does not matter) embedded, called text.exe. When you run the project it will extract the exe to the same folder as the project exe and then run the program. Just to satisfy yourself, delete the test.exe and it will be created every time! Test.exe just prints a message to a command window, please excuse the message, it is not directed at you, just my sense of humour!! Hope this helps Embedded.zip
-
Hi fguihen again, I do not have any experience with threads, but could you have a variable that has global scope, that�s shared in VB is that static in C#? not sure. Could you set this variable in the onPaint and pass the global graphics variable to your draw method, just an idea. Another thing have you got flicker free drawing without threading? It would be a good starting point and make sure that you don�t have a problem else where?
-
Hi fguihen, CreateGraphics is not bad, it has it�s uses but for drawing on double buffered controls, it�s ain�t no help! A bit of bedtime reading for you: http://www.bobpowell.net/creategraphics.htm OK C#, I�m a VB man so I will try and use C#, hope the syntax is correct! protected override void OnPaint(PaintEventArgs e) { this.DrawToScreen(e.Graphics); } As you have overridden the OnPaint method I assume you are doing all your drawing here? If so (if not this is where you should be!) as you can the graphics object supplied by OnPaint, is being passed to your draw method. Let me know how you get on Talyrond
-
Hi, typically when moveing controls around at runtime, you would not animate the whole control, but rather draw a rectangle to represent the control and only on the mouse up redraw the control. Try it in the Visual Studio designer! I did a sample for another forum, this moves a Listbox around at runtime with the mouse, project attached. Hope this helps ListBox.zip
-
Are you using the graphics object supplied by the OnPaint method? and not the dreaded CreateGraphics!
-
I tried you code and as you say it does not work, I suspect this is because you are using the load event to draw and the timing is such that the line is rubbed out before the form is properly loaded. You should do all you drawing in the paint event so: Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint Dim myPen As New Pen(Color.Red) myPen.Width = 2 e.Graphics.DrawLine(myPen, 0, 0, 100, 100) myPen.Dispose() End Sub Notice I am using the graphics object supplied by the paint event, do not use CreateGraphics! Hope this helps
-
Why not create the rectangle directly in the function, you will have no issues with memory using this method. drwLineSection.FillRectangle(LineHatch, New Rectangle(l(0), t(0), w(0), h(0)))
-
Hi very interesting, like you say setting frm2 to null does not kill the form, its there to be seen! But stepping back a bit to the first piece of code, as you create each form, you are not loosing them, you would use the Activate event to access each instance of the form, so in other word each instance will activate its own Activate event when it gets the focus. Of course if you needed to work on a form that did not have the focus you would have to store a reference to it when you created it. So my best guess as to what is keeping it alive, would be your Number 1) because of the Activate event!