|
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
|
|
|
|
|
Hi all, I was thinking there had to be an easier way to do this.
I have a UserControl which contains a PictureBox and Label as children. I don't want to make the consumer have to hook the events or even expose the child controls.
So how do you let the user add the event handler to the custom control and have it propagate down through to the children.
I've done this which works but may give more explanation as to what I'm trying to do.
Basically it's just assigning the event within the InitializeComponent().
<br />
private void SetPictureEventsToParent()<br />
{<br />
picture.MouseClick += new System.Windows.Forms.MouseEventHandler(picture_MouseClick);<br />
}<br />
<br />
void picture_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)<br />
{<br />
this.OnMouseClick(e);<br />
}<br />
<br />
private void SetLabelEventsToParent()<br />
{<br />
label.MouseClick += new System.Windows.Forms.MouseEventHandler(label_MouseClick);<br />
}<br />
<br />
void label_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)<br />
{<br />
this.OnMouseClick(e);<br />
}<br />
The problem is the Label and PictureBox cover the parent and so the parent never receives the event unless I do this.
Thanx
|
|
|
|
|
Hello. I am doing a CRM application where the end user browse a file, selects their csv file, and imports their contacts.
I have no problem reading the csv file, but I am having difficulty on assigning which column goes into which database field.
Anyone have any ideas on this or possibly, is there a resource out there?
Thanks.
Anthony
c#, mysql, visual studio
|
|
|
|
|
You may need to do the mappings manually, unless your CSV file's first line contains the column names and they match the ones in the database.
And you're in the wrong forum, by the way.
|
|
|
|
|
I have a Java webservice, and i consuming the this java webservice through .Net client. and i am using Microsoft WSE 2.0 for web security. I have created a proxy of this java webservice. This proxy class has 23 webmethods. I am passing the user credentials through UsernameToken object before invoking a webmethod as follows...
userToken = new UsernameToken("Ram", "Ram_Mohan", PasswordOption.SendPlainText);
WebServiceBean theProxy = new WebServiceBean()
theProxy .Security.Timestamp.TtlInSeconds = 60;
theProxy.Security.Tokens.Add(userToken);
Now i will invoke webmethod as fallows...
string rtnValue = theProxy.createWorkEx(userId, createWorkXml);
The above procedure is to invoke the webmethod
theProxy.createWorkEx(userId, createWorkXml);
And it is working fine as expected.
But my requirement is something like this, As i said earlier the proxy has 23 webmehtods. Now i don't want to repeat the same procedure invoke all the 23 webmehtods as i did for theProxy.createWorkEx(userId, createWorkXml).
Is there any generic way or a pattern, where i can implement same procedure for all the 23 webmethod at a single point? I dont want to repeat the same code 23 times for invoking 23 methods.
Any thoughts or links on this?
Thanks.
Venkat
|
|
|
|
|
Write a wrapper class that encapsulates the complexity of the web service.
|
|
|
|
|
I am needing to get AD information from a user logon name like AEM\jdixon
Im using this for a website to authenticate people to get their Division, First and Last name automatically without them having to sign in or anything.
This is what I have:
using (DirectoryEntry root = new DirectoryEntry())
{
root.Username = username;
root.Password = password;
root.Path = LDAPPath;
using (DirectorySearcher searcher = new DirectorySearcher())
{
searcher.SearchRoot = root;
searcher.SearchScope = SearchScope.Subtree;
searcher.Filter = "(objectClass=user)";
searcher.PropertiesToLoad.Add("msDS-PrincipalName");
seacher.PropertiesToLoad.Add("divison");
SearchResultCollection results = searcher.FindAll();
StringBuilder summary = new StringBuilder();
foreach (SearchResult result in results)
{
foreach (string propName in result.Properties.PropertyNames)
{
foreach (string s in result.Properties[propName])
{
summary.Append(" " + propName + ": " + s + "\r\n");
}
}
summary.Append("\r\n");
}
textBoxResults.Text = summary.ToString();
}
}
Now I got this from someone else on here that I seen in an article. But I also have my book here and I'm not seeing what I want to do. See in ASP.net you can get their Windows Logon name simple right? Which would pull (lets use mine for example) AEM\JDIXON
So now that I have AEM\JDIXON, I want to search AD (first to make sure it exist) and if it exist I want it to pull what DIVISON and the First and Last name. This is for a ticket application.
|
|
|
|
|
Hi to all.
I would to know if there is any in c# to do an ftp transfer server to server.
I need to transfer a file located in ftp directory to another ftp directory.
Example ? idea ? everything is accepted!
Tnx for answers
|
|
|
|