|
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
|
|
|
|
|
Try using SkinCrafter, a great ActiveX control which you can use for a DEMO version. You can find it at
SkinCrafter[^]
I hope this will fix you prob,
(¯`·._.·[eRiK]·._.·´¯)
|
|
|
|
|
I've got two computers, one XP and one 98 SE. On the XP computer I've programmed a little program and on that computer it works. Now, I want to run that computer on win 98SE (with VB6.0 Runtime Files installed!!). But when I want to run the program it gives a runtime error 430....
I realy don't now where the problem lies.. Here is the code for Form_Load:
Private Sub Form_Load()<br />
List1.AddItem "Bart"<br />
... ... ... ... ...<br />
List1.AddItem "Rutger"<br />
'---------------------------------------------<br />
GetFiles "Gasten\"<br />
End Sub
And:
Public Function GetFiles(ByVal FolderName As String)<br />
Dim oFso As New FileSystemObject<br />
Dim oFolder As Folder<br />
Dim oFile As File<br />
Set oFolder = oFso.GetFolder(FolderName)<br />
For Each oFile In oFolder.Files<br />
Dim LengteFile, LengteFolder, A, B As Integer<br />
LengteFile = Len(oFile)<br />
LengteFolder = Len(oFolder)<br />
A = Lengte - 4<br />
B = A - LengteFolder<br />
List2.AddItem Mid(oFile, LengteFolder + 2, (LengteFile - LengteFolder - 5))<br />
Combo1.AddItem Mid(oFile, LengteFolder + 2, (LengteFile - LengteFolder - 5))<br />
Next<br />
End Function
Can anybody please help me!! This is very anoying!!!
(¯`·._.·[eRiK]·._.·´¯)
|
|
|
|
|
The FileSystemObject that is installed on the other computer is not compatible with the version that you have on your computer. Install Internet Explorer 5.5 or later on the Windows 98 SE and things will work fine. You may also look for a recent version of the scripting runtime from http://msdn.microsoft.com/library/default.asp?url=/nhp/default.asp?contentid=28001169 - I usually prefer to required Internet Explorer 5.5 in my setups since the scripting runtime setup EXE sometimes seem to fail on some older computes.
|
|
|
|
|
i have a logitech webcam which is connected to a usb port.i want to know how can i capture the image from webcam using visual basic.also wanto do some image processing on the captured image like finding the bitmap values,pixel information,x and y coordinates,finding the contrast of image etc.if anyone can help me out with this i will be really greatful.
|
|
|
|
|
|
hi its Richard here,
I have a doubt , Can Anyone help me out.
How to automatically install Mdac along with my software ? I have downloaded mergemodules for mdac,but it doesnt work, i.e. its not getting automatically installed... how to do it? When I attach Mdac.msm merge module in my setup project and see the no. of files, it shows (none), i.e. the list is empty..
Thanks
Richard
|
|
|
|
|
In the package and deployment wizard of VB6 you can enter the name of a program to be executed after installation of the package. This can be the installation of your MDAC version or a bat file containing... whatever.
HTH, Grtz,
Guus
|
|
|
|