|
I don't think you're right. Did you try to impliment what I suggested to you this morning ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi Graus,
Yeah I have implemented a program which reads my file byte by byte and shows them on a richtextbox...and i did get ur point of shifting but i dont know how to shift the values by 4 (as I am reading byte by byte, becos i have to use 2 bytes of data at time). I think if I get tht shifting, I can implement this conversion program in full.
One more doubt can I use the BitmapCreate function "CreateBitmap" in c# for creating new Bitmap for this data. If so should I have to copy all the data tht i read from previous file into an array and then pass it as the data pointer to this command...
thanks,
Suman
|
|
|
|
|
Hi Graus,
thanks for ur ideas.... and atlast I am almost done with my program (but i don't know whether it gives correct image or not). I am not getting your shifting thing. See we are having 2 bytes of data for each pixel naaa... in which first byte consists LSB bits. and in the next byte we are having MSB bits (does in this byte the first four MS bits are our data or the last 4 LS bits are our data). By shifting... wht kind of shifting are u suggesting... either circular shift(left or right) or just left/right shift of 4 values. after shifting which byte should we have to take (first byte or second byte) after shifting wht happens to the padded values or intial 4 bits. All these doubts are there in my head . Plz, help me out in this and I dont ask u again on this
Suman
|
|
|
|
|
Hi Graus,
Thanks for ur advices and I have done this conversion atlast by using a LUT for (4096 to 256) and will this produces a nice image or not?... actually first of all i read the data in byte format and look over it and it seems pretty much the same as i said the LSB bits in first byte and in the second byte the upper nibble are zeros and the lower nibble is consisting of remainin four bits. Wht i did is i read both bytes at a time and used the value of first byte to add with the calculated value by using the four lower bits of second byte like (Bit0*256+Bit1*512+Bit2*1024+Bit3*2048) which gives me a value ranging between (0 - 4096) and then i used the LUT for getting corresponding greylevel in (0-255) range. Can u tell me whether I am right or not?...
thanks,
Suman
|
|
|
|
|
I have no idea, how does it look ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
can anyone please tell me how to make toolbars and menues looks like those of Windows XP, i managed to to repaint the form (Graphics g=this.CreateGraphics();
Brush paintingBrush=new LinearGradientBrush(this.ClientRectangle,Color.FromArgb(243,244,247),
Color.FromArgb(239,236,213),0.0f);
g.FillRectangle(paintingBrush,this.ClientRectangle);
paintingBrush.Dispose();
g.Dispose();)
but no paint events for menues or toolbars to override or backColor to set transparent
please help.
thnx
Mr.Cooper
C# beginner
|
|
|
|
|
You need to search this site using the text box directly below the top logo on every page. There are several articles on this site that discuss the topic and provide sample code.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
LOL. Heath
Its amazing how hard it is teach a newbie to use a search engine. Finally when it "clicks" its like: "WOW". LOL.
|
|
|
|
|
i'm trying to write a prog that would sit between a client email program (outlook. etc) and the actual email server. it's something like a prog that would intercept all incoming and outgoing mails (POP3 and SMTP) for filtering purposes. i've search all over the web and i couldn't find anything that could help me get started.
so is there anyone who could at least guide me to somewhere so tat i could get started? maybe some code samples or maybe "how to" tutorials or anything.
is it possible if i were to create a prog that would "relay" communication between the email client end the email server? if that's possbible then how do i do it? i know how to go around with a web proxy and a ftp proxy but i just can't seem to figure out pop3 and smtp proxy. so if there's anyone who could help .. i would really appreciate it. i've practically search all over the web for this and i've havent found any yet. thanks
|
|
|
|
|
What you probably need to do is implement a program that provides a pop3 server locally on your computer, that your email client can connect to.
When your program gets a connection, it'll transparently connect itself to whatever the real mailserver is, and pass through any commands from the email client to the real server (and back again)
Once you've got this working, then you'll be able to add code that examines the incoming mail, and does whatever filtering you require.
Try searching google for "pop3 protocol" for lots of info on how pop3 works (and searching for pop3 here gets plenty of articles too)
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
my application consiste of a main form with main menu from this menu i open another forms with (ShowDialog) after closing this form i want to dispode and release the memory used by it , but using memory profiler i noticed that this child form still in memory because it is refrenced by a ThreadStart object
NOTE : i have disposed all member variables of this form and it is really released but how can i dispose thread or threadstart object
please help me
|
|
|
|
|
did u use the abort function to end the thread?
|
|
|
|
|
yes i use it but it does not work
|
|
|
|
|
With controls unless you're deriving your own you should not manually dispose resources. If you read the documentation for the Form.ShowDialog method, you should notice that you do need to dispose the form in order to dispose of its message pump. An easy way - even in case of an exception - use the using block statement:
using (MyForm form = new MyForm())
{
form.ShowDialog();
} If you don't dispose your object - which will dispose all its child objects that it knows about - when you use a modal dialog (using ShwDialog ), the unmanaged memory will not be released (which is why it's called unmanaged resources).
If you're having problems with threads, make sure that you're only updating controls (like setting the Text property or adding a ListViewItem to a ListView ) on the thread on which the control was created. See the InvokeRequired property and the Invoke method documentation in the .NET Framework SDK for more information and examples aobut how to use them.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi all,
I would like to program the following in Internet Explorer
by C# : add a menu item in the context menu when right click a selected text section in IE and perform some action when the menu item is selected. And how about the similar stuff for right clicking the image in IE ?
Is it related to the shell programming also ?
|
|
|
|
|
I answered a very similar question just the other day. You should make it a habbit of searching first. To search the forums on this site, you click "Search comments" at the top of the message board on each forum (which also lets you search additional forums at the same time).
Take a look at http://www.codeproject.com/script/comments/forums.asp?msg=943726&forumid=1649#xx943726xx[^], which includes other links to MSDN for more information.
As I mention in that thread, I recommend you don't use managed code for this as it adds a lot of overhead to the iexplore.exe (or whatever process hosts the WebBrowser control) in terms of memory and other system resources.
There's also articles here on CodeProject about writing WebBrowser extensions, both in unmanaged and managed code. Enter your search in the text box directly below the logo at the top of each page.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi all,
Is SyncML a current hot topic for development on mobile phone
or pocket pc ?
Is it a good tool for synchronization between pocket pc an desktop ?
thanks
Patrick
|
|
|
|
|
If you have questions about specific products you should first ask the authors of that product. See http://www.syncml.com[^], which has a link at the top of the page, Contact OMA[^].
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I would like to use DPAPI - Data Protection Application Programming Interface to write a Pocket PC application. But does .NET CF have DPAPI?
If not (so unlucky), what can I use?
Thx
|
|
|
|
|
The .NET Framework doesn't encapsulate DPAPI at all. You have to P/Invoke the necessary calls yourself. Read How To Create a DPAPI Library[^].
The Data Protection APIs are supported under Windows CE .NET 4.2 (PocketPC 2003). Windows CE 3.0 does not the DPAPI APIs documented and probably doesn't support it.
Even on PocketPC 2003 (which is actually named "Windows Mobile for PocketPC 2003") you may run into problems because not all of the System.Runtime.InteropServices namespace members are supported. Be sure to view the supported platforms while reading through the System.Runtime.InteropServices documentation in the .NET Framework SDK.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi,
I need to print in Windows98 using Star printer - SP200, which is not capable of graphical printing (can't use DrawString()).
I've tried the code in
<www.c-sharpcorner.com code="" 2002="" oct="" printdirect.aspect.asp="">
changed the left margin (the paper width is 3 inches only) and the ip of printer to be the default printer name using <printersettings.printername> (not shared)
the result is the handle lhPrinter=0 and no response from the printer; nothing is written (pcWritten = 0) although the result of OpenPrinter is not 0.
I appreciate your help...
Sirwan
|
|
|
|
|
|
Hi Stefan,
Thanks for the help.
It looks very important article, but unfortunately I don't understand the language.
Is there any solution can be found in English please?
Thanx
Sirwan
|
|
|
|
|
Hi,
I want to print a report. The height of the report is dynamic.
When I print the report, after the end job, printer eject the last page more than I need. LQ300 eject paper as long az A4 size.
for example: I want to print one line, then the printer stop printing. If I need the paper I self cut it & use it.
I use a roll of paper, no A4 or A3.
I am using c#.
what must I do?
Thanks & Best regards
|
|
|
|
|
hiiii every body can any body help me with this problem
i am using a memory profiler to enhance my code
i discover that an object from (OleDBPermission) is creadted and not removed(disposed) even when i close the connection and Call ReleaseObjectPool what can i do else to release this object please help me
|
|
|
|