Place A Value In String?

Sep 1, 2009

I am writing a program, and this is only a very small part of it, but it is crucial. i am trying to upload a file to my server, and i am placing the full filepath of the server in a string, before uploading the file. here is what i have[code]...

View 4 Replies


ADVERTISEMENT

Search A String Variable And Place The Match Into Another String Variable In Visual Basic?

Nov 18, 2009

I'm looking for a way to search a string variable for two words and copy the text in between them into another variable. This needs to be done as many times as the match occurs.

View 3 Replies

Correct Place To Format A String In .NET?

Mar 18, 2009

We have a field called employee number in our database. It is char(10) field. we are storing the numbers right justified. so we are storing the numbers as "1", " 2" etc. I am not sure why we started doing this because it happened before I started working here.

Because of this, each function in the business logic that has an employee number as one of the parameters needs to right justify the number. If we forget that, it won't update the database properly.

My question is: Is there a better way to do this so that we don't have to format the number in each function?

View 8 Replies

Place Connection String In Model Or GUI?

Jul 27, 2011

I have a VB.NET 2010 solution, that contains 2 projects, a class library and a Windows Forms Application.The class library basically is a model, used for doing database integration. I currently have the connection string placed in the class library project settings, but they do not seem to be listed anywhere in the config file of the application. What's the best practice for retrieving the connection string in the class library? I don't want to use a singleton. Should it be stored in the application or class library?

View 2 Replies

Forms :: Split Long String By Character Place?

Mar 9, 2009

I have a String with 15 places that I would like to split into 3 pieces: (First 3 digits), (next 3 digits), (remaining 9 digits).

How in VB2008 can I do that? Everything I have read so far indicates seperating by a certain character (ie: "," or " ") but no mention of character place. Seems like a simple thing, but after 2 hours of searching I'm still coming up empty

View 3 Replies

Grab Different Pieces Of A String To Place Them In A Different Order In A List?

Oct 7, 2009

I seem to have a huge issue right now trying to grab different pieces of a string to place them in a different order in a list. Unfortunately i can't just find the placeholders for the strings and extract the data that way so i was using indexOf to find commas in the string provided. the problem i'm having is that i can assign the first comma and extract 0 - "," but i'm stuck on how to progress the indexof so it will move through the string submitting everything between the comma's.

Public Class Form1
Private Sub btnAccept_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAccept.Click

[Code].....

View 4 Replies

VS 2010 : Search String In Tabbed Textbox And Place It In A Label?

Jan 7, 2011

I'm creating a new (or more) tab(s) with a multi-line textbox (filled) at runtime and some text is added. Each time I change/select a (new) tab it needs to search for a string and if found...blablabla.How do I get the control to search in?

View 8 Replies

VS 2008 Navigating My Code - Flow Can Jump From Place To Place

Mar 11, 2010

Like I imagine everyone, I often have problems navigating my code because the flow can jump from place to place. For example, if my code calls routine1, and I then want to go to routine1's code, I know that I can click in the dropdown menu and it will take me to that sub. But wouldn't it be easier if I could somehow right click on the call to routine way and select something like 'take me there' which would transport me from the function making the call to the code for the function being called? Then it would be easy to hop from place to place.

View 1 Replies

Add A String Item, Returned From Another Form To A List Box At A Specific Spot In Place Of Another?

Nov 22, 2010

there's a list-box with items, and say you want to modify an item in the middle of the list. You select that item and click "Modify" button and a new form appears with the previously selected item data from first form ready to be modified in a text-box. After modifying and clicking Ok the second form suppose to return that modified string to the first form and insert the modified string into the same spot instead of the originally selected item, so it looks like it was edited to the user.

View 2 Replies

VS 2008 Remove Selection To A String In A Rtfbox And Place The Cursor Forward One Space

Oct 8, 2010

i need to togglie selection form a string in a rich text box and put careet one space forward.

View 1 Replies

Copy Folder With Its Content From Place To Another Place?

Dec 18, 2011

How copy folder with its content from place to another place. example from C: to D:

View 15 Replies

Cant Move My Form From Place To Place ?

Jun 21, 2011

My form cant move i set none to formborderstyle and made my form transparent using

CODE:

So now i cant move my form from place to place.

View 4 Replies

Place All The Objects In The Same Place On The Screen

Nov 30, 2011

I am learning Visual Basic 2010 and I am working on a space combat program for my own education and amusement (a simulation of the Honorverse space combat system). I have a routine to add ships to the enemy ship roster and then place them randomly on the viewscreen. When I step through the sub with the debugger, it works fine, but when I run it without stopping, it wants to place all the objects in the same place on the screen. It's actually assigning 2 random numbers pertaining to the size of the viewscreen and assigning those numbers to GameObjectScreenLocation through GameObjectWorldLocation.X and GameObjectWorldLocation.Y. The objects are fully initialized to 0 in their constructor, FYI. Code is below:

[Code]....

View 3 Replies

String Manipulation - Copy Each Lines Contents And Place Between The Quotes In Sw.WriteLine (" ")

Sep 22, 2011

I have a large file that I need to copy each lines contents and place between the quotes in sw.WriteLin (" ").

Sample text file

#

# Security Options

#

DisableMemoryCardInsert True

[CODE]...

View 4 Replies

Place A Picture In A Picture Box In Differrent Place?

Aug 9, 2009

i am using vb.net i just wanna ask if we can place a picture in a picture box in different places... for example, we place a picture in the center of a picture box then we place another picture on the left side of the picture box. is it possible?? and also can we use one picture box that can contain more pictures or images on it??? to make it clear, it is a drag and drop senario, first you have to drag a picture from a toolbar for example, then you are to drop it on the picutre box, the problem is, we have to drop more than one picture in the picturebox, so is it really possible?

View 2 Replies

Convert A Decimal ( Decimal Place Holder = Dot) To A Decimal (decimal Place Holder =comma)?

Dec 20, 2010

how do you convert a decimal ( decimal place holder = dot) to a decimal (decimal place holder =comma)?

View 6 Replies

How To Place An Image

Feb 23, 2010

how do i place an image on my form? I won't be using it as a bg rather, it will be found on the lower left corner of the form

View 2 Replies

Same Picture Box In More Than One Place?

Oct 26, 2009

I'm working on a program that has a picture box that moves. I want to have a picture box here and then also somewhere else that are the same. The reason being is that I need the first box that moves to be stopped by these two boxes.I need the second box to work something like this (Using forms as an example because they actually work)

View 2 Replies

VS 2010 The X,Y Value Place Changes?

Aug 16, 2011

I have made a X,Y counter with a timer and a Label. Its work, but sometimes the X,Y values is not corret, as before.We say that a red dot has the X,Y Value 300,400. Then i close the program och open it and check agin. Then the dot can have the X,Y values 304,407. Now it's seems to be that the program has choosen that the red dot has the 304,407 as X,Y value. But i KNOW sometimes it's goning to chanes back.

View 1 Replies

Where To Place ConnectionString In DA

Jan 6, 2011

I designed a DAL (data access layer). This DAL mainly consists of a handfull of methods to call stored procedures. All methods are shared. So no instance generation of the DAL class occurs.

The DAL with it's single class is located in an own project. The connection string is defined in the app-config file of this project.

I want other applications to use the DAL class by referencing the dll generated by the DAL-project. For this reason, I can not any longer define the connection string in the DAL app-config as it is, because the client application determines which database needs to be used.

- Dropping the "shared" keyword of my methods. Create an instance of the DAL class. Add a property for the connection string. When application starts, create one global or multiple local instance/s of the DAL and set it's connection string property.

Comment: I don't like this, because it implies more coding work on the application code side (create instance of class, assign connection string)

- Granting the DAC class access to the connection string defined in the application code by adding a connection string property inside the application code. Thus the DAC class remains "shared".

Comment: I'd need to set a reference from the DAL to the application code during without knowing the application yet. I could try stack tracing or something like that. But it feels to convoluted for me.

View 6 Replies

Determine 1st, 2nd, 3rd Place By Time

Nov 4, 2009

I am having hard time determining how to get 1st, 2nd, and 3rd place determined by time. I was thinking about bubble sort through an array, but since I am determining lowest to highest based on numbers = runner it just sounds more confusing. The code to determine second is not that efficient, I know there is an easier way. That is the part where I am stuck.

Public Class Form1
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click

[Code].....

View 4 Replies

Finding The Place Value Of A Number?

Sep 20, 2009

How would I find the place value of a number?

View 7 Replies

Generate A Map Of A Real Place?

May 19, 2011

I am working on a project in which I would like to generate a map. It should be in bitmap form, and should include such things as roads and cities. I DO NOT want to generate a map of a real place.

View 6 Replies

Get Background And Place It In A Ellipse

Feb 8, 2010

I am moving an ellipse over a UserControl that has a gradient filled background, how can I retrieve the background and place it in the ellipse as it moves? I need this to hide the original text, I will draw new text within the ellipse. I will capture the background in the UserControl Paint event before the original text is drawn.

View 5 Replies

Get The Database And Data Set Changes In Place?

Apr 21, 2009

I spent most of Friday deleting stuff out of my windows project and/or starting from scratch when the data base was changed. What is the cleanest way to get the data base and data set changes in place? The current changes(which I have not applied yet) effect the file that I am maintaining in my windows project. Right now, we manually delete the data set project from our local PC, then copy the new one down from it's permanet location on the server.

View 2 Replies

Get The Number Of The Decimal Place

Jun 15, 2011

How can I get the number of the decimal place, example 1.30 then it should give 2, for 5.0101 should give 4. I'm now doing that:

[Code]...

View 4 Replies

How To Place Subscript In A RTF Control

Aug 1, 2010

how to place subscripts in an RTF control. I know I have to use some sort of code, but I have no idea what it is or how to implement it. For example, I want to write "VBnet" with the "net" being as a subscript.

View 4 Replies

How To Place Textbox In ComboBox

Mar 27, 2010

I have this code inside am event in a combobox. Because I don't know the placement off the textbox before I have run the code in the combobox:
Dim txttotal As TextBox
txttotal = New TextBox
txttotal.Name = "txttotal"
txttotal.Location = New System.Drawing.Point(x4, y)
txttotal.Size = New System.Drawing.Size(100, 15)
txttotal.TextAlign = HorizontalAlignment.Right
Me.TabPage3.Controls.Add(txttotal)
I can see the textbox thats works fine. But in another event I will give txttotal a value
But get the error txttotal not declared.

View 6 Replies

How To Select Place And Set It In Color

Feb 21, 2010

We take as example Microsoft Windows Excel (doesn't matter which version). You know we can select cells in excel but I don't need cells to be selected. I want a location in a color (red) when I select with my mouse. (not when I click or do something else; it's like selecting on desktop in windows). So like I said it has to color in red the region I select on the picture (doesn't matter which picture, I was actually going to use a map of a city as background) set as background in a PictureBox or something else if it's better.

View 19 Replies

Limit Where You Can Place Controls?

Feb 26, 2010

I wrote a class, StyledForm that inherits from Form.

StyledForm draws a styled titlebar, ect. However, in the designer you can place a control over the titlebar (because it isn't actually the form).

In a normal form if you place a control in the same spot, the titlebar (or form edges) would draw over the control, and the control wouldn't receive input there.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved