SQL Statements Working With RichTextBox?
May 1, 2010
Im trying to use a listbox to display data from my Access database, but I cant seem to figure out the code.
Here is the code I used to display data from my database into a listbox:
Quote:
Private Sub btnDisplayAverage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplayAverage.Click
dt.Clear()
[Code]....
View 2 Replies
ADVERTISEMENT
Jun 24, 2010
I have just installed VS 2010 Premium on my Windows Vista Machine. I've noticed that in VS2008 when I typed for eg " Public property MyProperty() as string " and pressed the enter..I was getting automatically the expected result. Meaning by that , that VS2008 was generating for me the rest of the code. [code] In Visual Studio 2010 I am not getting this anymore. What happened ? Is this feature still working in VS 2010 ?
View 3 Replies
Jan 18, 2011
I have just installed VS 2010 Premium on my Windows Vista Machine. I've noticed that in VS2008 when I typed for eg " Public property MyProperty() as string " and pressed the enterI was getting automatically the expected result. Meaning by that , that VS2008 was generating for me the rest of the code.
View 10 Replies
Jun 22, 2010
I am trying to do simple insert, update, delete, select statements within VB .NET to access a MS Access database. I have tried all kinds of solutions offered on the web and while the code seems to work, no rows are inserted. Also, I have tried, unsuccessfully, to use the Try/Catch to see if there's an error with no success. I have attached the versions of VB .Net and MS Access I am using: Here's the code:
[Code]...
View 2 Replies
Oct 24, 2009
I have a richtextbox And I have programatically added lines of text to it...I would like to not be able to delete the text I have added, but add more text after. So far I've tried a timer to refresh the text in the richtextbox so that it couldn't be deleted but I couldn't add any text after..
View 4 Replies
Jan 17, 2010
Im creating a "Deal or no Deal" game , heres a pic of it so i can explain this abit better.
All images on the form are pictureboxes. The boxes in the middle are all named box_1, box_2, box_3 etc.
What my code is currently doing is , when i click a box it randomally selects an image from an imagelist. All images in the image list have all the amounts that are displayed on the main form. So if for example "€100,000" is revealed when i click box 1 i want the picturebox on the form labeled "€100,000" to hide.
This is the part that im having problems with. The first time i select a box the image will display and the matching figure will hide. And from then on it will display the images when i click the boxes but wont necessarily hide the correct image (matching the one thats in the picture box)
Really hope someone can spot a flaw somewhere , because its driving me nuts now. Here are box_1 and box_2 codes. And also the project is attached if you would rather have a look to see for yourself whats happening.
Private Sub box_1_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles box_1.MouseClick
MsgBox("Are you sure you want to choose this box ?", MsgBoxStyle.Information)
[Code].....
View 14 Replies
Oct 11, 2009
Can someone give me a site to a tutorial that will help me write a program that will generate a pattern using do while, if else statements,and do until statements. I have been using google but I can't find anything. I need to generate patterns a certain size 6 by 6 or similar such as something like a checkerboard but where the ^ symbols is there a suppose to be a blank space..
View 3 Replies
Feb 1, 2011
I design a form with menu . I used code application.exit() to exit a from. I'm looking printdialog.
View 1 Replies
May 25, 2012
I have spent hours trying to fix this problem I have, basically I want to only display column 1 from my text file in my rich text box. Each column is seperated by a space (" ") When I run the following coding it shows all columns.
[code]...
View 4 Replies
Aug 11, 2011
I have an application that contains a RTB where I allow the user (through a button) the ability to bold selected text. the code to bold is this:
Private Sub btnBold_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBold.Click
rtbComments.SelectionFont = New Font(rtbComments.SelectionFont.FontFamily, rtbComments.Font.Size, rtbComments.SelectionFont.Style Xor FontStyle.Bold)
End Sub
View 6 Replies
Mar 14, 2012
I am trying to figure out how to do this:
if (phrase = hello) then
"say hello"
if (phrase = how are you?) then
[CODE]...
So basically, I want it to work like a timeline. If I say hello, then it will respond and move onto the next if statement. Get it?
Here is the code I have now:
If phrase.Result.Text = "hello" Then
synth.Speak("Hello to you too")
If phrase.Result.Text.Contains("How are you") Then
[CODE]...
View 21 Replies
Aug 26, 2010
I have a richtextbox with a large file inside....I want to be able to search for "Fornication" within the text (KJV Bible) and have every instance of that word to pop up into another richtextbox along with the scripture it is in.
View 1 Replies
Jun 28, 2011
I'm currently having a problem dragging and dropping my label1.text to a richtextboxt which isn't created on design time...well im currently found a solution but i think it is only for a temporary solution because i use a drag and drop i drag it to a textbox then it willl transfer the data to the richtextbox....through the use of the textbox... here is the code ive come through..[code]...
View 2 Replies
Jul 25, 2011
I am creating a text editor like notepad. Well its an advance type because it is a tabbed notepad type. It saves html files.
I only created tabcontrol on the design time named TabControl1. the tabpages and the richtextbox are created on the form load and when adding tabs. [code]...
View 7 Replies
Jul 26, 2011
I have 2 forms. The 1 is named frmMain. inside of it is a Richtextbox named RTB.
The other form is named frmInsert. Inside of it is a Richtextbox named rtbtext.[code]..
View 5 Replies
Oct 18, 2011
I have to Create a Bowling Scores application that allows the user to enter 5 scores and then displays the high score and the low score and then clicking on the Statistics button there would be a label showing which is higher and lower. We HAVE TO USE FOR AND NEXT STATEMENTS.
View 7 Replies
Nov 5, 2011
How can i implement a statement with if for this number to be greater than 0 but less than 10? More Specifically where would the < 10 go?
Quote:
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
[code].....
View 12 Replies
Dec 20, 2009
is there any way to use 2 for every.... statements?
i want to load up my.settings and 1 list will make new toolstripdropdownitem and the other lists is for the tooltiptexts
or I could do it another way, but how can I check the index of items in a my.setting string collection? like if I want to get the text of index number 3 how do I do that?
View 4 Replies
Oct 6, 2010
I am using Microsoft Visual Studio 2008 with VB.NET, and in class we were assigned this project: A procedure should calculate a 2% price increase on all red shirts, but a 1% price increase on all other items. In addition to calculating the price increase, the procedure also should calculate the new price. You can use the variables strItemColr, strItem, decOrigPrice, decIncrease, and decNewPrice. Format the original price, price increase, and new price in the lblOriginal, lblIncrease, and lblNewPrice controls, respectively.
View 1 Replies
Jul 20, 2010
Basically if i wanted my controls to be checked at startup id use a setting obviously
'UI Settings
chkCloseToTray.Checked = My.Settings.CloseToTray
chkAlwaysShowSystemTrayIcon.Checked = My.Settings.AlwaysShowTrayIcon
[code].....
View 3 Replies
Oct 31, 2011
how to combine this 2 statment..
IsConnected("Select * from manager_table", False)
Call Loader()
IsConnected("Select * from Clerk_table", False)
Call Loader()
i hve 2 listview, 2 table from accessdatabase..i put listview in tabcontrol..1 in tab 1 & second in tab 2...
View 1 Replies
Oct 24, 2011
I need to know if this particular block of code will work, and if not, what i need to do to make it work. I'm doing touchy business and i'd prefer to have it right the first time.
strsql = "IF COL_LENGTH('orders','nosign') IS NULL" & _
"BEGIN" & _
"ALTER TABLE orders" >& _
"ADD nosign bit;" & _
"END"
View 2 Replies
Sep 21, 2011
How do I make an OR Statement.
Im trying to do this
name3 = [name2].EndsWith("," Or "." Or "?" Or "!" Or ";" Or ":")
View 1 Replies
Apr 13, 2012
I just wanted to know if it's possible to get an if statement to accept two strings into the same text box. An example of my code so far is below: (although please note that the program does not accept the strings after the "Or" boolean)
Private Sub btnpreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnpreview.Click
If cbox2.Checked Then
[code].....
View 5 Replies
Jun 27, 2010
Okay I need two blocks of code for each of these:[code]Now both of these are under the if statements checking if the startsWith or equalsIgnoreCase check boxes are checked. (Only one is under the corresponding code not both.) At runtime when I check off the boxes neither of these two code blocks execute.
View 4 Replies
Mar 17, 2011
Here is my code as I have it
Code:
Public Class Form1
Dim OpePro(7) As String
[code].....
View 8 Replies
May 3, 2011
I'm having some problems getting a query to run based off another query. Here's the database diagram to give a little background. The primary keys for all the tables are automatically generated by identites. The first 2 insert statements (Donation and Food_Donation) work but I can't get the last insert into Donation_Details to work. Here's the code so far:
View 2 Replies
Sep 8, 2011
I cant really find any good sources for connecting to a database via connection string and executing prepared statements. Could someone show me an example or point me to a resource that might be useful?
View 2 Replies
Jun 27, 2012
I have two if statements and my project sees one and not the other. Here is the code:
If (IsPostBack) Then
HandleUploadedFile()
End If
Dim savePath As String = "Images "
If (fileUpload.HasFile) Then
[Code] .....
When I trace my code I find it goes to the second if and then go to end if without running the code inside the conditional.
View 2 Replies
Jan 29, 2012
I am trying to use if statements to add the prices of a cruises special packages together. I am using check boxes for the packages, so any, from none to all 3 are able to be checked. The packages available are VIP, excursion and restaurant. The price will also depend on the cruise length (7 or 10 day). I am wondering on which format to use, and if I even need to use if statements, how to make this statement true,
View 1 Replies