Taking Apart A String
Dec 6, 2009I have a long string that I need to take apart two values, and add them into another string.
View 3 RepliesI have a long string that I need to take apart two values, and add them into another string.
View 3 RepliesI want to split a string that taking both string and integer values like (Cmp_12).
View 4 RepliesI have my program set up to download a web page with a webclient. Normally, I could just use .Substring, but there are about 25 things I need to pluck out of this page, and .Substring, or at least the way I have it set up, takes the first occurrence. The good news is, they are all URLs; they are all similar too.
Each URL is as follows: [URL]
Now, of course, this URL is just made up, but each URL starts with [URL] and ends with 'video'.
How can I hook this up so that it scans the entire page (contained in a string, read from a StreamReader connected to a WebClient), finds each URL, and then adds it to a listview?
I'm using visual studio 2008 and creating a Windows For Application.
I'm almost completed my little application and what I've discovered just recently is that any change I made is not taking affect.
What I mean is if I change the display name of a button or insert a msgbox popup, it doesnt make it to the build when I run it. There are no errorswarnings.
The problem I'm facing is that PrintForm has a shoddy quality while getting the printouts and PrintDocument takes way too long to get on receipt printed (Almost 5-10 Seconds!)I'm either looking for an alternative for PrintDocument or somehow make the PrintDocument run faster
Dim
printFont As
New
[code].....
im trying to get a name entry from an input box to show up in two separate places on my project, ie first and last name, but i either get nothing or the same text for both labels.[code]
View 6 RepliesI am writing an app to take ID pictures using a webcam, I need a PictureBox to display a live image of the person sitting infront of the webcam in which I then need a captured picture to desplay as soon as a Button is clicked.
I don't even know where to start.
1. How do I get the PictureBox to comunicate with the webcam?
2. I also will need to crop and resize the picture and then print it, but this we can diskus later.
I have created an xml file and i would like to now extract data from it.
Is there a function within vb.net that reads xml and takes out all the attributes with a certain name? For example to withdraw all the authors names from an xml file about books?
But like always I have a question. I need to take the data that I have stored in arrays and use it. But how do I do that? What I need is to take numbers stored in the arrays and add and subtract them and put them in the appropriate array , like this:
[Code]...
Is there a way to use ReadAllLines to read in a text file that contains some Chr(10) (linefeeds) but uses ONLY the Chr(13) (carriage return) as the true end-of-line?What I mean is, DON'T treat a Chr(10) as the EOL. ONLY treat a Chr(13) as the EOL.Obviously I could just read in the whole file as binary and then split it into lines by scanning for Chr(13), but I just wondered whether or not there's a setting in VB.NET to set the EOL character so I didn't have to do that.
View 4 Repliesi found some code to take screenshot from screen it works perfectly - changes and my vb.net - skill is pretty low ode is here:
Imports System.Runtime.InteropServices
Module Module1
<DllImport("user32.dll")> _
[code]....
I have this fingerprint scanner I'm working with. The fingerprints taken are index/stored in our imaging system and the fingerprints are put on certain documents and printed.When I scan the image in and then load it into a bitmap object, the width and height are (w:480,h:640).Now if I open this file in any image viewer and print it from there the finger print is as big as a fingerprint should be.Now when working with it in code, it's huge. I have found some resize code online, but the resulting image is horrible.Is there anyway to resize an image while taking in account the dpi and such so the image is highest quality (same as print out?).
View 2 RepliesI made this VB.NET code to take a picture of my entire screen, but instead it only takes a photo of the focused area. Why is this?
Public Function SaveScreen(ByVal theFile As String) As Boolean
Try
SendKeys.Send("{PRTSC}")[code]....
I'm watching tutorials about creating Web Site and about controls.I think I added SQL Database to the project (it's not empty) properly. Suppose it has two columns: FirstName, LastName.I have TextBox1, TextBox2 and Button1 on the web site form.I enter any integer number (5, 10, 15 or whatever) into TextBox1. I want to press Button1 and get a value of 5th person (10th, 15th or whatever) from SQL Database into TextBox2.Who can help me with that? Should I read about ADO.NET and use something from there?Later I want to use VB for work with that strings.
View 2 RepliesI am trying to simulate human temperature taking. Basic I just need a button, a textbox , a progress bar and a timer. What I want to do is that when the button is clicked, the progress bar will slowly increment and after it reaches maximum, a random number in the range 35-40 will be generated in the text box.
Now so far, this is what I've done:
Public Class Health
Private Sub Health_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
[Code] .....
So this is suppose to be a temperature gadget for kids and therefore when a certain amount of temperature is reached...an alarm is sent to the parents. So the progress bar is working fine. The random number generator too. A "sent" dialog box is open if the temperature is >38.
1-The number is working. But I would like the number to b e generated AFTER the progress bar reaches maximum.
2-The sent dialog box is open basically the moment I click on the button to start the progress bar (if the num generated is>38). And it keeps up looping and opening.
I am executing stored procedure using ExcuteReader() command. If I execute Stored Procedure in SQL server it is taking 2 secs. But in code taking around 2 mins. I tried DataAdapter.Fill(). Still the same.
What is wrong in the code?
spString = "usp_graph"
sqlcmd_q.Connection = sqlCnn
sqlcmd_q.CommandText = spString
[Code]....
I have List (of class). having 1800 of count and each object has 90 properties. When I terate earch with 90 properties taking more and more time. How to resolve this
Dim cellIntStyle As HSSFCellStyle = hssfworkbook.CreateCellStyle
cellIntStyle.DataFormat = HSSFDataFormat.GetBuiltinFormat("#")
Dim cellDateStyle As HSSFCellStyle = hssfworkbook.CreateCellStyle
[Code]....
i have changed some of the properties of the form & it's controls but while runtime same is taking effect !
i am changing the form's default location....... "" ....... "".. controls ( Datagridview controls) some column properties but nothing is taking in to effect, but in design time every thing is normal
NOTE:- no code is acting upon this controls IN FORM load or any other event, so i can't suspect that thing
below code is taking 150 to 200 second to read data (actualy my response data is very large) [code]
View 1 RepliesI have a performance counter set up to pull % Processor Time on a remote machine.
Heres the code I use to pull it:
Code:
Private cpuCounter As PerformanceCounter = Nothing
Try
cpuCounter = New PerformanceCounter("Processor", "% Processor Time", "_Total", strServer)
[Code].....
However, sometimes it can take 40-50 seconds for this one counter to process.. when its been created (the 'cpuCounter =' line), then it runs just fine, I can pull nextvalue without any problem.. but creating it takes forever.
This only happens the first time I run my program and it only happens with the first counter, and it doesn't ALWAYS happen.
I have a session variable in my asp.net application. The session variable holds a value from the database, that reflects a customized HTML color value.In my application, I have an asp button with server side code
btnContinue.BackColor = System.Drawing.Color.FromName(Session("ContinueColor"))
Issue: However, when I run the application, the color value is not being reflected in the button. I did double check, and the session variable does hold the correct value.There are other objects, that use session variables to display colors, and they are working fine.
Update: When I force a color "btnContinue.BackColor = Drawing.Color.Blue", that works perfectly fine.
Setup taking toomuch time for installation
View 5 Repliesto be so simple turns out to have me scratching my head.I have a program that monitors input inside of Quickbooks. When a customer is entered into a sales order my program checks my database for any special information and if it exists, opens a TopMost window to the lower third of the screen with the information showing that is special to that customer. The problem I have is that when the customer is found and the window opens, focus is taken away from Quickbooks and given to my newly opened form. Is there a way to prevent this so that the users input isn't interrupted?
With frmMessage
.Width = Screen.PrimaryScreen.WorkingArea.Width
.TopMost = True
[code]......
I am trying to get so users can select there dates from a calendar and those selected dates will put into a sql query to pull from a database. I am stuck on how to get strings of the dates to fill the query.
Imports System.Data.SqlClient
Partial Class TEST
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
[Code] .....
I have 5 forms after the first initial login form which i believe to be correct You are to enter customer details which so far i believe to correct(all fields must be filled) I then have a Service or repair screen whichever the user wants. on the repair screen i have a checkedlistbox with repair types in. anyway after all of this i have a calculate button on either service and repair screen and i want to know how to pass all customer details and repair or service onto an invoice displaying the cost of the service or repair Inlcuding VAT and Hourly rate
[Module Var
Public Title As String
Public Surname As String
[Code]....
I am developing a game and I want an options window to be used so that the user enters data into this and it carries to the main window instead of being lost. I tried it with my recent program , guess the color , but it did not work the way I thought. I thought that I could assign it to a string in a textbox to a variable and it would carry into the main window...
I want this to happen:
The user begins the program by clicking shortcut
User clicks options in the toolbar
A new window comes onto the screen
In this window the user will select a map size then click ok the verify , radiobuttons used in this example...
Back to the main screen after clicking ok
User clicks new on toolbar to begin game
Game is then playing...
Form1 <<< Form 2
game screen 3x3 button
end turn
Form 1
New game is begun
form 2 appears
3x3 button is pressed*
variable is used to change map (there is only one map for now)*
form2 closes and form1 shows
End turn is clicked
I am trying to write a program that is a statistical calculator. The way i have it set up is that you press the enter data button and it asks you how many numbers you want entered by inputbox then it proceeds to take the numbers one by one by inputbox. The problem i am having is that i dont know how to take these numbers and then have then printed in the "input" textbox.
Private Sub btnEnterData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnterData.Click
Dim N As Integer
[Code]......
I am trying to write a program that is a statistical calculator. The way i have it set up is that you press the enter data button and it asks you how many numbers you want entered by inputbox then it proceeds to take the numbers one by one by inputbox. The problem i am having is that i dont know how to take these numbers and then have then printed in the "input" textbox. I have attached a pic of my program to give you some idea of what im talking about.
Dim N As Integer
Dim i As Integer
N = InputBox("How many numbers need entered:")
[Code]....
I made a program that take screenshots but it doesn't take screenshot from 3d games what is the code :( and here is my code
[Code]...
my program is bigger than this too much :D but these are the important codes :D
For example in my .txt file contains
Blue Ball
I'd like the outcome to be BB
If the notepad contains:
Big Blue Ball
Then the outcome would be : BBB
The outcome can be anything, displaying on messagebox, label1.text and etc.