|
GeoVx1234 wrote: Does anyone know if i can import vrml from .net using c#
Define "import"
|
|
|
|
|
I've created a 3d terrain using elevation grid in vrml. I'm asking if this .wrl file can be loaded/seen/processed with Visual Studio .NET using c#.
Geo
|
|
|
|
|
Hi
I want to grab frame from a stored video and using GetBitmapBits() method of MediaDet class
<br />
md = new MediaDetClass();<br />
md.Filename = fileName;<br />
md.CurrentStream = 0;<br />
<br />
IntPtr bufPtr = IntPtr.Zero;<br />
int bufSize = 0;<br />
md.GetBitmapBits(0.0, ref bufSize, bufPtr, width, height);
but here I m getting error with third argument."cannot convert from System.IntPtr to 'ref byte'"
Can any1 help out that how to solve this?
Regards
Shanzay
|
|
|
|
|
Check this[^] out.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Bitmap bmp = new Bitmap(800,600,PixelFormat.Format24bppRgb);
Graphics objGraphics = Graphics.FromImage(bmp);
Rectangle rect = new Rectangle(50,30,600,480);
LinearGradientBrush brush = new LinearGradientBrush(rect,Color.Black,Color.Bisque,LinearGradientMode.BackwardDiagonal);
SolidBrush objSolid = new SolidBrush(Color.Red);
objGraphics.FillRectangle(brush,rect);
objGraphics.DrawString("Hello world",new Font("Curlz MT",78,FontStyle.Bold),objSolid,50,30);
bmp.Save(@"c:\my.jpg",System.Drawing.Imaging.ImageFormat.Jpeg);
bmp.Dispose(); I am learning GDI+, I wrote the above code to generate a image with some text specified.
1 - Is there any way to give shadow for the text ?
2 - Is there any way to style the text other than changing font ?
|
|
|
|
|
Here[^] is an example of a drop shadow.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
|
Hi,
I am facing some isues while implementing a simple logic.
Let me explain you my requirement. Its a simple thing which many people must have done numerous times before me.
I've a hardware connected to my system which needs constant monitoring. It has a specific query command which needs to be sent to it in order to get information from it. The information I get from it needs to be updated on the user screen.
Given this, I am trying to use the Backgroundworker to constantly query the hardware. It works fine. However, the screen doesnt reflect the changes sent by the hardware. It continues to show the same previous state of the hardware on the screen. But, if I add a Thread.sleep value of about 1050 (minimum), then the changes are updated on the screen immediately.
My issue is that the hardware is extremely fast in sending different data to my system which my application must handle and update the GUI at the same pace.
I'll be really obliged if someone could suggest a simple and efficient way to tacke this issue.
Thanks.
Ateeb
|
|
|
|
|
are you taking into consideration the cross threaded affair in this case.
since your textbox control or any control on screen is on main thread and you are updating it from some other thread.which can be done through delegate callback
AMIT
|
|
|
|
|
All that is taken care of.
My main issue remains that of updating the screen with the most recent information from the hardware, which is being thrown in @rate of 10ms.
|
|
|
|
|
I would assume your updates come so fast that the GUI just doesn't have the chance to update itself.
I would suggest you store the updated informationen in some safe place and let the GUI poll for the info (via Windows.Forms.Timer) every 1 second. This way it doesn't get updated so often while ensuring that you don't miss any information from the hardware.
Robert
|
|
|
|
|
Hi,
how are you controlling the repetition rate?
regular .NET timer classes are not good enough to create a 10 msec delay or interval,
you may want to read my timers article.
one possibility is you are getting data more rapidly than the PC can update the display,
if so you should consider:
- a cheaper way of visualizing things (a smaller number of simpler controls); try a
Label or TextBox to just show the last value received, just for checking...
- a reduced frequency, say showing only every other reading.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hello,
I have a string array {"AAA","BBB","CCC","DDD"}.
I want to be able to print the items in the string[].
I want to be able to send the string[] to a function and the function will print:
AAA BBB CCC DDD
BBB CCC DDD AAA
CCC DDD AAA BBB
DDD AAA BBB CCC
Thanks
Itzik
|
|
|
|
|
Homework?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
just study the pattern in which these strings are to be written u'll definately get the answer
Amit
|
|
|
|
|
Hello all,
I'm using a webclient class to download a file from some website
so my code is
Webclient webobj=new Webclient();
webobj.DownloadFile("http://www.codeproject.com/into/stuff/cp_bg_black1024.gif",@"c:\MyFiles");
the problem is that it gives me an exception stating i dont have access rights to my folder "c:\MyFiles" i tried enabling access rights to this folder to everyone giving fullcontrol but yet its not working.
Can anyone suggest me a solution to this.does anyone know whats causing the problem.
the detailed error is as follows
System.Net.WebException: An exception occurred during a WebClient request. ---> System.UnauthorizedAccessException: Access to the path 'C:\mydata' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
--- End of inner exception stack trace ---
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at System.Net.WebClient.DownloadFile(String address, String fileName)
at Autdownloadingfile.Form1.btnAutoDwnld_Click(Object sender, EventArgs e) in C:\downloadingfile\Form1.cs:line 33
AMIT
|
|
|
|
|
Hi,
I'm working on a plugin for Outlook, which will allow the user to save their emails into a central repository where it will be accessible from other places, such as a web page. And I'm pondering in what format I should save the emails. Currently I'm using the .msg file format, but there are some problems with displaying it in a web page.
Does anyone have any experience with doing this? I tried saving a mail message as HTML, but apparently that isn't supported unless the mail itself was originally in HTML format.
This is an example of the way I'm doing it currently:
MailMessage msg = ...
String strFilePath = Path.GetTempFileName( );<br />
msg.SaveAs( strFilePath, OlSaveAsType.olMSG );
Simply changing from olMSG to olHTML wasn't working, at least not in all cases.
But as I said, using the MSG file format would be OK if the mail would then display properly from a web page, but there does not seem to be a universal way to open .msg files in a web browser. Or is there? What mime type should I use for .msg files, in order to display properly in web pages?
Regards,
Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
How can I calculate number of executable lines only of a C# source code?
Essam
|
|
|
|
|
A quick google search returned this[^] item.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: A quick google search returned this item.
Where can one find this quick Google?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Luc Pattyn wrote: Where can one find this quick Google?
Forsooth sirra, it doth depend on your network connection. Yea verily.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I have a messagequeue, that was created from a VB script. My C# code has to change the permissions on that queue, giving Domain Admins full control, and revoking access for the current user (which was the creator of the queue).
After running the code, Domain Admins has full control, but the current user (who is a member of Domain admins) gets an access denied when viewing the queue properties via MMC. The user can delete the queue via MMC however.
If I let the code only add Domain Admins, and I remove the current user ACE using MMC, the user can still check the queue properties. This is afaik the expected behaviour.
I am using queue.SetPermissions with entrytype AccessControlEntryType.Revoke. Documentation says this will remove ACE's for this user (both denies and allows).
Why can't the user view queue permissions (yet delete the queue is allowed) when I revoke the user's permissions, while the user is a Domain Admin (which has full control)?
|
|
|
|
|
How can i get a list of class methods from .cs file?
Essam
|
|
|
|
|
Is this from the actual .cs file or from a class when an application is running. The answer is different, depending on the scenario - in a running application, you would use
MethodInfo[] methods = typeof(MyClass).GetMethods(); In the .cs case, you either need to parse the file manually or use Visual Studio and the EnvDTE classes.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I need to get all methods from a class in a file (not in rum time), i think that i should use CodeDom namespace for that, but i don't know how o use it for this purpose.
if i should use parsing, how can i distinguish between methods and declairing variables
Essam
|
|
|
|