|
Hi,
To compare the dates you can use DateTime class's Compare method.
To format the text box i guess the following link will help you.
http://www.developersdex.com/vb/message.asp?p=2927&r=4036244
Thanks and Reagrds
SGS
|
|
|
|
|
Why not use a datetimepicker, and then you can set the second one to have a minimum date of the value of the first one ? Then you also get a datetime without having to parse it, although parsing it is not that difficult. If you split the string on the slash and count the number of elements, you'll know which of the three formats your user has attempted. I always think it's better to use a control that stops the user from making a silly mistake, if possible.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I can't using DateTimePicker. I writing WebApplication not WindowApplication. Any way? Please help me!
study, study and study more
|
|
|
|
|
|
As well as the calendar web control, there are a number of javascript date time pickers around you could use.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have been reading about how you can write your server such that client calls can block at the server, thus awaiting something back (say, a heartbeat msg or some otehr kind of update message).
I am not an expert in threading, and I was wondering how this can be accomplished. I have a cserver that needs to pulse all connected clients with update messages that can be processed on the client's end. I am not able to purchase someone else's remoting framework that claims to be able to accomplish this when its something that can be accomplished for free with reasonably-skilled coding.
Please, any ideas would help me.
|
|
|
|
|
OK.
If its that simple (sending update information) you could use the following approach:
a) A website which has an XML-File with product information
Say: http://update.mycompany.com/autoupdate/products.xml
Contains: <product>
<name>ABC Tool
<version>1.2.3
<location>http://update.mycompany.com/autoupdate/ABCTool/setup_ABCTool_v123.exe
for each product.
Use WebRequest and WebResponse to retrieve that HTML-File, parse it, download (using Request and Response again) it, Process.Start() it.
Thats client initiated and will pass most NAT-Routers and Firewalls, as this uses HTTP. You may want to use HTTPRequest instead, try both, im not sure which one is the right choice.
Another approach:
Every client registers with the server on program start and unregisters on program termination. The Server stores that information in an arraylist and informs all clients on upgrades.
You can do that by calling the asynchronous methods for Socket.Send (BeginSend and EndSend, I believe) for each element of your array list.
Information on how to create client/server applications also is available in the MSDN Docs.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
hi all;
i got a serious problem; iam making network application and am tring to send udp messages from any node on internet to node in local lan who has access to internet through serial router. the problem is when i started to transmite messages i found that i recieves his messgaes but he can't. when i traced the program i found that his ip and port is diffrent than what i bounded it on. of course the ip is the external ip of lan to connect to internet but the surprise here is even port changed!!!!!!!. i can know from udp socket the ip and port of sender but i need to know before sending or recieving becouse there is main server who control all operations and sends those info between node to communicate.
so my question is how can i know virtual ip and port of node in local lan who deal through them to internet?
thx for your time.
marcoryos
|
|
|
|
|
I have a form where a user inputs into a few fields and I validate them for correct format ect..
I do a e.Cancel = true; in my Validating event.
I can put a e.Cancel = false; into my FormClosing event to get it to close with out prompting for correction in my fields.
my problem is that I can't get a "close" button to do the same as the close (top right X) on my form.
How do I set the "e.Close" to false or essentially the samt for my form in whole?
Thanks,
H
|
|
|
|
|
Hi hhrafn,
Do you want to close the form or not? Whats your requirement?
Thanks
SGS
|
|
|
|
|
I'd like the form to ignore the validation requirements and close the form. For now the e.cancel feature doesn't allow me to close a form via a close button.
I can only close by hitting the X in the top right corner. Probalby because there I can access the event that supports this cancel feature and I can set it to false.
|
|
|
|
|
Set the Button 's CausesValidation property to false .
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Cool!
Thanks!
works great
love the little simple solutions
|
|
|
|
|
Hi
I have un over problem. Wheni close the form with Top Right X it fire the validating event of the textbox.
Did you change any property of the form, that it don't fire this event
Help me please
|
|
|
|
|
There´s no way to know the database column max size (VARCHAR(20)<-- size) by the ADO.NET DataColumn or DataTable or Dataset information?
How can I prevent to write more chars than sql column let in a ADO .NET DataColumn of DataTable in for example DataGrid Control.
I Get the MaxLenth property in DataColumn but it has -1 value and the database column is Varchar(20) I want to get 20 not -1
I want to know if is possible get de real max size of text in DataColum that comes from database column with datatype varchar in .net not with sql querry.
Thank for your suggestion.
La realidad no es más que impulsos eléctricos del cerebro - Morpheus
|
|
|
|
|
|
The "Decompilers!!!" post reminded me of something, and OK, I admit I'm lazy and haven't tried it--
What happens to an application that uses reflection when it's obfuscated? All those type names that are strings now refer to obfuscated classes and properties, don't they? So reflection breaks, I would think.
Anyone ever tried it?
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
We're currently looking at several obfuscators here, and the ones I've researched usually mention something about this. I actually encountered one that claimed it wouldn't break reflection, however, nearly all do. I know for a fact that DotFuscator (the one who's community edition is bundled with VS) won't work with reflection; any reflection calls, after they've been obfuscated, will thow an exception at runtime (ouch!).
Fortunately, most of the obfuscators I've tried allow shielding from obfuscation on a per-method basis, allowing you to workaround the problem. It's better just to avoid string reflection, IMO. If absolutely necessary, you could find the method using a custom attribute so it'd work even if obfuscated.
IMO, the obfuscators out there are way over-priced, don't work well, unprofessional (minus maybe XenoCode & WiseOwl), and just seem like a total hack to somewhat protect your code. I mean, you can still see the calls into the .NET assemblies (i.e. most of your code) which remain unobfuscated...
Then there are those apps like DotNetProtector, Thinstall, and others, that compress and encrypt your .NET assemblies into a single native executable. This seems like better protection, but the ones I've tried add a significant boot slow down; I remember DotNetProtector added about 3 seconds to the boot time of our large smart client app.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice
Judah Himango
|
|
|
|
|
Thanks for the response. I guess this doesn't bode well for things like declarative programming, where you use reflection to instantiate object graphs of, well, just about anything. Probably a good argument for compiling the declarative markup into code.
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
I see it like this.
if you use reflection on private members , those members are a part of your API, even if they are private they are still inteded to be used by something on the outside.
and you should not obfuscate the API , only the private implementation.
and dotfuscatior has settings for most of that kind of stuff in the full version.
//Roger
|
|
|
|
|
I'm working on a voice key to be written in C#.
What I need to do is be able to take input from a microphone and measure the onset of vocal input. However, I don't know how I can read input directly from the mic jack in real time. What is the best approach to this?
|
|
|
|
|
There are articles on audio recorders here on CP.
Try searching the multimedia zone.
Regards,
mav
|
|
|
|
|
Hi,
Yesterday I found an application on the Internet that claimed that it managed to browse the source of any .NET application. In curiousity I downloaded it, installed it and tried to view the source of one my projects. Surprisingly it worked.
... which isn't too good!
Professionally it has to be impossible to work with a language that everyone can decompile after it's compiled! How do you do to protect your applications? Is there any methods that prevents this horrible feature? And why did Microsoft implent such redicilous feature?
// Zanathel
|
|
|
|
|
What you need is an Obfuscator for you code. Search for it on Google you will find more then enough information about them out there.
|
|
|
|
|
It's not a ridiculous feature, but an unfortunate side-effect of using an intermediate, hardware-independant language that all managed code is compiled into. The .NET Framework, at execution time, then takes that code, called MSIL, and translates it into instructions that the processor can actually execute.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|