|
You are welcome
|
|
|
|
|
Hello aLL,
I am trying to create windows form on the fly by looking at the value coming in form of a string.
for example:- i have form by name frmMain i will be getting this name from a string during runtime.
I am not getting how to create an instance of an object of type frmMain
Thanks in Advance
Regards
Bharath
Ron
|
|
|
|
|
Look into System.Type.GetType ( name )
|
|
|
|
|
|
Hi,
I've made a screen saver in C#, and everything works out fine. The only thing that bothers me is the noise made by my computer while the screen saver is running. A few seconds after it comes on, the computer begins whirring and making a lot of noise... This problem is fixed when I increase the interval for my Timer object, but the animation becomes choppy. I would be perfectly happy with the screen saver if I could just get the darn computer to stop whirring... Any suggestions you guys?
Thanks,
Max
|
|
|
|
|
Can you figure out what is whirring?
1) Hard drive?
2) Cd/Dvd drive?
3) Fans?
Most likely culprit is that you are loading something from disk (like your images for your animation maybe?) and you're doing this every frame of the animation.
Check and make sure you are only loading from disk once at the beginning.
Simon
|
|
|
|
|
Thanks to all, I'm sorry I wasn't as concise as I should have been... A few seconds after the screen saver pops up after the set time of 1 minute, there is a whirring sound from the back of my CPU. It is a desktop computer, and I'm not completly sure, Simon, what it is that's making the sound. If I had to guess, I'd guess the hard drive, but I'll check again once I get home.
Your suggestion that I was loading an image on every frame of animation was one that I had thought of, unfortunately... I am loading several images, however these are loaded at the beginning. Would drawing these images on every frame have the same effect? I have double buffered the form and my timer has an interval of 2, I believe... This is rather fast but I want the animation to be smooth...
The only reason the whirring is a problem for me is that I don want to turn the screen saver off every time I go to sleep haha.
|
|
|
|
|
Does this happen with all screen savers or just yours?
If it happens with all it could be that you have indexing set up to run while the screen saver is active. Or some other similar task.
Simon
|
|
|
|
|
Only happens with mine... Hmm...
|
|
|
|
|
its just HDD noise, this mostly happens in SCSI HDDs.
When you will run the program it will look like that it created a physical timer
If you do not want noise, just change the hdd.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
If the noise is comming from the speakers, you've got EMI noise entering the audio channel (audio card, amplifier, speakers, ...) from somewhere on the motherboard or video card. There's really nothing much you can do about it unless you want to start replacing the case or hardware with better quality shielding on it.
|
|
|
|
|
As you have seen by the replies so far, you have to be a lot more specific about your computer and the noise that it's making.
Is it a desktop or laptop?
Can you identify if the sound comeps from the fans, the hard drive, the CD/DVD player or the speakers?
The fans can be noisy at high cpuy load, especially in laptops.
Hard drives can make some noise, but usually not that much.
A CD/DVD played makes quite some noise at spin-up.
Some speaker noise due to disturbance from other circuits is common, which can be noticable at high volume settings.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Inside a worker thread the GUI needs to be updated and thus I call Form.Invoke(). How can code inside the worker thread be notified when the code that was invoked is finished?
|
|
|
|
|
Invoke blocks until it is finished. As soon as the method returns, you know it is finished.
(BeginInvoke() returns immediately and does the work on another thread)
Simon
|
|
|
|
|
Ok, thanks, that's good news to me!
|
|
|
|
|
Hi All,
Say there are "Green, Helen, Kate, Kevin, Peter, Smith, White, Venu, Zac" loaded into ComboBox. When a user types "K" in the CombBox, which ComboBox method should i use in C# to make the items in this ComboBox auto jumpted to "Kate and Kevin", and even more when the user types "Ka", how can i make the "Kate" highlighted?
Thanks heaps
|
|
|
|
|
Hi,
there is FindString (and FindStringExact) to locate an item by its starting or full text; but these would not reduce the list shown. AFAIK to get that, you would have to code things yourself.
|
|
|
|
|
you can use TextChange event of ComboBox, btw when you write something in CB and drop the list, it automatically selects the top one that StartsWith the Text of CB.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi
I'm writing a web app to upload up to 4 images to a folder. I also have a drop-down list so the user can choose whether pic is picture 1, 2, 3 or 4 (to set order on page display). Anyway, when one picture is uploaded the user stays in the form to add more pictures. I clear the DDL and re-populate it depending on which pictures have already been uploaded - i.e if pic 1 has been uploaded, only pic 2, 3 and 4 appear in drop-down. To determine this I use File.Exists but this doesn't seem to be working on a postback (i.e it doesn't find pic1.jpg which I have uploaded. It works however, if I leave the page and then click to add an image later - could this be an issue of the folder not refreshing so it looks like the file doesn't exist or a postback problem? Any ideas would be greatly appreciated.
Thanks
Lorna
|
|
|
|
|
Member 3402886 wrote: I'm writing a web app
This is C# Forum. Please post it to ASP.NET Fourm
Thanks !!
|
|
|
|
|
OK will do, but I am using c# code to do this!
|
|
|
|
|
The launguage you use to write ASP.NET applications doesn't matter. Your question falls squarely within the perview of ASP.NET technologies. It has nothing to do with C# at all.
|
|
|
|
|
hello all
what is the technique behind the implementing an option like recent files for a window application in c#....
the last 5 projects to be shown always and it must be open when user clicks for it... same as in Visual studio.NET
|
|
|
|
|
You write code so that you call each time you open a file. This code takes the filename of the file and you store the filename somewhere. When you display the menu that shows the last few files opened to retrieve the information you previously stored.
Where you store that information is up to you. You may decide an XML file works best, maybe in the registry, maybe a database (if you are already using one) or something else.
|
|
|
|
|