VS 2008 Reducing Space Between Fonts?

Nov 6, 2010

Dim a as string = "a"
Dim b as string = "b"
Dim c as string = "c"

[code]....

View 11 Replies


ADVERTISEMENT

[2008] Reducing The Code Duplication?

Mar 2, 2009

Reading through "The Pragmatic Programmer", I've come across the DRY (Don't Repeat Yourself) and Orthagonal (keep code modular) principles.I have a suite of modules, some of which have common procedures. Because each module is a separate project in Visual Studio, up until now I have simply copied code from one project to another when 1 module (project) needs to do the same function as another module (project). This is when functionality overlaps, not when 2 modules (projects) do everything the same.

I always suspected this was bad practice (and have seen the fruits of my suspicions when the subs get out of sync), and the book confirmed me in this belief. So, what I want to do is make a central code repository for the 4 or 5 common subs, but I don't know how to do it.Should I make a .dll file for each sub I want to use in multiple places? If so, how do I do that? Is there another way to do what I want to do?

1. I have a subroutine that takes a filepath (and if disconnected also a SqlConnection) and loads the referenced file into a database as a BLOB.

2. I have 3 separate projects in 1 VS solution that all run basically the same version of this code.

3. I want all 3 to run EXACTLY the same code.

4. I want 1 version of this code so that any changes made don't need to be made in 3 places.

5. I have a few other instances like this for other subroutines.

View 8 Replies

VS 2008 Reducing The Size Of The Tabs On A Tab Control?

Jun 28, 2011

I noticed that when using a single letter as the title on a tab of a Tab Control , the tab is bigger that it should . Look on this example :

The above Tab Control behaves normally because the text on each tab is sufficient to keep it big enough . The lower Tab Control , however , has its tabs too big . Is it possible to reduce its width ? I saw there is an ItemSize property of the Tab Controls , but unfortunately I can only modify the height of the tabs . No matter what value I set for its width , the width remains always the same (and larger than it should) ...

View 4 Replies

VS 2008 Enlarging And Reducing Size Of A Circle Using Scrollbar

Nov 29, 2010

Im trying to enlarge a circle on a form using a scrollbar.I have managed to do this using the following [code]Thing is the code draws a circle on every scroll movement. You end up with a mass of circles. I want it to clear previous graphic and just show the circle that relates to the current scrollbar graphic, giving the impression of enlarging and shrinking.

View 3 Replies

Get A Certain Text Inside A Textbox To Equal That Text Space To Space Or Null To Space?

Sep 25, 2011

How would i get a certain text inside a textbox to equal that text space to space or null to space?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Textbox1.Text.StartsWith(Textbox2.Text + " ") And Not String.IsNullOrEmpty(Textbox2.Text) Then
Textbox1.Text = Textbox1.Text.Remove(0, Textbox2.TextLength)
Textbox3.AppendText("a")
End If

Btw: after i finish this step my project will be finished!

View 4 Replies

Use Marathi Fonts In VB 2008?

Mar 31, 2010

How to use marathi fonts in vb.net 2008.

View 2 Replies

Changing Fonts In A Textbox - VB In VS 2008 Pro

Aug 2, 2010

I am working on a a program that uses a textbox to display data from a telescope. Normally the data is standard ASCII characters, but there is one time when the data is displayed as blocks to indicate the number of degrees to go. The textbox font is set to Sans Serif in the property box. When I show the blocks, I want to switch to Wingdings. I have searched how to change the textbox font and tried several ways found, but none of them work. I know that the textbox will handle Wingdings - I can set the font property and it displays correctly.

The most common method I have seen is: txtDisplay1.Font = New Font("Wingdings",26.0, FontStyle.Regular) ,but like all the other methods tried, the font never changes.

View 7 Replies

VS 2008 Automatically Install Fonts?

Oct 20, 2009

I have made updates to my programs, including a large update with the fonts on my forms. The only problem is this font is not found on vista or Windows XP and must be downloaded. The program is completely ruined with its looks without it. Is their a way so that both Windows XP and Vista could download these fonts, On startup of the first form, Form Load maybe? Even if the user says that he or she would like to see the program with the fonts? I just don't want to take the many hours i wasted resizing with the new fonts, ect. If it would be easier I could ask the user if they are using Windows XP, Or Vista?

View 10 Replies

VS 2008 Changing DGV Fonts At Runtime

May 9, 2009

I have 2 Comboboxes on my Form which also has a DataGridView. One ComboBox is populated with Font Names and the other is populated with a range of Numbers (Font Sizes). On a button click I've added this code

[Code]...

View 2 Replies

VS 2008 Put Color To The Fonts On Program?

Jan 7, 2010

How can i color the fonts in my programe on runtime?

View 15 Replies

VS 2008 Saving Colors / Fonts To The Registry

Mar 9, 2012

I think I'm starting to wear out my welcome by posting so much one after another..but, I'm having so much fun with this..Like a kid in a candy store. one more thing then I'll give you fellows a break. I was trying to get the colors and fonts to go into the registry and have the program pull those settings back into the program when its opened up but i can't seem to get it right for some reason. I only included the one line in the Form1_Load and left what i had in the in the other. Obviously this code is incomplete, and not functional As Is. So how do I save the Font Size, and then Save the listview backColor and Forecolor in the reg, and retrieve those settings when the programs starts?

[Code]...

View 8 Replies

VS 2008 - Change Multiple Selected Fonts In Richtextbox

May 17, 2012

iam using this code to change the font in a richtextbox it's work if user select a single font if there are multiple fonts, and font sizes it dosenot work

[Code]...

View 13 Replies

VS 2008 - Add Space In Text Box

Jun 19, 2011

I work on one project. When i have text in TextBox1 The text is : asddsa123456 I wanna to make text : asd dsa 123 456 Simple to add space.

View 8 Replies

VS 2008 Set The Space Between Tomb And .exe To Anything?

Jul 26, 2009

I have a file search method, but I have a question about it.

THis is the code

Dim MySearch As New FileSearcher("D:", "tomb2.exe", False)
Dim Results As Specialized.StringCollection = MySearch.Results
For Each tstr As String In Results
ListBox1.Items.Add(tstr)
Next

I have other files too : tomb3.exe, and tomb4.exe I'd like to have those to search at once too. I tried "tomb*.exe", but then it didn't find anything.

How can I set the space between tomb and .exe to anything. So it searches all files that begin with tomb and end with .exe ?

View 8 Replies

Calculating GCF And Reducing

Jan 27, 2011

I understand the basics of using VB.NET, what I don't understand is what I need to tell the computer to do. I'm supposed to create a subprogram to calculate the greatest common factor and another subprogram to reduce the fraction from the answers retrieved from the first subprogram. My teacher said something about using Mod to calculate it, and also attempted and failed to explain ByVal and ByRef parameters. I don't even know where to begin other than the parameters I have for each, and even those have a high chance of being completely wrong.[code]

View 1 Replies

VS 2008 Get Available Folder Space With Quota?

Nov 5, 2009

We utilize quotas on our file share using the built in Window quota system. The problem is that doing a dir or using .NET to check available space, only shows the actual space of the hard drive. It seems there is no way (that I have yet found) to get the quota size available to the currently logged in user.

View 1 Replies

VS 2008 Replace Recurring Space?

Apr 8, 2010

I'm still in the learning stages sorry, and this is probably simple to most of you but I couldn't find the answer through searching.I'm trying to work out how to replace each successive space in a piece of text with a single character from "% $ ! @ #" in that order, and loop.

Easier to explain with an example;say I have the text: "This is a piece of text I am using as an example."

It should end up looking like this: "This%is$a!piece@of#text%I$am!using@as#an%example."

View 3 Replies

VS 2008 Replacing Characters :/ And Space?

Jun 22, 2011

i want to replace :/ and space in my date and time ex. "6/23/2011 11:48:00 am" in my lbldate.text. how can i replace this 3 character

View 8 Replies

Reducing The Memory Usage?

Aug 30, 2009

I've been having complaints about my applications that they use to much memory.Is there a way to make them use less?

View 11 Replies

Sql Server - Reducing SQL Connections To Just 1 - ASP.net?

Feb 7, 2012

I am currently working on an asp.net web page with a GridView displaying a table from a database.This GridView has 4 DropDownLists that will be used to filter the data shown on the GridView. When the page loads 4 Sub routines are run, each one connecting to the database with a select statement to fill the DropDownList with relevant filter headings.

Initially, I had one connection with a loop that populated all of the drop downs but these contained duplicates. I then split the filling of each DDL so that the select statements could contain DISTINCT. I would like (and am sure there is a way here) to be able to populate all of the DDLs with data from one connection.

Code for one connection:

Protected Sub FillDepDDL()
Dim conn As New SqlConnection()
conn.ConnectionString =

[code]....

The other 3 column names: FirstName > DDLFN, LastName > DDLLN, Wage > DDLWag.This is only a test DB and the princibles learned here will be applied to a larger live project.

View 1 Replies

VS 2008 Cross Threads -- Lost In Space?

Feb 5, 2012

Frankly, NONE of this makes sense to me..[URL]..They just jump right into code without baby steps that explain the situation.Every other aspect of VBnet has been well spelled out to me and I get it -- but this business of using the serial port and going nowhere because of a cross thread error has me 100% baffled.

If anyone can point me to a tutorial that really explains it simply and well (without jumping into friggin' code).Even in the above link, they show 3 different techniques of addressing the same problem ! (Like I CARE

View 5 Replies

VS 2008 How To Error Trap White Space

Nov 18, 2009

So I have no idea...ive looked around and can't find anything on error traping when a person doens't enter anything. Here is my code as is now...I trap for if the number goes above 36. now I just need to trap the whitespace

[Code]...

View 3 Replies

VS 2008 Inserting A Space To A Line Of Text?

Feb 13, 2011

i tried this but it didn't work,

if label1.text.contains "$" then "$" = " $"

View 2 Replies

VS 2008 Remove The Space In A Menu Item?

Oct 30, 2011

When creating a menu, there is a large gap to the left of the entry. This is where the icons usually go. Is there a way to remove the space if you want a menu without icons?

View 3 Replies

[2008] Remove Blank Space After Line?

Mar 2, 2009

I have a text box with the following text:

[colour=blue]Summary: [/color]
Testing summary

How can I use vb.net to parse this to:

[colour=blue]Summary: [/color]Testing summary

View 2 Replies

If Statement Efficiency - Reducing The Code ?

May 27, 2011

How would you go about reducing the code for this but still allowing it to work the way it is now

Dim updatelesson As String = cmbChange.SelectedIndex
Dim chosenlesson As String = cmbSession.SelectedIndex
Dim changed As String = lstNames.SelectedItem

[CODE]....

View 3 Replies

Reducing Strings To A Certain Length If They Are Longer?

Apr 27, 2009

I'm generating a list of names from my database, but I need to validate them so they are no longer than 15 characters.

Dim Name As String
Dim txtFirst = "../../Names/first.txt"
Dim txtLast = "../../Names/last.txt"

[Code]....

I need Name to be no longer than 15 characters, and it doesnt matter if the name stays in tact, it just needs to cut off characters from the end of the string until its 15 or less.

View 2 Replies

Reducing The Number Of Colors In An Image?

Dec 23, 2011

In the process of creating an Icon object, I need to reduce the numbers of colors in an image from thousands down to 256 or less. I do this by "chromatizing" the RGB values - counting the colors - then re-iterating the process with heavier "chromatization" until the number of colors is reduced to my requirement.

I searched these forums and google on this subject to find out more - but I found that I alone call this process "chromatization" it seems. So I was hoping someone could help me out with the correct terminology.

Specifically, I want to use the correct terminology on my UI buttons (at present I have a button labeled [Chromatize] . .) and I am curious as to whether it would be good practice to "chromatize" the Green most heavily, the Red more moderately, and the Blue least . . . or just "chromatize" them all equally which is what I have been doing

View 2 Replies

Reducing The Range Of A Bluetooth Device?

Oct 22, 2010

i am currently working on an application that reads the MAC addresses of all phones within the range of our bluetooth reader on the workstation. However, we would like to reduce the range of the reader to < 1 meter. I have dont alot of research and the only solution that i have found is a hardware one; i.e. changing the device to a class 3 or getting a custom made device that will have it's range adjusted to our preferences. However, i also know that we can adjust the power that runs through the bluetooth device in order to reduce the range. Is there any way that we can reduce the power of the device ? We don't have many funds atm and we're looking at a software solution and not a hardware one.

View 4 Replies

VS 2005 Reducing The Combo List?

Sep 14, 2010

I have a combo which contains a lot of different colours. If I press b it goes to the b's in the list and if I press it again it goes to the next b. Is it possible to jump to the colour as I type it so if I type blu it would go to blue. Currently it jumps to the first b when I type b but ignores the lu for blue.

View 4 Replies







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