|
I have a feeling that if you make the Window fullscreen and "always on top", then it will (almost) accomplish what you want. However the user will still be able to get to the taskbar using the Windows key. Remember if you disable everything but your app, and then the app gets into a loop or hangs, the user's only option is restart. Not a good scenario; do that a few times and they'll never use your software again.
|
|
|
|
|
No, and not worth the effort anyway.
The taker would still be able to look up answers on a nearby system.
|
|
|
|
|
hi, i'm trying to code a Adobe Cs4 lookalike menustrip.
i found some material on microsoft's MSDN.
i stripted this example to a proper visual studio 2008 project.
if i apply the ...
this.MenuStrip1.Renderer = new RolloverItemRenderer();
it does remove the border when you hover the the mouse over a parent menuItem and simply gives a blue background and white chars.
i would like to override the hoover color + border and shape of the button.
also this methode is hard to use, it would be cool if you can edit the custom draw menu from the designer and the need of event.
so i think it need a totaloverhaul somehow.
i have experience on other control, like tabcontrol, button, etc, etc.
but it seems, this needs a diffferent aproach.
any volunteers to code a cool costum menu?
i can mail the project.
http://msdn.microsoft.com/en-us/library/system.windows.forms.toolstripitem.aspx[^]
Bad = knowing 2 much
|
|
|
|
|
I need to exclude one of properties in my class from data binding. Any easy way to do that? Is there any attribute to prevent a property from binding?
|
|
|
|
|
The BrowsableAttribute is supposed to do it but it hardly ever works so I end up either using templates instead of auto binding or manually assigning each bound column. You also have the option of creating a wrapper class which is fugly but workable.
|
|
|
|
|
Hey everybody,
Looking for another push in the right direction here.
I'm trying to create a class that involves other collection, like the Treeview has Treenodes, which have treenodes, which have treenodes, etc...
I have a Treeview that holds Teams, then Processors assigned to those teams, and then Tasks assigned to those Processors. I need to fill an excel spreadsheet based on these assignments. I'd like to create instance of a class based on each parent node in the treeview (where level == 0), where I can say 'foreach (Processor proc in Teams), create headers in excel, and then for each 'Alpha alpha in Processors', create subheaders underneath the Processors. The key is to, I guess, I have each team created at a time, onto the assigned Team Tab in Excel.
I've got classes created, but I'm afraid I've only got it set up where I can create a Team.Processors, and a Processors.Alpha, but not a Team.Processors.Alphas... Honestly, I'm not sure if I'm even headed in the right direction.
Any ideas or detailed articles on this? All help is appreciated!
Thanks!
Scott
|
|
|
|
|
Since Processors is a collection contained in the Team class you can access it as
Team.Processors.Alphas
you need an indexer
Team.Processors[x].Alphas
only two letters away from being an asset
|
|
|
|
|
Here is example code I made for this question:
using System;
namespace TestingAs
{
class baseClass
{
public string foo
{
get;
set;
}
}
class derivedClass : baseClass
{
public string bar
{
get;
set;
}
}
class Program
{
static void Main(string[] args)
{
derivedClass derived = new derivedClass();
baseClass b = derived as baseClass;
Console.WriteLine("type is {0}", b.GetType());
Console.ReadLine();
}
}
}
I also tried just casting baseclass b = (baseClass)derived; which gives the same result:
type is TestingAs.derivedClass
Why b is not type of baseClass ? How would I "convert" my derived class into base class type?
Thank you in advance!
|
|
|
|
|
This is the same concept of Reference Copying.
In runtime the pointer of the object is set to derived class object. Thus it will always hold the derivedclassobject even if you cast it to base class object.
|
|
|
|
|
Convert.ChangeType ?
Why would you want to?
|
|
|
|
|
Does it matter why I want to?
My app is using .dll's which are returning class arrays.
My previous problem was that the application was completed and working well when it was required to use custom data in a way I found "good" solution to change my application to use derived class from the class type returned from the .dll layer, it just worked as long as I did not need to use same class array objects as parameters in .dll layer method calls.
|
|
|
|
|
I didn't quite follow all that, but I still see no reason to downgrade the instances.
|
|
|
|
|
Think about it. When you derive a class from baseClass, you are adding information to baseClass. When you try to convert your derived class to a baseClass, you would have to throw information away. You could not recover the information by re-casting your item to a derivedClass, because otherwise your program would have to behave very differently with the following :
derivedClass d = new derivedClass();
baseClass b = d as baseClass;
derivedClass d2 = (derivedClass) b; and
baseClass b = new baseClass();
derivedClass d2 = (derivedClass) b;
If the definitions were in (say) different methods to the casts, it could get very difficult to work out what is going on.
Since wherever you can use a baseClass, you can use any derived class, C# is not keen on throwing away information, which could not be recovered by a re-cast back to the derived class.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
|
Im trying to track how long between certain things happening in my app. When the first event happens im adding the time to an array like this: myArrList.Add(DateTime.Now);
Then when the next event happens im retreiving it from the array and doing this:
TimeSpan diff = DateTime.Now - (DateTime)myArrList[x];
But for some reason it always gets like 0.02 seconds. Which makes me think that its doing the current time minus the current time(and the 0.02 is the time it takes between finding the first time and the second).
So how do i do this properly?
Am I adding a reference to DateTime.Now into the array instead of just the value?
Thanks
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
No, when you get DateTime.Now you get just that - the time now, which will not change thereafter. So if you write
DateTime dt = DateTime.Now;
at noon, dt will still say noon at 13:00.
How long is the actual interval between the two events? Are we talking microseconds? Seconds? Minutes? How frequently is your event happening? Once? Or every (say) 20ms?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Well it is usually around a second or less
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
You might want to take a look at the Stopwatch[^] class
only two letters away from being an asset
|
|
|
|
|
Looks good! TY
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
roguemat wrote: Am I adding a reference to DateTime.Now
No. DateTime is a value time (a struct), no references involved.
roguemat wrote: it always gets like 0.02 seconds
DateTime.Now as well as the system clock get updated only a few times a second (typ. 60 Hz); see my timers article. If you need better accuracy, use a Stopwatch.
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Will check it out thanks!
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
Hi , I am developing software to read the tiff images. i need to read the text written in tiff images programmatically in c#. I have lakhs of tiff image to process it for cleaning and reading. also i want to develop thumbnails programmatically of those tiff scanned images.
Regards,
Lalit Singh
Programmer Analyst
Hitech Outsourcing Services
|
|
|
|
|
How about searching it in codeproject, search for "OCR". You find lots of article of it.
|
|
|
|
|
Salut,
Lorsque je click sur le multicolumncombo, je veux avoir une table de 2 colonnes qui ont pour noms codeArticle et
description et cette table est remplie à partir de la base de données.En selectionnant une ligne,la description
sera affichée.Est-ce qu'il y a quelqu'un qui peut m'aider à faire ceci?
|
|
|
|
|
Vous obtiendrez une réponse plus rapide si vous utilisez l'anglais.
Thank heavens for google translate.
CCC solved so far: 2 (including a Hard One!)
|
|
|
|