Jump to content
Xtreme .Net Talk

Menge

Avatar/Signature
  • Posts

    108
  • Joined

  • Last visited

Everything posted by Menge

  1. if u got another file is because u pointed to another file. the webclient class downloads text files from a server too as long as they're public.
  2. well the way found the simplest to solve this is to have an app running in user space monitoring a folder and the service saving a file to that folder... so the app in user space would execute the code instead of the server-side one. you could take this a step further by adding some sort of communication between them but i think it's plain overhear :)
  3. the simple way? you may want to use the WebClient class in System.Net to download the file. it's very helpful. from that on its either using the byte[] array or saving to a file on disk and using it later on :)
  4. the web service is run as a webservice on the HOST computer. services no not interact with user sessions. so the program IS in fact running... just not on your user. but on the service user.
  5. ye from what i know the device back buffer can't be A8R8G8B8. if you need an alpha value on a rendered surface, that surface can be A8R8G8B8 but the device back buffer can't
  6. i think lilgirl wanted to know how to know when a file is opened or locked by another application
  7. hmmm the way i think to do this is, have the printers installed (local or network) on the server that's hosting the app and make the asp page use the System.Drawing.Printing classes to handle enumeration and printing. so it'd be like: user uploads document to server along with a selected printer, server opens thedoc and prints it using those printing classes. but the printer has to be installed in the machine running the application. never tried that, but could work, yes :P
  8. System.IO.File.Move() move the old filename to the new filename :)
  9. oookie :) then i guess just closing the solution and re-opening it should do too
  10. one sure way is deleting the old dll from the build directory and from the reference and adding it again there might be a better way to do this :P
  11. yes, that's calling unmanaged code, if that's what u meant.
  12. well you might want to read my 3 option post again. the code's all there.
  13. ok, glad this was solved for ya. next time, try to be more concise and clear on what you are asking. doing so usually gets questions answered quicker :)
  14. your code is a bit weird. there's no GetFrontBuffer function in the Device class. ur not being quite clear to me, so i'll give out the 3 options that i understood. 1) if you want to copy the screen of what was last rendered right? if that's so, all you need to do is: Surface FrontBufferCopy = Device.CreateOffscreenPlainSurface(WIDTH, HEIGHT, FORMAT, POOL); Device.GetFrontBufferData(0, FrontBufferCopy); // according to the documentation, now FrontBufferCopy has a copy of the Front Buffer 2) if you want to copy the contents of a surface to another one, you may use the Device.UpdateSurface(source as Surface, dest as Surface) method. 3) if you want to actually render to a surface, then follow on below :) to create a plain renderable surface: // to create the surface Surface RenderSurface = Device.CreateRenderTarget(WIDTH, HEIGHT, FORMAT, MultiSampleType.None, 0, true); to render to that surface: Device.SetRenderTarget(0, RenderSurface); // whatever you render between the BeginScene() and EndScene() calls WILL end up on RenderSurface to go back to the original backbuffer while keeping what was rendered on the old buffer: Surface BackBuffer = Device.GetBackBuffer(); Device.SetRenderTarget(0, BackBuffer); // whatever you render after this will end up on the backbuffer i hope ONE of these 3 will help ya out
  15. what do you want to do afterall? - Surfaces cannot be applied as a map on polygons. Textures are there for that. - Textures are composed of various levels which can be retrieved as Surfaces. to render to a Surface, just do Device.SetRenderTarget(0, SURFACE); - The only Textures that have Surfaces that can be rendered to are the ones created with the RenderTarget flag - These being said, to render to a Texture, u get the Surface of a level and render to that surface. btw, the last post showed how to render to a texture.
  16. i wish i had the safe memory management of .Net with the power of the memory management in C++ and the productivity of C#.... THEN i'd move to C++ :P what can i say? pointers rock! BUT writing 15 lines of code to create a window? what's that? :P
  17. if that surface belongs to a texture, you can just go surface.GetContainer() to get the texture that contains it. from what i know, to render to a texture u must create a texture, then get the level of the texture u want to render to (which would be a surface) and then render to that surface. that results in the texture containing the surface containing the render. as in // being "display" the D3D Device // and being "renderedTexture" created with the RenderTarget flag Surface renderedSurface=renderedTexture.GetSurfaceLevel(0); display.SetRenderTarget(0, renderedSurface); // do render here // clean up if needed after rendering, if you set the render target back to the backbuffer (Device.GetBackBuffer()), then you can set the "renderedTexture" object to be a texture for a primitive and voilá :D
  18. i don't think those mean 3d surface (the bitblt for sure doesn't). i think u'd have to go by "hand" here.
  19. replying to #1, you could use a displacement map. this'd require hardware support (DirectX 9 video cards only) or eventually if you can't accomplish that, you could just go around a dense plane and go setting the vertex's heights one by one based on the pixel color of the image at that correspondent point. like parsing the image to the vertex buffer manually
  20. true. the thread ones work fine :P
  21. hrm technically you can't do it directly. at least i haven't found a way to. if i'm not mistaken that's one of the goals of the "Panda DirectX Exporter" plugin for max. but i don't recall a current build doing it.
  22. hmmmm Bitmap b = new Bitmap(Width, Height); is that what you want?
  23. to send the printscreen key SendKeys.SendWait("+{PRTSC}"); to retrieve a Bitmap from the clipboard, you can do this Bitmap screen=(Bitmap)Clipboard.GetDataObject().GetData(typeof(Bitmap)); now all you need to do is put it together with the right error checking :)
  24. then one (kind of dirty way) to do it is send the printscreen key and afterwards copy the screenshot from the clipboard.
  25. hrm... you could both use the BitBlt API function OR simply send the PrintScreen key through code and grab the bitmap from the clipboard :)
×
×
  • Create New...