Forms :: Changing Data In An Xml Tag?

Jun 8, 2012

I have the below code that can change the data in one XML tag. This is what I want,however, I want it to change all the XML's in a complete directory:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim MyXML As New XmlDocument()

[code].....

View 1 Replies


ADVERTISEMENT

Forms :: Integer Value Changing When Compare Cell Data By Using 'IndexOf' Feature?

Sep 17, 2010

I have a program that is reading an Excel (xlsx) file and I am trying to take the data found in one of the cells and split it based upon the '@' symbol inside that cell. Here's an example: value in cell is "XXX @ YYY" I declare 3 strings (strOriginal, strA, strH) strOriginal is the value from the cell ("XXX @ YYY") then my code is supposed to split up the values in the Original string based upon that '@' symbol.So when my code is done, strA should = 'XXX' and strH should = 'YYY'.

Here is my code

strOriginal = dtbExcelData.Rows(0).Item(0).ToString
y = strOriginal.IndexOf("@")
strA = strOriginal.Substring(0, y - 1)

[code]....

For some unknown reason, the y integer (in this case, it is '4') changes to a random number (it has changed to 44, 61, 124) and causes the error "Error with Excel file: Index and length must refer to a location within the string. Parameter name: length" to occur.I understand why the error occurs (my y integer is not staying at 4)...I just don't understand why that y integer is changing numbers when it should remain as the indexof the '@' symbol. I'm looking for any suggestions on how to pull out the data after the space after the '@' symbol (the 'YYY' portion of 'XXX @ YYY'). Also sometimes the 'YYY' is only 'YY' as well.

View 4 Replies

Forms :: RichTextBox - Changing Font Size Without Changing Families And Styles

Sep 21, 2010

I'm searching for a way to change the font size of selected text in a RichTextBox (rtf) having different font families (e.g. Arial and MS SansSerif) and font styles (underline, bold...) using the FontDialog, but without changing the families and styles. The following code resets all the font attributes, which is not what I want:

[Code]...

View 5 Replies

VS 2008 Adding A Method To All Forms Existing Forms Without Changing Their Code?

Jul 28, 2009

just wondering if it is possible to add a method to all forms in my project without having to do it on one form and Inherit all my other forms from that one

View 3 Replies

Changing The Border Of Forms?

Dec 7, 2010

how I could go about Changing the border of my Forms and the title bar of the forms. I would like to change it globally so that it would take effect on all my forms.

View 3 Replies

Forms :: Changing Look Of Tab Control

Sep 17, 2009

I'm quite new at this but I'm trying to change the look of a tab control other than the options provided in the control's properties. In short I want to create a large tab that will fit a picture but I don't know how to change the size of the tab. I also want to make the control look somewhat different than what the control provided with VS.NET looks like.

What I need to know is how to create a custom control that operates the same as tabcontrol but looks different than the traditional control provided with VS. I tried looking up how to create a custom control but all I could find was how to create one programatically and I don't know how it would apply to a tab control. Maybe the only way to do it is programmatically but I would rather play with the control in the designer than having it appear only at runtime.

View 1 Replies

Objects Set To Nothing After Changing Forms?

Dec 19, 2010

In form frmAddPlayers I declare and create an array of pictureboxes in the Load event using the code:

Dim
pbxPlayerJoined(7) As
PictureBox

[code]....

In the watch window the value of the pictureboxes is System.Windows.Forms.PictureBox. Later in the load event I start a background worker in form sfrmUSBDevice using the code:

sfrmUSBDevice.sReadWriteThread.RunWorkerAsync()

The background worker waits for user input and then calls a subroutine from form frmAddPlayers. The subroutine changes the image in the picturebox to indicate that the user input has taken place. However when the debugger returns from sfrmUSBDevice to frmAddPlayers the watch window shows that all of the pictureboxes have a value of nothing. Then when I try to change the image of the picturebox I get an "Object reference not set to an instance of an object" exception. It seems like when the debugger goes to the sfrmUSBDevice form and comes back to frmAddPlayers the objects on frmAddPlayers have lost their information.

View 5 Replies

Changing Forms Title At Runtime?

Oct 9, 2011

I'm trying to change a forms title at runtime where it = my textbox's text. But I can't even get it to change to "test". When I try to google it, it comes up with vb6's
.caption = "test".
When I try to search it on the forum, it gives me a error message saying:
"Error 502 Bad gateway"

View 10 Replies

Changing Visibility Of Objects Without Using MDI Forms?

Nov 26, 2009

Currently my program randomly removes words from a set of text and inserts textboxes below the text. The user can then enter his/her answers in the new textboxes. What I would like to do is set the program so the user can have two choices one being Easy and other being Advanced. Then when the user hits either button it brings up everything that is currently on the form. I'd prefer to do this without having to use MDI forms. I've had a hard time using the MDI forms and therefore would like to avoid using them. They way I was thinking this could work is all objects would remain invisible except for the 2 buttons and then when you hit one of them they disappear and everything else appears.

View 1 Replies

Does Changing Forms Start A New Thread

Feb 17, 2012

I have a basic form which call functions on a numbers of different forms up to (30), Do these functions run in parrallel, or are they run sequentually.Each function as present calls for disk access, if the threads are running in series, this will present a considrable relay, this is not acceptable.

View 10 Replies

Forms :: Changing Font On A Text Box?

Jul 25, 2010

am writing a program in vb.net 2008 ... I want the user to be able to change the font on a different form, however any code that I try and write comes up with the error code property is read only.. I hope I have given sufficient detail... oh one more thing I am trying to use fontdialog from the tool box.

View 14 Replies

Forms :: Changing The MonthCalendar Size?

Sep 18, 2008

is it possible to change the size of the MonthCalendar to say double its standard size and still only display a single month?

When I resize using clientsize, width and height the multiple months are displayed?

View 7 Replies

Forms :: Changing The Time Looks On Form?

Dec 3, 2011

after adding 3 hours from the local for the 3rd timer, how can i get it to look like timer2 once i debug?PrivateSub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label1.Text = TimeOfDay.UtcNow.ToString("dd/MMM?yyy HH:mm:ss")

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Label2.Text = Date.now.tostring("dd/MMM/yyyy HH:mm:ss")

below once i debug, it gives me, 07:07:15 AM i don't want that, i want it to show like the others?PrivateSub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
Label6.Text = Now.AddHours(3)

View 2 Replies

Track Bar Changing Transparentcy Of Forms?

Mar 24, 2011

On my program I would like a track bar to change the Opacity of certain forms. There is a checked list box so if the user checked the main form and some other forms, boxes and used the track bar to change the Opacity of those forms. If the user uses the track bar and goes right it will increase the Opacity and to the left decreases the Opacity. Then when the user is all done He/She will press the Apply button to apply the changes of the Main Form or Forms.

View 11 Replies

Changing Child Forms Control Box Position?

Apr 6, 2009

Well I'm not sure how to describe it so i uploaded an image that has 2 different control box positions.

[URL]

The one on top is set up as Render Mode=System while the other image is set up as Render Mode= ManagerRenderMode

Both applications were developed in VB using VS2005.

Each one has its MDI container and their MainMenuStrip set up..

What property/reason would be causing this? I just created a test program simulating the same case (MDI container with child forms) and everytime i maximized the control boxes appear in the correct position.

View 2 Replies

Forms :: Changing File Names Throughout Directory?

Aug 25, 2011

I think it was Joshdbr) a long time ago a directory rename program. However, I need help changing this to a file rename program. Our work directory will have a root folder, subfolder and .tif images:

Root
subfolder
22_38839283_939393939.tif
33_23343423_432232434.tif
subfolder
34_34342343_234245252.tif

[Code]...

View 2 Replies

Forms :: Changing ToolStripItem Text Dynamically?

May 10, 2010

I have a ContextMenuStrip attached to a TextBox

Dim TelTBMenu As New ContextMenuStrip
With TelTBMenu
.Name = "TelTBMenu"

[Code]....

Whilst the form is loaded this runs fine twice, but then although the Setting boolean is reset the ToolStripItem text remains unchanged unless the form is re-loaded.

View 2 Replies

Forms :: Controls Changing Size For No Reason?

Apr 20, 2010

My program has two lists, one a listbox and the other a listview viewed in details mode.

Both of them change heights (get taller) for no obvious reason. I am having to add a call to a method that resizes them to the end of every method, which is kind of absurd, I think. Also, when the window size is changed, these components change size, which means I have to keep track of that.

Edit: I had also thought of adding a timer to handle this.

View 15 Replies

[2008] Changing Between Forms While Running The Program?

Jan 31, 2009

I recently started out using Visual Basic, and I've run into a problem.I need to be able to change between my two forms when I run my program, however since I'm still rather new at this, I've been unable to figure out a way to do this.

View 8 Replies

Forms :: Changing State Of Label Depending Upon Two Checkboxs?

Aug 7, 2010

I have added two checkbox controls chkBox1 and chkBox2. What I want to do is that when both the chkbox are same meaning checked or unchecked the label should be On and if both are not same label should be Off.

[Code]....

View 17 Replies

Forms :: TreeView - Changing Download Link For Button

Oct 18, 2011

I am working with buttons I have A treeview that when you click on a node it changes the text in textboxes and I need it to change the command the button does. So when a user clicks a node it changes text in 3 text boxes and changes the download link for the button. As you can see from the code all works fine but I need to use a button to download stuff and I dont know how the download code is

My.Computer.Network.DownloadFile _
("[URL]", _
cookiepack)
MsgBox("done")

That's what I need the button to do
Private Sub TreeView1_NodeMouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles TreeView1.NodeMouseClick
Dim filePath As String
filePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
[Code] .....

View 5 Replies

Forms :: Share Data Between Forms (as Opposed To Passing Data)

Nov 26, 2011

Quite a few threads on passing data from one form to another, but I'm struggling to work out how to share data between the two - back and forth.

For example:

Class1 is a class with 10 string properties

Form1 has 10 labels ("Label1", "Label2" etc) and a [Configure] button.
Form2 has 10 textboxes and a [Apply] button.

I want to load with Form1, and create an instance of Class1. Click the Configure button and load Form2, passing Class1. On Form2 I want to manually fill in the 10 textboxes and hit Apply. The Apply should update the Class1 instance and close the form.

Form1's Label controls should then be updated with the data from the Class1 instance.

I'm fine creating the forms and classes, as well as passing the class into Form2 with a custom Sub New(EmptyClass as Class1) constructor. This gets the empty class into Form2, but how can I get the populated class back to Form1?

As Form1 already exists I don't want to create a new instance with another custom Sub New(PopulatedClass as Class1)

It's also key to be able to use the Form2 multiple times, basically ending up with a Data class being displayed as part of Form1 but updated using Form2? (For example if the Class has already been created and populated with data when it's passed back to Form2 for the second time I would pre-load the Textboxes with the values already in the class).

View 3 Replies

Forms :: Changing Measurement Units Of Form To From Pixels To Twips

Jan 19, 2010

Is there any way so that i can set the measurement unit of a form from Pixels to Twips?

View 5 Replies

.net - Windows.Forms.Listbox Selected Item Font Size Is Changing?

Jan 4, 2011

I have inherited from a Windows.Forms.Listbox so I could override the OnPaint and OnDrawItem methods in an effort to highlight specific items and alternate backcolors. I am also skipping some DrawItem events to prevent flickering.Everything is working fine, however when I select items in the listbox, it looks like the font is shrinking or becoming more compressed.Then when I mouse leave, the font goes back to its normal size and appearance but the same items are still selected (which is correct). During debugging the font never changes nor do any of its properties, but it does end up looking different when the item is selected and the mousedown event just happened.

Public Sub New(ByVal relativityHighlightColor As System.Drawing.Color)
_relativityHighlightColor = relativityHighlightColor
Me.SetStyle( _
System.Windows.Forms.ControlStyles.OptimizedDoubleBuffer Or System.Windows.Forms.ControlStyles.ResizeRedraw Or

[code]....

View 1 Replies

Won't Combo Boxes Update Correctly When Changing Datasource In Windows Forms (VB)?

Sep 27, 2009

In a windows forms project, I have several combo boxes. The first combo box contains a list of objects. Those objects then have several lists which are used as the datasource's for the successive combo boxes, depending on which item is chosen in the first.

[Code]...

View 1 Replies

Forms :: Clear The Dgv When The User Blanks The Combobox Without Necessarily Changing The Selection Index?

Oct 25, 2010

I have just realised that ComboBoxes don't have a Change event. I have a combobox filled with a few items, eg. Bakery, Deli, Fruit & Veg, etc. Choose one of these items, all the related items show in the dgv. However, when I blank the text in the Combobox (press Delete key whilst Combobox has the focus), what event fires so I can blank the dgv? The combobox does not contain a Blank item. Even if it does, the Blank item only fires the ComboBox1_SelectedIndexChanged when the user scrolls down to, or clicks on, the blank value.

I want to clear the dgv when the user blanks the combobox without necessarily changing the selection index.

View 3 Replies

Globalization - Changing Forms Language - Doesn't Apply To Items Inside Group Box?

May 8, 2010

I have a windows form I want to show in two languages. When the user clicks a language button it switches to the other language.

It works fine, when you click it all the labels change to the other language.

Only problem is labels inside a group box do not change.

[Code]...

View 1 Replies

Changing Data In A Structure?

Nov 25, 2009

I have some structures and I change the data inside a loop. This works ok. But as soon as the method ends, all values in the structure are reset???

Heres my

Private Sub ReadDevice(ByRef device As Device)
Console.WriteLine(" Reading device " & Device.name)
Dim data As Short

[Code].....

View 5 Replies

Changing The Data From A File

Dec 11, 2011

Changing the data from one file to another in this case giving a 20% discount to an item and throwing it into another program i.e "cowboy2" for some reason instead of changing the case.toUpper the user gives it selects the last part of array and doesn't calculate anything. Is it an error in the way i'm selecting which case to use?

[Code]...

View 2 Replies

Passing Data Between Forms Without Any Public Methods Or Properties On The Forms

Dec 28, 2009

Passing data between forms without any public methods or properties on the forms. everything but the "Controller" class, which I would like you furnish. I just changed the title from "Intermediate" to "Beginner" This solution is an example of the Observer Pattern. The "Controller" class is the "observed" class, which in this case means it publishes events.

' File Definitions.vb

Public Delegate Sub MessageDelegate(ByVal sender As Object, ByVal e As MessageEventArgs)

Public Class MessageEventArgs : Inherits EventArgs
Public Message As String

[CODE]...

The program should initially display Form1, and Form2. Clicking of the button on either form will modify the Title Text of both forms. I think that you will find the final end result to be pretty neat, as it works with any number of open forms not just two. I think asking for the Controller class is easier than asking for the code in the forms. My solution for Controller class has 7 lines of content, 9 lines if you include Class, EndClass. A minimal solution could achieved with only 4 lines of content, but it would a textbook example of bad programming.

View 12 Replies







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