|
There still is a small matter of a non-functional transformer that will cost a few dimes and several months to fix.
|
|
|
|
|
I have created a form with a height of 28 with no title bar or border. Yet when the form is run the height jumps to about 32 pixels. Even adding code that changes the form's height to 28 isn't working.
I'm currently using Microsoft Visual C# 2008 express. The issue should be repeatable by making a new form. Setting the following properties:
ControlBox: false
FormBorderStyle: none
Size: 400,20
and then running. Is there a system minimum height requirement for forms that I don't know about, or am I just missing some obvious setting?
|
|
|
|
|
Yeah, you're missing the height of the title bar that isn't there. Even if the title bar is turned off, it still contributes to the minimum height of the form.
|
|
|
|
|
That makes sense. Now if I can just find a way to make the title bar smaller it seems my troubles will be over. Though the only thing I've found so far is System.Windows.Forms.SystemInformation.CaptionHeight, and that's read only.
Perhaps I'll have to abandon the form and try a different method. Thanks Dave.
|
|
|
|
|
It just occured to me that it may be because the ControlBox is still turned on. Set it to False and you might be able to get what you want. (I don't have time to try it right now...)
|
|
|
|
|
The control box was set to false, I said that in my original post. Unless you know of a different way to turn it off other than the forms ControlBox property. I spent a good couple of hours trying different things to no avail. I gave up on it.
|
|
|
|
|
did you try setting the Form.Text to an empty string?
|
|
|
|
|
Yes I did, sorry if I didn't mention that in the first post.
|
|
|
|
|
No problem.
I tried it myself, setting lots of things off and/or minimal, to no avail, minimum size is 124*36
on my system, whatever borderstyle I choose.
Best explanation so far is Windows wants to prevent you from making a Form ungrabable.
|
|
|
|
|
good day everyone
so i created a class called stuff, like this
public class stuff
{
public string str1;
public long l1;
public DateTime d1;
public DateTime d2;
public string str2;
public LocalFiles()
{}
}
i want to create an array of this class like : stuff[] S = new stuff[100]
then when i want to insert a value in it (like S[1].str1 = "ds" i get an error, what am i doing wrong?
thanks in advance
|
|
|
|
|
mirko86 wrote: i get an error
and what error are you getting?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
i get the "Object reference not set to an instance of an object." exception
|
|
|
|
|
When you create your array, you're only creating 100 places for references to your "stuff" objects. The problem is that those references don't point anywhere until you instantiate an object in each of those array slots.
S[1] = new stuff();
|
|
|
|
|
i dont think thats gonna solve my problem though
this is exactly what i want to do:
stuff[] LC = new Stuff[somehashtable.Values.Count];
int y=0;
foreach (string values in somehashtable.Values)
{
LC[y].str1=
}
i want to copy all the values of the hashtable to my "stuff" Array
|
|
|
|
|
You have to do it this way:
public class Stuff
{
public int a = 0;
public int b = 1;
public string c = "string stuff";
public Stuff()
{
}
}
Stuff[] m_stuff = new Stuff[10];
public CreateStuff()
{
for (int i = 1; i < 10; i++)
{
m_stuff[i] = new Stuff();
}
}
At that point, you can access your stuff.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
ok problem solved!
thanks a lot guys you really helped me
modified on Friday, December 19, 2008 5:31 PM
|
|
|
|
|
Hey guys I am hoping someone can help. What I want to do is send an e-mail at 7:00 AM once a day. I know how to send an e-mail, and i thought i could do this using either a timer or a thread. This is also going to be a windows service in case that makes a difference.
Thanks,
Travis Combs
|
|
|
|
|
|
Will Timer1 control be solution for you?
If yes then enable Timer1 and check current time if is 7:00 AM and in that case execute code which send email.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
I always avoid using timer objects. Timer events are the absolute lowest priority events in Windows, and on a busy system, there's a very real possibility that you could miss one. Always use a threaded scheduling implementation. It's much more reliable and customizable.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thanks for your information,I really appreciate it.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
I am trying to create a tree out of this data string...
fullRef = "Section1:Section2/Section3.Section4.Section5.Section6.Section7.Section8.Section9";
not all records are exactly the same
This appears to work but the nodes when added are not getting the properties assigned to them. When I look at those nodes the wrong icon is assigned (1st clue that something is not right) in debugging mode I see this error on the node as its being added but it does not "throw" an exception??
//----- the line I am using to select the parent to add to
//this should be the parent
treeView1.Nodes.Find(s2Name, false);//this should be the section 2 parent
//---the error in debug mode
//FullPath = 's2Node.FullPath' threw an exception of type 'System.InvalidOperationException'
//-------- select the parent found above ------------
treeView1.SelectedNode = s2Node;
//-------- add the new nodenode ---------------------------------------
treeView1.SelectedNode.Nodes.Add(s3Name);
Any suggestions???
tia
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Rafone wrote: treeView1.Nodes.Find(s2Name, false);
Should that be s2Node ?
|
|
|
|
|
it wont take the node but it will take the name of the node.
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
C# 2005 special edition does not have installation pproject templates built in and I have found use of the ClickOnce solution to be inadequate. Can anyone point me to an installer package that will install the .NET framework (if this is not on the target macgine) as well as the files specific to the application? I have tried EasyInstaller, which works fine except that I don't whether it can do the .NET bit, and if it can, I don't know how!
Angus
|
|
|
|