|
You could either restrict your Property to String type, since your code handles everything as a number internally, or you could make an overloaded Property, one set for handling a String object and another for handling an Integer object. I'd go with making your property a String if you absolutely had to do string convertion to get an Integer out of it. Personally, if your going to be using the input strictly as an Integer, make the Property an Integer and don't mess with functionality you don't really need.
RageInTheMachine9532
|
|
|
|
|
Dear Friends,
Please write how to convert rtf file into hlp file. Also pls guide me how to call the hlp file in vb project.
looking the response eagerly
Thanks & Regards
Mani
arutperunjothi thaniperungarunai
|
|
|
|
|
On receiving a new mail, I want to capture its handle , so as to read it's subject. this thing should be done on new mail event?
|
|
|
|
|
hi Kiran,
If u want to capture the new mail event ie. u want to capture the event as soon as mail comes to SMTP.
Firslty specify that when you want to capture this event, becuase there are two servers i.e
1. SMTP
2. NNTP
Again, when do you want to capture it? i.e.
1. as soon as mail comes to mail server
2.or as soon as mail comes to your Inbox, ie. in drop directory.
Becuase in the above two senarios, different implementatin is there.
The best way to capture is On The SMTP server itself.
SMTP supports CDO which gives you the interface called ISMTPOnArrival.
So implementing this interface , you can capture the event.
Becuase ISMTPOnArrival interface has a method called OnArrival which gets triggered as soon as new mail comes to the server from anywhere.
If you specify your requirements then may be i can help you little bit.
regard
bharti.
bharti
|
|
|
|
|
Hi, Kiran
Ok so you want to catch the incoming mails for SMTP services.
Basically SMTP allows to write a sink class for its EventDispature to pass the meassages through it.
Event architecure of a SMTP is based on COM.
So firstly you need to understand the event architecture ,and related information is given in msdn.
MSDN Home > MSDN Library > Messaging and Collaboration > SMTP Server
so go through it.It will help you alot in implementing ISMTPOnArrival interface which i have mentioned in my first reply.
This is a vast concept, so i will suggest you to go through it first , even if u find any difficulty in that itself or in implementation, i can help yoy out. But it is very necessary to go through these articals before jumping on implementation.
Following are two URLs , please go through it.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/ref_mb_smtpserver.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/ref_mb_smtpserver.asp
regards,
Ms.bharti
|
|
|
|
|
How can we create Matrix Reports in Visual Basic 6.0
using Data Reports dynamicallty
|
|
|
|
|
please explain more clearly
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Hello, guys...
Part of our fourth year curriculum is the System Analysis and Design wherein we will be creating our own systems, e.g. an enrollment system of a certain school and most of the systems created by past fourth year students were the same like payroll systems, registrations systems, elections systems, etc. Can you suggests some systems in the VB.Net language that are different and new?
Thank you...
len_ems
|
|
|
|
|
I basically have three problems here. First I have created a Calculator but it uses error handlers. I have searched to find codes to create a overflow exception code and underflow exception but found no luck. What I want to do is create an overflow and underflow code so that if the interger is over or under the input then it will bypass the following message:
"Unhandled exception of type "System.Overflow" occurred in microsoft.visualbasic.dll"
And the same for the underflow exception error too.
The last problem I need help on is creating another code so that if the user inputs 1.1.1.1 then an error message will occur. The user is only allowed to enter one decimal point and if the user inputs more than one in the text field then I would like an error message to appear. I know how to create an error message but don't know what code to use if there is more than one decimal inputted. I would also like all the codes to use the Try/Catch statements.
Can anyone help me? Thanks in advance
|
|
|
|
|
justmeTW wrote:
What I want to do is create an overflow and underflow code so that if the interger is over or under the input then it will bypass the following message:
Use catch statements that target the System.OverflowException class to display a personalized message on overflow errors.
justmeTW wrote:
if the user inputs 1.1.1.1 then an error message will occur.
I would suggest using an extended textobx control that would validate user input instead of using try/catch clauses.
|
|
|
|
|
So to use the try/catch for the over/underflow the code should be something like this:
Try
myAnswer = myNumber1 / myNumber2
MessageBox.Show(msg1, "Invalid format")
Catch ex1 as System.OverflowException
msg1 = "Error: Invalid Arguement," & vbCrLt _
& ex1.message
End Try
Is this what I would use to bypass the overflow and underflow error exception?
apferreira wrote:
I would suggest using an extended textobx control that would validate user input instead of using try/catch clauses.
Can you go a little more into depth? And if possible an example code. If I see the code I understand more. Thanks so much for the help
|
|
|
|
|
The MessageBox.Show method should be inside the catch statament, i.e.
Try<br />
<br />
var1=number1/number2<br />
<br />
Catch e As System.OverflowException <br />
<br />
MessageBox.Show("Error:Invalid Argument" & e.Message","Invalid format")<br />
<br />
End Try
As for the extended textbox control that validates user input, I suggest you read the following CodeProject articles:
Validating TextBoxControls[^]
Validating TextBox[^]
And for a more general view on custom control development, I suggest the following MSDN article
Developing Custom Windows Controls using Visual Basic NET[^]
|
|
|
|
|
I need help I am doing a Two-Dimensional array and have to report back the windchill. In the project a table is given and in the table we are to see the Wind Velocity and temperature and see the number assigned to it. I know this is probably simple but I can't figure out what should go in the Private Function section of my code. If anyone can help me I would appreciate it.
|
|
|
|
|
could you paste some of your code for more specific detail?
------------------------
Jordan.
III
|
|
|
|
|
If you can help please do, I'm about to have a fit over this small but annoying issue.
I have an image of a solar system, with 15 images that I need to "create hot spots" for. So that when the user clicks them they "do an activity".
I can't find any reference anywhere as to how to create "hot spots". I've been reading and serching but to no avial. I'm coming along nicely with my project so far, but have stumbled over this part..
Can you help ?
Many thanks.
|
|
|
|
|
You don't make "hot spots" in the images. You track the mouse inside your control and then, when the user clicks the mouse, you compare the mouse coordinates to your objects coordinates.
See this[^] article for an example.
RageInTheMachine9532
|
|
|
|
|
Thankyou for this...
I will read and try this, sounds like the correct way to go.
CoopsQC
|
|
|
|
|
the quickest way to do this i think would be to place objects ontop of your image.
have your main big image in the background, and place (ie.)labels ontop of the main image. make the label transparent so the user doesnt know its there. this label can act as your "hot spot". and upon clicking the label it will act just like a normal hotspot, assuming the coding is correct.
if a label doesnt work, use a imagebox or something, with no border or image source.
------------------------
Jordan.
III
|
|
|
|
|
Thanks Jordan,
I was working on this method as a last way out as it makes the screen somewhat slow to redraw, causing a flicker as the screen redraws the invisible lables on top of the image.
CoopsQC
|
|
|
|
|
I was wondering how you shutdown the system through code.
|
|
|
|
|
You can use the ExWindowsEx API but its not without inherant problems.
Here is a link[^] that may help detail the process:
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
LearnVisualStudio.Net
|
|
|
|
|
Help wanted
Please help me
I'm looking for the code to make form effect
those effect are similiar to the powerpoint slide effect
can anyone please help me?
your help will be much apperciated
Gary
|
|
|
|
|
You would have to write your own Form class, inheriting from the .NET Form class and supply your own properties to control what effect you want. You would then have to write your own code to draw the form the way you wanted (owner drawn forms/controls), for each effect that you wanted.
RageInTheMachine9532
|
|
|
|
|
Lots of examples on www.planetsourcecode.com
Grtz,
Guus
|
|
|
|
|
Hello,
I'm currently writing a small VB app in Visual Studio .NET that uses MDI forms. I'm looking to find out how I can skin the main and child forms. So far I've found various VB6 samples which dont convert to .NET and some commercial ActiveX controls. I'd rather learn how to do the skinning myself than just opt out and pay for a control.
If it's too hard with MDI, then I'd be happy to learn how to skin forms in general.
Any help would be great
SplatterX
|
|
|
|