|
That just helped a lot, and there's SIMPLE collision detection! All I fond was 50 lines of code that was... extremely confusing and hard, but thatnks again to everyone who replied... Time to continue reading.
|
|
|
|
|
Hello all,
I'm working on a project in C# where i don't want the user to be able to resize the application's form past the desktop's taskbar. Is there a command that prevents resizing beyond any of the sides of the desktop's working area? If not, what would be the best way to approach this issue?
|
|
|
|
|
You can restrict form's maximum size by setting its MaximumSize property. You can retrieve the size you need by using Screen class
|
|
|
|
|
oops, never mind, had the formborderstyle set to sizabletoolwindow instead of just sizable.
|
|
|
|
|
The big picture of what I'm trying to do is to allow all users of an active directory global group to log in to an ASP.net/C# website on my intranet. I have no idea how to do this. Lol. Can someone point me in a direction? thanks.
|
|
|
|
|
theory:
I think you need something like "Forms" authorization in your ASP.NET website set in web.config;
second step for you will be "custom membership provider" to write; i saw a few days ago example on msdn in C#.
third step is to create database for your custom membership provider, at this point you can google for the AD examples in C# [or maybe i can post you some, or simply take a look on System.DirectoryServices namespace] ...
some code which you've got to do is to obtain all info about users and/or groups and put it to your membership db. These 'DirectoryServices' then you can always use for password checking, etc.
mail me if you need further assistance
VirtualVoid.NET
|
|
|
|
|
I need help on how to add a string to the value in a dictionary type based on a particular key
when the value is a list of strings to be added to
So far I have something like this going on:
<pre>
Dictionary<string, List<string>> grammar = new Dictionary<string, List<string>>();
List<string> value = new List<string>();
const char space = ' ';
string element = "my big blue brown dog";
string key = "myString";
foreach(string word in element.Split(space))
{
//I get problems here
grammar.Add(key, value.Add(word));
}
</pre>
Any help is greatly appreciated.
Onward and Upward,
Ryan R.
|
|
|
|
|
You need to add all the strings first.
foreach(string word in element.Split(space))
{
value.Add(word);
}
grammar.Add(key, value);
Hope that helps.
Ben
|
|
|
|
|
Hi everybody,
it's possible to drag an E-Mail from Thunderbird or Outlook into a self-created application.
Is it also possible to do this in C#?
I get a Drag'n'Drop Event and can read out which format it has, for example "Windows Mail Message"
Now the next step is seriously to parse a Data-Object into a special Mail-Persistence-Class or something like this, or?
Big thanks for any help
|
|
|
|
|
Both outlook and thunderbird have specific mail format [in binary form, take a look on *msg files from outlook]. I think this will be possible using some APIs of these programs.
VirtualVoid.NET
|
|
|
|
|
Using a C++ base approach, I have:
// y = mx + b conversion format
public struct LinearConverion
{
double m;
double b;
};
public struct UnitConv
{
LinearConverion to[4,4];
};
UnitConv[] ConvFacts = new UnitConv[Ranges.length()/Ranges[0].length()];
This does not compile.
This seems direct and to the point. What am I missing. Thanks in advance.
This is part of a conversion system where US, IP, Metric, SI units are defined in a table.
US IP Metric SI
IP Metric SI US
Metric SI US IP
SI US IP Metric
where column is what is current and the other index points to the conversion value.
|
|
|
|
|
public struct UnitConv
{
LinearConverion to[4,4];
};
Thats the problem, i pretty sure c# doesn't use static arrays, they're all stylish and dynamic.
You'd need to use 'new'
public struct UnitConv
{
LinearConverion to = new LinearConverion[4,4];
};
But that won't work either, since you can't just start assigning things inside a struct. Instead, ditch the struct, and make it a class, it'll be exactly the same, except it'll work.
public class UnitConv
{
LinearConverion to = new LinearConverion[4,4];
}
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
As you can see from my change that I posted, I am using a class with a single array but I have lost the modularity of structs with the overhead of class based methods(runtime impacts).
I guess I could define a large storage system and decode it within my class and create access methods to decode it correctly. This seems to be more abstracted from a simple array based decode of the desired address by the compiler and value access compared to a subroutine call and return overhead.
|
|
|
|
|
public enum UnitDefs
{
UNDEFINED = 0,
LENGTH, // 1
PRESS, // 2
DPRESS, // 3
MASS, // 4
VOLUME, // 5
TIMEUNIT, // 6
TEMPERATURE, // 7
DENSITY, // 8
MASSFLOW, // 9
VOLFLOW, // 10
EXPANFACT, // 11
VISCOSITY, // 12
HEATVALUE, // 13
ENGYFLWRATE, // 14
VELOCITY, // 15
GASISEEXP, // 16
MYBOOL, // 17
End
}
public enum SysUnits
{
USUNITS = 0, // 1
IPUNITS, // 2
METRICUNITS, // 3
SIUNITS, // 4
End
}
public enum Line
{
m = 0,
b,
End
}
// y = mx + b conversion format
// since C# does not allow for struct->struct->instance, we will have to create a single array
// first dim => current units, second dim => desired units, third dim m=0, b=1
// so instead of names, we are reduced to numbers
public class UnitConv
{
double[, ,] To = new double[(int)SysUnits.End.GetTypeCode(),
(int)SysUnits.End.GetTypeCode(),
(int)Line.End.GetTypeCode()];
}
UnitConv[] ConvFacts = new UnitConv[(int)UnitDefs.End.GetTypeCode()];
Is this the best way?!
This appears to be runtime based resolution, not compile time resolution.
Is there a compile time (c preprocessor) method.
I can use defines which may perform the same replacement operations.
Any ideas?
-- modified at 12:18 Thursday 11th October, 2007
|
|
|
|
|
HI,
I like to know if there is a warehourse that contains UI controls?
like the popup info from gmail notifayer or a better more advanced toolTip
etc..
if u can point me to a link...
THNKS
kobkob
|
|
|
|
|
There are two of them for free: Code Project and Google. Seriously, if you are looking for a specific type of UI control look for one on either of those two sites and you will probably find what you are looking for. Even if you don't find exactly what you need, you will get something that does almost everything and can then add/fix what it doesn't do.
|
|
|
|
|
Well - if you want to pay out good money, there's always ComponentSource[^].
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
would you please give some suggestions how to make a POS system. please just give me a hint what to do.
|
|
|
|
|
Name your threads something useful Download windows embedded 6.0, select your device type and get the .NET compact framework and go to town.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Wow! Could your question be any more vague??
How about gather the customers requirements, come up with a design, write some code, test it, fix it, rinse and repeat.
|
|
|
|
|
Dave Kreskowiak wrote: Could your question be any more vague??
Yes, but only just. He was very close to a full vagueness factor...
By wording it as "would you please give some suggestions how to make a system. please just give me a hint what to do."
|
|
|
|
|
|
I think you'll have no trouble developing a Piece Of Sh** system all on your own.
|
|
|
|
|
I was just about to say that I see POS projects all the time. Beat me to it.
|
|
|
|
|