Make If Command Apply To More Than One Thing
Jul 29, 2009
i 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 Replies
ADVERTISEMENT
Oct 16, 2011
A 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 Replies
Dec 23, 2009
I just want to verify something. I believe it is likely that if I apply the using command to a SqlDataReader, that it will both close the data reader and dispose of it. For example:
Using sdr As SqlDataReader = cm.ExecuteReader()
Dim someInt As Integer = sdr.GetInt32(0)
'other details and actions
End Using
Will that close the sdr SqlDataReader after it exits the Using code block. (I believe it will, but just want to verify.)
View 2 Replies
Feb 9, 2012
I've a problem to extract the key word from the notepad. Currently i have notepad files contain that following information: Notepad files contains information as per below format:
[Code]...
View 3 Replies
Feb 3, 2011
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]...
View 16 Replies
Jun 27, 2010
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 Replies
Aug 26, 2009
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
View 3 Replies
May 27, 2010
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 Replies
Mar 13, 2008
I 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.
View 1 Replies
Sep 10, 2009
I'm new to programming so I would like to know if is there any tutorial about how to make a custom skin for VB .Net 2008 and apply it to a form!?
View 10 Replies
Mar 28, 2012
I am programming in VB 2010 and have a question. I have some code that currently only applies to one text box. As you will see, I have sub setup to handle multiple textbox events. My question being, Is there a way to take this code and apply it to all textboxes that are being handled?
VBCode:
Private Sub TextBoxes_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fnameTxBx.TextChanged, _
lnameTxBx.TextChanged, streetTxBx.TextChanged, cityTxBx.TextChanged
Dim theText As String = fnameTxBx.Text
[code]....
View 6 Replies
Aug 12, 2011
How can I make voice command app??
View 1 Replies
Oct 17, 2011
how to make changes to the (command) buttons? I dont know working with user controls so if you can please tell me some books to read about
View 2 Replies
Oct 17, 2011
Command line programs like ffmpeg.exe accept a parameter like so: c:> ffmpeg.exe -i img%03d.png img.gif This will grab all these images in the directory and use them inside the program:
[Code]....
Is there a clever way to implement this in my VB.net command line project, or do I have to parse the argument for the %0?
View 1 Replies
Sep 24, 2010
I want to make a command line program BUT I really want to have a call function. I have tried this:
[Code]....
View 2 Replies
Sep 6, 2010
How do you make the tab key invoke command such as in Exercise 40 ,Page 51?
View 2 Replies
Oct 20, 2009
I have a GUI VB application, and a seperate command line module. How can i run the command line module through the gui app, without binding / installing?
View 5 Replies
Oct 17, 2011
I'm just taking over an asp.net/vb site, and I'm definitely still learning. I'm receiving the following error:
BC30451: 'ByOwner' is not declared. It may be inaccessible due to its protection level.
I call a datasource with:
<asp:GridView ID="CaseCountByOwner" runat="server" AllowSorting="true" DataSourceID="ByOwner"
And here's what is in the codefile:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
HitMe.AddHit(Request.UserHostAddress, Request.UserAgent, Request.Url.ToString)
Dim user As String = Request.QueryString("user")
If user.Length() = 0 Then
[Code] .....
View 3 Replies
Jan 16, 2010
Recently I tried to make a command which will sum the digits of a number in a text box I used the following code
[Code]...
View 2 Replies
Aug 15, 2011
i want to make a form with movable command buttons.the aim is that these buttons will represent the computers that are installed in one room.or the tables in one bar.all the tables can change depending the order that user give.
View 11 Replies
Mar 7, 2011
For example I have 2 things in the listbox:Install Registry keyDelete filesIf I choose "Install Registry Key" then the button should install the registry key when clickedIf I choose "delete Files" then the button should delete files when clicked
View 2 Replies
Mar 6, 2009
Note: I'm using VB express 2008 I would mostly like to learn about the console application. Like how to make it type in a command and hit enter by itself. The project I'm working on is a booter for my iPod (Long story) I would like to be able to- 1- Either click a button on a form and have the console pop up and input
[Code]...
View 30 Replies
Jan 15, 2010
How to make my form bigger with a click of a command button?
View 2 Replies
Aug 29, 2010
I want to make a program that sends an AT^ command to a port The AT^ Command is
AT^CARDLOCK="TEXT IN TEXT BOX 1"
View 4 Replies
Aug 14, 2009
OK I am probably going to completely fail but I thought I would just try making an SMTP server (which came from another thread on here I was posting in earlier). At the moment I am just concentrating on RECEIVING emails via SMTP, I dont care about sending them yet.So the first thing I want to do is just make my server program be able to receive a simple HELO command from Telnet on port 25. Simple enough eh? Apparently not The problem I have is that my program starts reading the data as soon as 1 character is typed into telnet, rather than it waiting for the telnet user to press Enter before it starts to process the command. I've had a look around and looked at Athiest's examples but cant figure out how to make it wait. Here is what I have so far:
vb.net
Private Sub StartBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartBtn.Click
[code].....
View 13 Replies
Apr 30, 2010
First let me say that I am not sure whether or not this should go in this section or the API section, and if it needs to be moved I apologize. My issue is fairly straight forward, but for some reason I cannot get it to work.
I am trying to send a command to a command line and then submit the command. I have been trying without success to get this to work in v2008 Express and v2010 Express, Here is the code I am trying to us:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String _
[Code].....
View 6 Replies
Nov 8, 2009
i asked a lot for this thing an i need answer and here is an example i need to create something like that connected to WebDav or FTP Server[URL]... this drive you can install it and easy transfer data from your hard disk to the Gmail server and login with Gmail account
i have WebDav Server and FTP server and i need to create Drive like this one to transfer data to this partation and sure to the account at the server
View 7 Replies
Aug 9, 2010
have a web browser and want to know how to create a history thing, I want to be able to view history in a seperate form, I want in my options to be able to delete history, and I want my combobox to be able to view the last addresses I have
View 6 Replies
Jul 20, 2011
Is there a function in Visual Basic that does the same thing as file_get_contents in PHP.I'm a PHP programmer, and I want to write a few scripts to download some data from an API I'm using.
View 1 Replies
Aug 29, 2009
I want Yes to do the SaveFileDialog and save the file.I want No to just close programI want cancel to return to program
Public Class Form1Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
[code].....
View 9 Replies