Make 'try' Thing Work In My Program?
Feb 3, 2011I need to write a program that uses 'try' in it
the program can only accept a number if its bigger than 3 otherwise it would give a error message and return to the start of the [code]...
I need to write a program that uses 'try' in it
the program can only accept a number if its bigger than 3 otherwise it would give a error message and return to the start of the [code]...
I want to enter a formula in VB but don't know how to proceed.
The formula I use in Excel is as follows
=IF(B2="A",M2*20.27)+IF(B2="B",M2*15.96,0)
How can I write a formula to make the same thing work in VB
Im a bit new to vb.net and i have maked a webbrowser but cant get the dock thing to work im not so good to that the form looks like this: [URL] then when i maximize it to full screen it looks like this: [URL] not good how do i fix it?
View 11 RepliesA few years ago I have been busy creating this application but it didn't succeed, now Im coming back to it and similar problems occur. Basically I use SetPixel on a given window to draw a line, work fine, but the line goes away as the window redraws itself.The problem: I have been putting timers and threads on it to make sure the line is being drawn. Is there any way to make a loop to make a certain thing happen about 10-30 times without taking in too much memory/CPU?
View 7 RepliesI completed my VB project a while back and it worked great in XP.Now the same program is needed on computers that have Win7 installed.The program installs without any problems, but when I open it, it gives me an error saying the database is not accessible.
I used Visual Studio 2008 and SQL Compact to design the project.The database was included in the project and in the installation file. I also checked the Programs folder and the database was installed correctly into the correct path.What is the problem with my programs compatibility with Windows 7?
I have 2 labels in my form. I have different content on them.I want to do the following:[code]*loop all the code above nonstop, in order to make this "sequence" running nonstop until i close this program*..Can anyone tell me what code do i need for each underlined part above?
View 2 Repliesi was wondering if theres a way to make an if command apply to more than one thing, this is my problem: theres 9 white squares and if theres one or more thats orange, then a numer.text goes down one but at the moment theres 9 white squares and for every one thats orange the score goes down one, so if three are orange then the score goes down by three, or if five are orange then the score goes down by five, I'd like to make it so that even if there all nine the score only goes down by one.
View 13 RepliesFrom all the chat applications I successfully made each and every one of them required me to port forward my router so that the data can be received. Now my question is how can I make my chat program work on computers that have routers with most of the ports blocked, how do traditional chat programs do it? Perhaps The chat program intercepts packets then sends it to a known port such as 80?
View 17 RepliesI know how to make a setup wizard but when I install my program on other computers, I get an error (SQL Error).
What do I need to install on other computers other than .NET Framework and my program ?
I am developing a VB.Net application. That application might be working on a LAN. MS Access as a backend will be used.
I have developed many single user applications, but don't know of multi user , LAN, manage DB etc. How do I make the program as Multi user on LAN. Data will be accessed at the same time. How to mange such things.
I want to know how can I make a program what will work in any type of resolution & monitor. For example if I make an application fullscreen it will work. But problem is that text boxes or another things will not work properly. For example if I make a program & make it fullscreen for 1440 * 900 resolution it will work fine when it will get 1440 * 900 resolution. But when it will get different resolution like 1280 * 1024 or something like that it will make my application fullscreen but buttons or another things will not be present there in same place. So what should I do to get rid of this problem? All I want to make a program what will adjust itself everywhere(though you change resolution or monitor like 17 inch or 29 inch whatever it will work & buttons & another thinks will be there in same place).
View 1 Replieshow to make my progress bar work depend on the program processes. if my the process take a long time to end, the progress bar will work the same else if the process work for a short time, it work the same also.i've made this code so far
'for the timer tick sub
ProgressBar2.Value = ProgressBar2.Value + 1
If ProgressBar2.Value = ProgressBar2.Maximum Then
[code]....
how do i make an installation wizard so that the program would work on the client machine ( pc or laptop not server ) so that the client doesn't need to download .net framework separetly ?
View 3 RepliesI'm trying to make my program forward port 2303 for UDP so that my game will work without the user having to forward their ports manually every time they want to play.I've searched and come across this C# code but I keep having problems converting it to VB.Net:url...
View 1 RepliesI want my application to be able to communicate 2-way between the application on another computer and the host server which will be running on my computer.I want to use the BackgroundWorker built into vb to create a thing to make it listen for incoming messages, and also send out messages to the client.The client needs to listen and receive, same as the server, because both need to communicate with one another.I do not know how I can make it do either sending nor receiving.I would be using two different background workers to keep the code seperated and organized so that I will understand what code is for what.
I want the code to say that if i receive the message "Apple" without the "" and cap sensitive, then it will change Label1.Text = "That worked, word received Apple" or something similar to that. ( This is because I am ignorant and I want it to interpret the text sent through to figure out what the application is supposed to do, and last time I couldn't figure out how to make it do something when a certain text was received.
I have an application that requires data be entered, and after entering, a button is clicked to process that data. Clicking the button works just as it should--the data is processed properly. In constructing a test module, I provide a set of data values, followed by:
btnWhatever.PerformClick()
Nothing happens. I have used this syntax for years, and it has always worked flawlessly. I have triple checked everything else and isolated the problem to the failure of the PerformClick(). The PerformClick() is in a test subroutine that does nothing but fill textboxes and labels with default data, then calls the PerformClick() on the button to begin processing. Again, the button works fine, the data is entered as it should be, but the PerformClick() does not fire the click event.
I'm building a VB(2010) program to create the graphics for my laserprojector.The program works when I debug it in VB, but when I run the EXE program in the release directory, it doesn't work. The problem in the EXE program is theat I can't draw/view graphics in the picturebox..I coppied my whole program to a new VB project, but I'm having the same problem...In the original project, where the program works, there are no warnings or errors.
View 3 RepliesI am really confused! My program doesn't work if I don't have Visual Studio here in my PC. To test it I have uninstalled Visual Studio. But my program doesn't work though Flash Player is present there (I have used Flash animation in the first form).
To be more sure about it I have installed Flash. But it's not working! That means the Flash animation file (.swf) is not making a problem! It needs support from Visual Studio to start. Doesn't it mean that some files are not attached with a setup file as a result it needs Visual Studio to run? Let me tell you how I create a setup file of my program.
CODE:
When I click on the icon of my program it shows the error message
CODE:
Reporting details: This error report includes information regarding the condition of WindowsApplication1. When the problem occurred the operating system version and computer hardware is use; your Digital Product ID, which could be used to identify your license; and the Internet Protocol(IP) anddress of your computer.
How to make my counter work. I keep feeling like I'm putting it, or maybe just part of it, in the wrong place so I've been moving it all over the place but haven't found anything that works yet. I'll paste my code below and it will be the code that seems to not stop when it reaches the end of my counter. Other ways I've tried it make it stop after one or two, depending on what I did to the code at them time.
Here's what I have at the moment:
Public Class mainForm
Dim guessCounter As Integer
Dim correctAccumulator As Integer
Dim totalAccumulator As Integer
Dim answer As Integer
[Code] ......
VB.NET While 1 = 1
Dim localRecv As New StreamReader(localClient.GetStream)
Dim aString As String = localRecv.ReadLine
localRecv.Peek()
MsgBox(aString)
End While
Basically "aString" will keep updating if new data arrives to the server. This way does work, and keeps MsgBoxing every time I get new data, but I don't wanna use While, I need something else, because It won't run any other code, just keeps looping that. :/
I am using datagridw view control for input purpose but when the datagridviewcell in edit mode the it is no problem to move current column to next column but when it is not in edit mode then and pressing enter key then it is moving to next row and the same column. but how to take over this problem please give me dn idea.
View 2 RepliesHow to make a 32 bit VB.Net com add-in work with 64 bit Office 2010?
View 10 RepliesI'm looking for some advice on how to make my app work with different resolutions as I have posted a demo game on the forum but the game was designed on my laptop which is set to 1280x800 but a few people who have tried the demo are having problems as they are using 1024x768.
Is this a case of getting the computers resolution when the app starts and alter the size and position of controls?
I am using the code below for paypal notifications. I checked the notification history and it comes back as payment_status is Complete BUT the VB code performs the code for the "INVALID" case...
'Post back to either sandbox or live
Dim strSandbox As String = "https://www.sandbox.paypal.com/cgi-bin/webscr"
Dim strLive As String = "https://www.paypal.com/cgi-bin/webscr"
Dim req As HttpWebRequest = CType(WebRequest.Create(strSandbox), HttpWebRequest)
[code]....
Below is a test program I am trying to get working with using SENDKEYS to send strings to a window.The appactivate never makes the notepad window become the current window in focus and the sendkeys doesn't work.
View 8 RepliesI made a custom button to input keypresses:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class KeyInputButton
Inherits System.Windows.Forms.Button
[code].....
I'm trying to convert a function in C# to VB.Net 2008 and can't seem to make the Lamda expression work. The code is taken from a neat little C# SMTP server that saves emails to Azure blob storage
[Code]...
I am making a game that involves moving picture boxes automaticly i can get the boxes moving but I need them to be object orientated but when I try to make it a class i am not to sure how to declare the veriables to make it work. [code]
View 3 Repliesi have a timer and i want its calculation will be done on another thread, since the timer tick event start whenever its enable property is set to true i don't see how to force it to work in another thread.
View 6 RepliesIm trying to make a counter/timer but cant get it to work,
i have a timer and a label
ive been trying to get it set to "00:00:00" Hours,Minutes,Seconds
It justs needs to keep counting up each time.