|
thank for the solution. It's very helpful
|
|
|
|
|
There are error to compile this code because panel3.left is not defined in the class. How to overcome this?
if (isDragging3 == true)
{
panel3.Left = e.X + panel3.Left - x3;
panel3.Top = e.Y + panel3.Top - y3;
}
|
|
|
|
|
Most likely panel3 IS the class (i.e. this )
|
|
|
|
|
Sorry I cut and paste in a hurry as Mr. MacKay has suggested the proper syntax is;
if (isDragging3 == true)
{
this.Left = e.X + this.Left - x3;
this.Top = e.Y + this.Top - y3;
}
Hope this helps.
Mike
Started out with nothing and still have most of it left!
|
|
|
|
|
Thanks. This really works...
|
|
|
|
|
hi!
i am currently working on securing a webservice by using WSE. I have managed to use UsernameTokens to authenticate the caller of the webmethods...but i cannot find a proper example that uses X509 tokens instead of UsernamTokens. I need an example that uses X509 certificates to digitally sign a SOAP header and also to encrypt the body of the SOAP message, and of course the code used in the webmethod to identify the caller's ID based on the certificate. Also i didn't quite get how to create and install a test certificate sa that i can use it in my test application.
So if anyone could help with a sample project or some guidelines, i would appreciate it. Thanks!
|
|
|
|
|
Hi everybody . I have some problems in converting a time string value into DateTime object .
I have used the following code to do this :
{
IFormatProvider Culture = new CultureInfo("en-US", false)
DateTime.Parse(txt_updateTime.Text,Culture,DateTimeStyles.NoCurrentDefaultDate) ;
}
but It doesn't work properly and throw an exception with this message :"Input string is not in correct format " while the txt_updateTime.Text value is , for example, 05:44
with the best regards
|
|
|
|
|
I think the "en-US" culture expects a time to have those AM/PM stuff. If you know the time is entered in a fix format, you can use the DateTime.ParseExact (or preferrably TryParseExact in Framework > 1.1) method that lets you specify the expected format of the string to parse.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
hi
i use crystal report in my app,but i want work with it professionally,for example i want to pass my dataTable to crystal report by code and bind my crystal report fields to my dataTable columns by code(dinamically),but how to do ??
thanks
|
|
|
|
|
Yor question is good,
but I did it by dataset
but I am sorry I couldn't do it programittacly ?
please I f you got it by code?
sent it to me !
my email is
hatem_ibr@yahoo.com
|
|
|
|
|
i need to control a button.enabled property on my Form using a thread but visual studio gives me an exception telling me "Cross-thread operation not valid: Control 'button1' accessed from a thread other than the thread it was created on." and ask me to set CheckForIllegalCrossThreadCalls to false
how can i set it to false??
or if there is another solution for this without setting CheckForIllegalCrossThreadCalls to false
pleas help
thanks allot
|
|
|
|
|
CheckForIllegalCrossThreadCalls is a property of the Control class (a parent of Button ). The property is not shown in the visual designer but you can easily change its value in code. For example include the following line in the constructor: button1.CheckForIllegalCrossThreadCalls = false;
Though this would suppress the exception, I do not recommend setting CheckForIllegalCrossThreadCalls false, since accessing a control from a thread other than the thread it was created on could lead to unexpected behaviour e.g. freezing of your application. Instead you should use Invoke or BeginInvoke to execute the alteration of the control on the thread it was created on. take a look at this nice article for more info: What's up with BeginInvoke?[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi
is any method to send email in C# without using SMTP server
KK
|
|
|
|
|
Hi,
try this code....
MailMessage mail = new MailMessage();
mail.From = "hi2udhay@gmail.com";
mail.To = "hi2udhay@gmail.com";
mail.Subject = "Subject";
mail.Body = "Mail Body Here";
SmtpMail.Send(mail);
Udhaya Kumar.D
|
|
|
|
|
Only if you're creating your own email system and deploying servers and clients running it all over the world.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
If you are asking about the possibility of sending email without using a SMTP server to relay it - that should be possible. You would need a DNS resolver (like this[^]) that would resolve MX records, so that addresses like yahoo.com get converted to the IP addresses of the SMTP servers. You can then use SMTP to talk directly to the SMTP server.
|
|
|
|
|
How to create object without using NEW keyword
ex:
datatable dt=new datatable();
so,how can i create datatable object without using NEW keyword
|
|
|
|
|
What's wrong with new ?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
In general you can not.
The only exception I know is with constant strings, where "paul" is the equivalent
of new string('p','a','u','l');
You can of course hide the new keyword inside a method (e.g. a CreateInstance) so the caller
does not have to use new, but then that method would include a new.
|
|
|
|
|
Or use reflection
|
|
|
|
|
hello... well i believe u can't create an instance without the new keyword... u can hook onto a an instance without a new keyword but that instance is also created by new...
what i mean is that
datatable dt=ds.tables[0]...Roughly but remember that you are simply assigning ur reference to an object... similar is sqlcommand command=con.createcommand() example...
but this doesn't mean that u are creatin an instance without new keyword...its simply assigning reference to an object that has been created in createcommand method
haseeb
|
|
|
|
|
SwaSubhaVijju wrote: how can i create datatable object without using NEW keyword
Why do you want to do that? What purpose does your request have?
|
|
|
|
|
You can use reflection (MSDN[^]) to do that, but it's a very expensive and roundabout way of doing it.
Like others asked, what's wrong with new ?
|
|
|
|
|
i'm trying to take specific values from xml file into my CheckedListBox but i couldn't make it plz help me
I want to take all the properties(of <tabular>) which have attribut edit = "true" in to my Checkedlistbox
here is my xml file(since i can't desply xml file in the forum i've removed the tags<>)
lasers
laser id="Laser1"
properties
gauge
property name="Output1" min="0" max="100" optimalval="50" currval="0"/property
property name="Output2" min="0" max="100" optimalval="50" currval="0"/property
property name="Output3" min="0" max="100" optimalval="50" currval="0">
<property name="Output5" min="0" max="100" optimalval="50" currval="0">
<property name="Output6" min="0" max="100" optimalval="50" currval="0">
tabular
property name="temperature1" currval="12" edit="true" selected="true" min ="0" max ="100"/property
property name="temperature2" currval="56" edit="false" selected="false" min ="0" max ="100"/property
property name="temperature3" currval="36" edit="true" selected="false" min ="0" max ="100"/property
property name="temperature4" currval="67" edit="false" selected="false" min ="0" max ="100"/property
<property name="temperature5" currval="37" edit="true" selected="true" min="0" max="100">
<property name="temperature6" currval="87" edit="true" selected="true" min="0" max="100">
<property name="temperature7" currval="89" edit="false" selected="false" min="0" max="100">
<property name="temperature8" currval="23" edit="true" selected="false" min="0" max="100">
<property name="temperature9" currval="78" edit="false" selected="false" min="0" max="100">
property name="Avg OutPut" currval="81" edit="true" selected="true" min ="0" max ="100"/property
/tabular
/properties
/laser
-----------
and after this my req is i need to catch the selected values and i wanna desply in a form-----------------this is my req and
i am helpless here, plz try to help me
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
First, you can easily display XML data by checking the "Ignore HTML tags in this message" option beneath the smilies. As this disables all other formatting-options too, you can alternatively replace all < characters with <.
Second, in the bottom right corner of your posting there is a "modify" link that allows you to modify your post (as the name suggest). Please use this link to change a post with which your not comfortable instead of starting new threads. There is also a remove link, so please remove the "duplicate" posts.
Third and regarding your actual question, take a look at the XmlDocument and especially the Load and SelectNodes methods. The documentation of the class, its methods and the continuative links contain many examples that should give you a good starting point.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|