|
I think it should be possible to handle the Activated event from somewhere instead of overriding OnActivated in the form itself. The code within the handler should be the same as now.
|
|
|
|
|
Hi, guys, I am now developing a drawing program in C#. Everytime when adding new lines, ellipse or other shapes, I have to use "this.Invalidate(); this.Update();" to refresh the drawing area then new
shapes will appear. However, it has to paint all the shapes I drew before, or the shapes I drew before may be erased!
But everytime redrawing every shape causes terribly flicking! How to avoid this? Can it only draw newly-drawn shape?
ps: I use ControlStyles.DoubleBuffer and ControlStyles.UserPaint. The effect is not obvious.
Many thanks!
Radic
Beijing, China
-- modified at 21:25 Sunday 28th August, 2005
|
|
|
|
|
You need to look into double buffering. You can actually set up C# to do this for you, just google double buffer C# and you're sure to find plenty of info.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks, Christian! Absolutely you are the most warm-hearted!
|
|
|
|
|
Don't know where the value was taken of this line...
public const int OF_SHARE_DENY_WRITE = 32;
This is regarding the avifil32.dll... Where did the programmer get the value "32"? Where can you get a reference of this kinds of values that would be passed into parameters... Thanks for the help...
-- modified at 21:12 Sunday 28th August, 2005
|
|
|
|
|
boggs wrote:
Where did the programmer get the value "32"?
Probably from the C++ header file that defines it.
boggs wrote:
can you get a reference of this kinds of values that would be passed into parameters...
In the C++ header files where they are defined, or just create a C++ project, type the names in and hover the mouse, you'll generally see the value in the status bar.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Oh... Thanks... I think I'll try that...
|
|
|
|
|
is consuming in c#?
I.E. is there a general purpose method of determining how much memory a HashTable or string or any other object is using?
"A preoccupation with the next world pretty clearly signals an inability to cope credibly with this one."
|
|
|
|
|
Have a look at the SizeOf method of the System.Runtime.InteropServices.Marshal class.
---
b { font-weight: normal; }
|
|
|
|
|
The marshaling call will work, you can also load up winDbg and use SOS to look at all the .net memory allocations.
|
|
|
|
|
It's only for structs, not for classes.
The only way of getting a rough estimate of the size of a managed object is by serializing it. The serialized size is actually bigger than the size in memory, but it can help you to spot who's taking memory.
I see dead pixels
Yes, even I am blogging now!
|
|
|
|
|
Hi All,
Can anybody help me how to convert Copybook data into Excel SpreadSheet using C# .I am new to Copy book.The copybook structure as follows.
*****Copybook1*****
05 IC-Record-ID PIC X(02)
value'IC'
05 IC-TPA-ID PIC x(06)
05 IC-Employer-ID PIC X(09)
05 IC-Plan-ID PIC x(09)
05 IC-Employee-ID PIC X(30)
05 IC-Account-Type-Code PIC X(04)
05 IC-Plan-Start-Date PIC x(08)
05 IC-Plan-End-Date PIC x(08)
05 IC-Account-Status PIC 9(01)
88 IC-Acct-New value 1.
88.IC-Acct-Active value 2.
88,IC-Acct-Temp-Inactive value 3.
88.IC-Acct-Perm-InActive value 4.
05 IC-Auto-Deposit-Last-Alloc-Dt Pic x(08)
05 IC-Flex-Account-Options Pic x(02)
88 IC-Recurr-Expense value '01'
88 IC-Copay-Rollover value '02'
05 IC-Request_Legnth Pic s9(04)COMP.
05 IC-Subscriber-Person-ID-R REDEFINES
IC-Subscriber-Person-ID Pic x(15)
10 IC-Plan-ID pic x(10)
10 IC-Plan-Status Pic x(01)
88 IC-Plan-New value '1'
88 IC-Plan-Active value '2'
*****Copybook2*****
05 RB-RB-Record-D PIC X(02)
Value'RB'.
05 RB-Employer-ID PIC X(09)
05 RB-Employee-ID PIC X(30)
05 RB-Details-Response-Code PIC X(09).
****Copybook3*****
Employee-Account-Record
05 RC-Employee-ID PIC X(02)
value'RC'
05 RC-Employer-ID PIC X(09)
05 RC-Employee-ID PIC X(30)
05 RC-Account-Type-Code PIC X(04)
05 RC-Plan-Start-Date PIC X(08)
05 RC-Plan-End-Date PIC X(08)
05 RC-Detail-Response-Code PIC(06)
Once defined above structure . I have to give input file as sequential data file and expected output as spreadsheet.
Thanks & Regards
Rao
-- modified at 18:57 Sunday 28th August, 2005
|
|
|
|
|
Hi,
I have to write a program to capture a usb barcode scanner,...
as you all know, when you scan a barcode, it acts like a keyboard & just sends the barcode text to the active window. all i have to do is just to write a program which runs in the background & captures those scanned barcodes to a text file and it would not sent it to the active window,.. it's like windows message intercepting for your own purpose.
i really apprecite if you can give me any sample code, or any clue.
Thanks in advance
|
|
|
|
|
You say it's acting like a keyboard, are you implying that it's using a generic Micorosoft Human Interface Driver?
/\ |_ E X E GG
|
|
|
|
|
yes i think so,
i didn't install any driver, by theway i have windows xp pro sp2.
it should be same as the usb keyboards.
|
|
|
|
|
Well then you can use some already documented APIs to interface with your device. I will post more details the open of business Monday.
/\ |_ E X E GG
|
|
|
|
|
|
Search the web (or codeproject) for keyboard hook, and you'll find what you look for. But probably it'll be hard to find something in C#, it's something that easier done in C++.
I see dead pixels
Yes, even I am blogging now!
|
|
|
|
|
Hi...
Can someone write me steps how to create a crystal report using a stored procedure. I am new to crystal reports. I made a report by using multiple tables.. but couldnt find an option for stored procedure. I want to do this in C# and asp.net. So can someone help me out. Also give me multiple possibilities of doing it/ some good links...
Thanks a lot.
|
|
|
|
|
i had already programmed to capture frames at some specific intervals from the default webcam installed on the pc and i succeeded to transfer it but i need to know how to encode it before transmission and then on the other side to decode it not to halt the network and make the transmission able to be transmitted efficiently with network leaks or memory leaks take place.
Miss With The Best And Die Like The Rest
|
|
|
|
|
Is there any built in function to reverse a string in c# if yes what is that?
|
|
|
|
|
What DR. GUI .NET (link[^])says about StrReverse equivalent: "None—use StringBuilder and loop to reverse by swapping characters in place."
Dunno about .NET 2.0 however.
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
No, there isn't.
You can convert the string to a character array, reverse the array, and then create a string from the array.
---
b { font-weight: normal; }
|
|
|
|
|
|
how are you dudes ?
How can i connect to online user using dial up connection on the internet by knowing his ip address ?
i mean if i have the ip address of one user on the internet but he uses dial up connection or DSL how can i connect to his pc using c#?
even if he is out of my ISP ( Internet Service Provider) on dial connection and if he is connected using DSL he is behind his router and his network configuration
i used this code
<br />
IpHostEntry myhost = Dns.Resolve(his ip address as string);<br />
IpAddress ip = myhost.addresslist[0];<br />
string[] aliases = myhost.aliases;<br />
ipendpoint remoteendpoint = new ipendpoint(ip,(Int32)10000);<br />
tcpclient myclient = new tcpclient();<br />
myclient.connect(remoteendpoint);<br />
is this code can connect to the users using dsl or dial up connection remotely ?
cause may be this code will not work cause when the user connect using dial up connection he takes virtual ip address from his ISP ( Internet Service Provider ) and if he is connected using DSL he is behind his router and network configuration.
The question is i didn't test this code with someone online on the internet but i want to know is this code can do the real work by connecting to the user at the specified ip address or no ?
please Help me with this
Please Reply to me please.
Thanks alot
Miss With The Best And Die Like The Rest
|
|
|
|