.net - Change The ReadOnly Attribute In Realtime For Use With PropertyGrid?

Apr 11, 2011

I got a properties class that I send to a PropertyGrid. I want to change the [readonly] attribute of some properties in realtime. Below is an example of such a property in vb.net...

<CategoryAttribute("Graph Limits"), _
Browsable(True), _
[ReadOnly](False), _
BindableAttribute(False), _

[code]....

View 2 Replies


ADVERTISEMENT

.net - Setting ReadOnly Property In PropertyGrid Sets All Properties Readonly?

Jun 12, 2012

I am using a PropertyGrid control to edit my class properties and I am trying to set certain properties read-only depending on other property settings.This is the code of my class:

Imports System.ComponentModel
Imports System.Reflection
Public Class PropertyClass[code].....

This is the code I am using to edit the values:

Dim c As New PropertyClass
PropertyGrid1.SelectedObject = c


The problem is that when I set SomeProperty to True, nothing happens and when I then set it to False again it sets all properties Read-Only.

View 1 Replies

VS 2008 PropertyGrid.BrowsableAttributes Fails When Adding More Than One Attribute?

Sep 11, 2009

I have a class that inherits from control with some custom properties added, and I am using a propertygrid to change the properties at run time. I don't want any of the inherited properties of the control available in the PG so to each of my class properties I amassigning a CategoryAttribute and I am adding the same categories to the PG.BrowsableAttributes collection. When I add a single category to the BrowsableAttributes collection it works fine, but when I add more than one, none of the categories show up in the PG. I am wonding if there is a simple setting in the PG, or if I have missed something setting it all up.

[Code]...

View 2 Replies

Asp.net - Disable Readonly Attribute In Textbox?

Nov 9, 2011

I'm having a problem disabling the TextBox.ReadOnly attribute. Here is my code.

If (ListView1.EditItem IsNot item) Then
Else
If User.Identity.Name = "shinya" Then

[Code]....

but It's not working. I have placed the code in ListView1_DataBound event.

View 2 Replies

Remove ReadOnly Attribute From A File?

Sep 13, 2011

Let say, a file has the following attributes: ReadOnly, Hidden, Archived, System.

How can I remove only one Attribute? (for example ReadOnly)[code]...

View 5 Replies

Detecting Change In Database / Displaying Word 'change' On Screen In Realtime For Any Client Connected

Nov 30, 2010

Can someone please help me create a very very simplistic sample page as the chat page included is too coomplete. something as simple as detecting a change in the database and displaying the word "change" on screen in realtime for any client connected.and I tried creating a global.asax file into which I added in the line mentioned in the link above, but it does not seem to like the word "Setup" in the line [code]

View 2 Replies

ListViewItem Font Change Says Readonly

Oct 12, 2010

I have an app with multiple ListViews W/DragnDrop....I want the text that is first in the list to always be BOLDed. My attempt to bold (below) fails saying readOnly...how can I get around this apparently default property?

Private Sub ListView_DragDrop(ByVal sender As Object, ByVal e As _
System.Windows.Forms.DragEventArgs) Handles ListView1.DragDrop, _
ListView2.DragDrop, ListView3.DragDrop, ListView4.DragDrop, ListView5.DragDrop, _
ListView6.DragDrop, ListView7.DragDrop, ListView8.DragDrop, ListView9.DragDrop, _
ListView10.DragDrop, ListView11.DragDrop, ListView12.DragDrop, ListView13.DragDrop, _
[Code] .....

View 2 Replies

Change DataGridView Cells ReadOnly Property?

Apr 18, 2009

I have a Windows Form that contains a DataGridView. The DataGridView ReadOnly property is set to TRUE. The DataGridView as 3 columns. I would like to make the cells edible (ReadOnly=False) when the RowHeader is clicked. I thought that the following code would do it, but when I click on a RowHeader and then click in one of the cells in that row, the cell is still ReadOnly.

Private Sub dgvData_RowHeaderMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles dgvData.RowHeaderMouseClick

[Code].....

View 6 Replies

Programmatically Change The Value Of A Particular Readonly Column Of A Datagridview?

Oct 1, 2009

I wish to programmatically change the value of a particular readonly column of a datagridview when any other column is edited. This is the code I use:

Private Sub gridViewPFI_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles gridViewPFI.CellValueChanged

[Code]....

View 3 Replies

Readonly DateTimePicker - Change Backcolor And Disable Calender?

Feb 4, 2012

I have the following code that sets a DateTimePicker as Readonly (and it works well). But to give the full effect of being readonly, I would like to implement the ability to change the Backcolor and disable the ability to use the calender. how to change the Backcolor and disable the Calender?

Public Class ReadOnlyDTP
Inherits DateTimePicker
'This hash table stores all the controls extended by this extender provider

[code]....

View 6 Replies

VS 2008 Change Value Of Attribute In XMl?

Sep 5, 2010

I have a big XML files with lots of Attribute names and Values.

How to get all attribute name and check with user specified name, and change its value not name..

<cont>
<have>
<xmls>

[Code].....

I want to find a specific attribute name and change the value of it...

View 9 Replies

Change Component Attribute On MDI Child?

Feb 6, 2012

If I want to chand the background color of all the child windows opened i would use this:

For Each chld As Form In Me.MdiChildren
chld.BackColor = Color.LightGray
Next chld

View 2 Replies

VS 2010 Spontaneous Attribute Value Change?

Oct 16, 2011

I have a userControl that I made, and it was placed on a form with other controls.On the form I pass the values from the other controls to a Function inside the userControl, this then takes the values passed in and the values on the userControl to make and return an object.

The Problem is that when it gets down to '.GameOppScore = OppScore' it decrements .GameScore by 1 and then decrements .GameOppScore by 1. It does nothing to the passed in values or the value in the input text box.

It just randomly decides to -1, I walked through the code while running and couldn't find a reason why it would do that.

[Code]...

View 2 Replies

Change The LastModified Attribute Of A File Without Opening It?

Sep 10, 2011

how do you change the LastModified attribute of a file without opening it?

View 1 Replies

Change The TypeConverter Attribute Of A Property At Runtime?

Dec 20, 2011

I have a class created for use with the PropertyGrid control in a VB.Net application. One of the properties of the class is:

Private _someProp As String
<Browsable(True), _
BindableAttribute(False), _

[code].....

View 1 Replies

Childwindow - Change Component Attribute On MDI Child?

Feb 6, 2012

If I want to chand the background color of all the child windows opened i would use this:

For Each chld As Form In Me.MdiChildren
chld.BackColor = Color.LightGray
Next chld

But how can I modify the color of a textbox found on the child forms?

View 1 Replies

Reading 'object-attribute-attribute Value' Triples From Column-based CSV Files

Nov 27, 2011

here any algorithms/pseudocode for reading/parsing 3-column csv data and determining unique objects/attributes/values?

example data:

john,height,1.75
george,age,21

[Code]....

i have already implemented a solution of my own but it's too slow and i can't find any relevant literature on the internet.

View 6 Replies

Unrecognized Attribute 'targetFramework Note That Attribute Names Are Case-sensitive?

Nov 10, 2011

Possible Duplicate: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive

I am using window xp and iis 5.1 to run the application.

error is occurred Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

[Code]...

View 2 Replies

'SSLAccessFiltercannot' Be Used As Attribute Because It Does Not Inherit From 'System.Attribute'

Feb 2, 2012

I get an error when I try to build my project.'SSLAccessFiltercannot' be used as an attribute because it does not inherit from 'System.Attribute'. [code]

View 1 Replies

Set "user Cannot Change Password" AD Attribute?

Feb 17, 2012

I was originally hoping to use the UserAccountControl Flags found hereASSWD_CANT_CHANGE flag like one would expect. This lead me to this posting Preventing an Active Directory user from changing his/her password using DirectoryServices but I cannot get the saving working.

Here's the code I have right now.
Dim domainContext As PrincipalContext = New PrincipalContext(ContextType.Domain)
Dim user As UserPrincipal = UserPrincipal.FindByIdentity(domainContext, "user5")

[code].....

View 1 Replies

Reading From CMD Into Textbox - Realtime

Jan 29, 2012

i wanted to make a pinging program that could send pings to websites, i have all the code written, i just cant get it to display what is going into the cmd in a text box.... The reason i am having trouble with this is because the code says " output = (process.StandardOutput.ReadToEnd)" it will only display it in the text box AFTER the code has finished....

[Code]...

View 5 Replies

Redirecting Stdout In Realtime?

Sep 29, 2010

I am writing an application in VB .NET which calls external executables (written in C++)and passes them some command line arguments. What I need to do is read back their stdout outputs inealtime , i.e. as they run.I am currently using the ProcessStartInfo class and setting the RedirectStandardOutput property to true and reading it back in from a StreamReader. However, I cannot read this back in realtime. Once the process finishes, the StreamReader will allow me to

View 12 Replies

Transferring Audio In Almost Realtime?

Aug 8, 2010

I'm currently working with a project where I need to transfer the internal audio (sound from the computer) to another computer and play it back there.

I thought of transferring the audio with a TCP server-client connection since I already have the knowledge of how to do that.

My problem now is that I don't know how I would capture the internal audio and how to be able to play it back as a stream on the target computer. I have searched a bit and many people recommend using MCI but I'm not sure if this will work on an "almost realtime audio stream" connection.

So my question is: What is the best way to grab the audio from the computer and then play back the data on another computer (as a stream)? I want to do it in realtime and not "recording" the sound and then send it to the target computer.

View 4 Replies

VS 2010 RealTime Run Scripter?

Feb 19, 2010

i am trying to make a simple scripter. my scripter has a Run button to run the written scripts in a RichTextBox.But in new version of my program i want to make a RealTime run scripter, So don't need to a run button and scripts should process when user type in richtexbox. a way that i had used in my program is this :

On Error Resume Next
FileOpen(1, "c:windowsmagico(test).txt", OpenMode.Output)
PrintLine(1, frmMain.page_script.txtScript.Text)

[code]......

View 1 Replies

VS 2010 TabControl In Realtime?

May 12, 2011

I have hit a brick wall with my latest project.In essence the entire tab control is created on the fly, i have successfully added any number of tabs with the tabpage title being filled correctly. my problem however is when i add the content itself to the correct page, i have no item displayed on any tabs and however i can retrieve the contents and change them with code.

My code takes a pricelist xml file from my works website and my code is supposed to allow this content to be edited and returned to the server with adjusted prices to reflect updates in our costing. All the code works except the part to display the data, and consequently the code to use this data to update the array used for the xml while the program is running is not written.

[Code]...

View 2 Replies

C# - Show Realtime Memory Usage In A .net App?

Jul 31, 2011

You can easily get the memory usage of the current process using workingset64 However I could not find any event like OnMemUsageChanged so I can display a little mem usage meter that displays live/real time the mem usage value. Updating in a timer every second can be done but looks inefficient. Is there anyway I can get an event or callback every time the mem usage changes ?

View 1 Replies

Realtime Compare Keypress Value To An Existing Value?

Mar 10, 2011

Is there a way to detect whether the value the user is entering using keypress method is within the lower and upper limits?For example, the lower limit is 30 and the upper limit is 112 and the current value the user enter is 33 so the next digit is not allowable because it will exceed the upper limit. On the other hand if the user's current value is 11 the next allowable digit is either 0 or 1 but not above I am current using the below method to allow only numbers. Can i expand this code to meet the above requirement?

If Not "1234567890".Contains(Char.ToUpper(e.KeyChar)) AndAlso e.KeyChar <> vbBack Then
e.Handled = True 'When a wrong value is Entered
End If

[code].....

View 6 Replies

VS 2010 Make RealTime Run Scripter?

Dec 31, 2009

i am trying to make a simple scripter. my scripter has a Run button to run the written scripts in a RichTextBox.But in new version of my program i want to make a RealTime run scripter, So don't need to a run button and scripts should process when user type in richtexbox. a way that i had used in my program is this :

ileOpen(1, "c:windowsmagico(test).txt", OpenMode.Output)
PrintLine(1, frmMain.page_script.txtScript.Text)
FileClose(1)

[code].....

View 7 Replies

Writing To Text Resource At Realtime?

Nov 23, 2011

I have a text file that is going to store some data in this current project. Instead of having it stored on a location on the PC (like C:Test.txt) - I wanted it to be a .txt resource of the application.Using a streamwriter isn't working when I'm attempting to write to the file. This following code runs without error however when I exit the application and look at the text resource file it remains blank instead of showing "Testing".

Dim Writer As New System.IO.StreamWriter(My.Resource.TXTRESOURCE)
Writer.WriteLine("Testing")
Writer.close()

View 1 Replies

.net - Deal With Output From A Secondary Process In Realtime?

Apr 27, 2012

I am trying to write a VB .NET program that runs a Perl script and reads and uses the standard output. I'd like to be able to handle each line separately as it is printed, and update my program display accordingly. Here's some code I have "written" (read: "mostly copied off the internet"):

Private WithEvents pscript As Process
Private Sub myProgram_Load(sender As Object, e As System.EventArgs) Handles Me.Load
pscript = New Process()

[Code]....

This works with one problem: the program waits until the test script has run to completion, and then fires several OutputDataReceived events one after the other. This means that when I make it use the real script, it's likely to do nothing for as much as several hours, and then have to deal with, like, 5,000 events at once, despite the fact that stuff was being printed at fairly regular intervals throughout that time.

Is there any way I can make it deal with each line of text when it is written, instead of all of it at once at the end?

View 2 Replies







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