More Window Enabling / Disabling Troubles

Oct 31, 2010

when I got home to try out the method in the above post in my real application things did not work out.The big difference is that my main form is a MDI. When I open my edit form, it's mdiparent is set to the main form. When I click 'edit' and then disable "me" the entire application goes modal.I was expecting only the MDI child to go disabled, not the whole application..Basically, I want only the MDI child window that opens it's "edit" dialog to go disabled..

View 1 Replies


ADVERTISEMENT

Disabling/Enabling USB Ports?

Jun 6, 2011

I am creating a USB "cookie dispenser" (long story) and I plan on programming it by, when cookie.exe starts, it disables the port, you plug the USB in and press a button and it enables the port (thus powering the device). What I need to know is, is this at all possible? And if so, can you help me get it to work? I know I should put in an effort but it's late for me (UK) and I want to post this overnight so that you guys (in the USA may

View 8 Replies

Enabling And Disabling A Control?

Apr 12, 2011

I am enrolled in a class in Visual Basic 2008. I wanted to drop the class, but it is too late. Now, I am stuck with this project that the professor assigned and it's due this Thursday. Anyway, how do I do this: The credit card number TextBox control is dynamically enabled/disabled depending on the choice of payment type? And did I do the newOrderButton correctly (see code below)? This is also the clear button. And is there a way to do a reset Form? Sorry for that many questions. I am really lost right now because there is a lot to do in this project and I don't even have a clue of how I am going to finish this project.

Private Sub newOrderButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles newOrderButton.Click
' clears all the information that is displayed and start over

[code]......

View 6 Replies

Enabling And Disabling Buttons

Sep 18, 2011

I have a program and I need the Submit time button to be disabled after I enter 5 numbers and then the Get Payment button needs to be enabled. I have been playing around for several hours but cannot figure out how to do it.[code]

View 4 Replies

VS 2005 Enabling And Disabling The Combobox

Aug 14, 2009

Here lies my form: Attachment 72542 I have to perform save and show operations with the access database. If i select the Bank Account radiobutton(Radiobutton1) then Bank Account No. combobox is enabled,Credit Card No. combobox is disabled and user can input the value only in the Bank Account No. field. When the form loads then both the combobox1 and combobox2 are disabled and as the user selects the radiobutton the combobox are enabled accordingly. So i did the following code in the form load event:

[Code]...

View 15 Replies

VS 2008 Enabling / Disabling The Controls?

Apr 28, 2009

i have this function to enable disable the controls on a form....

Private Sub EnableDisableAll(ByVal xType As Boolean)
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is TextBox Then
ctl.Enabled = xType

[Code]...

everything fine ...but when the controls r disabled it shows in the dull color. can i change the color ? as u can see i have given the command to change the forcolor to red to textbox but it still shows in dull greay... i dont want it to be enabled as i am using this to just give a view of records....the back color is changing to white but not the forecolor.....is there any thing more to be done...or any better way so as the items remain enabled but i dont allow the changes to be done.

View 11 Replies

VS 2008 Enabling And Disabling Buttons?

Sep 11, 2009

MessageBox.Show("Disabled")
Button1.Enabled = False
Button2.Enabled = True

[code].....

View 5 Replies

VS 2008 Enabling/Disabling A Textbox?

Jan 31, 2010

I'm trying to make a program where when textbox1 doesn't have a value, textbox2 is disabled but when a value is entered to textbox1, textbox2 will be enabled.

View 13 Replies

VS 2008 Propertygrid Enabling / Disabling

Jan 13, 2011

how can i selectively disable propertygrid items, or even categories based on the value of another property? i read somewhere about a typedescriptor but i couldn't find a good example.

View 6 Replies

Enabling/Disabling Controls Inside A Repeater Isn't Working?

Jul 10, 2011

I'm trying to enable/disable controls inside a repeater:

<asp:Repeater ID="Repeater1" OnItemCommand="RepeaterItemCommand" runat="server">
<HeaderTemplate>
<table>
<th>

[code]....

View 2 Replies

Containers - Why All Contained Controls Within A Groupbox Do NOT Respond To Enabling / Disabling

Feb 10, 2011

I'm working on a winform which contains several controls like textboxes, radio buttons, datagridviews... All of these controls have been added to a main group box called gbDataEntry. My problem is when the user is seeing the form, I set gbDataEntry.Enabled = False but I want to enable some controls like DataGridviews so the user can scroll them. After disabling gbDataGridview I set DataGridView1.Enabled = True but it seems that the datagridview does not respond to this line. Why?

View 1 Replies

Enabling/Disabling A ToolStripMenuItem Programmatically Does Not Enable/Disable The Object

Jul 15, 2009

I am developing an application with a DataGridView (dgvData) that requires a ToolStipMenuItem (tsmiSelectNetwork) of a ContextMenuStrip (cmsNetwork) to be enabled and disabled programmatically based on if the column is sorted or not.

I have set:

'tsmiSelectNetwork.Enabled = False' at runtime
'tsmiSelectNetwork.Text = Select All' at runtime
'dgvData.Columns(5).ContextMenuStrip = cmsNetwork' programmatically

When dgvData is sorted by column 5, tsmiSelectNetwork.Enabled should be set to True; when it is sorted by any other column, it should be set to False (see code below)

Private Sub dgvData_Sorted(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgvData.Sorted
If Not dgvData.SortedColumn Is Nothing Then

[Code]....

The debug output indicates it is functioning properly, but what you seen on the screen is not.

I am using Visual Studios 2008, version 9.0.30729.1 SP; and .NET Framework 3.5 SP1; ContextMenuStrip version 2.0.0.0

View 6 Replies

Hscrollbar Freezes And Control Jumps To Front After Clic And Enabling/disabling?

Jan 14, 2010

I have successfully ported a VB6 application to VB.NET (VS2008, .NET 2.0). Much optimization and rewriting has been done, but there is one possible BUG i cannot overcome. I have a standard HSCROLLBAR control used for accepting a numeric input. The control needs to be disabled during complex computational routines to prevent additional user input. I am setting the enabled property to false and reenabling the control at the end of the calculation cycle. The control is enabled and disabled a few times, because some code has been placed in the onpaint event of a drawing area, and separating the calculation part from the drawing part will be a huge task.

Large changes are handled correctly. Small changes aren't. The problem is that the control freezes in a unknown state after clicking on the arrows. A second click makes the control (and its parent control box) jump up and over everything else in their container.The scrollbar remains functional only via the contextual menu. This happens both in debug and release builds. There are no overrides. Coding/Test platform XP SP3 (more than 1 machine).

There is no code whatsoever that handles neither the parent control nor the scrollbar repositioning and resizing. The only code takes the value of the scrollbar and passes to the calculation section. If I omit disabling and reenabling the control, everything works fine.i tried rebuilding the control from scratch. forcing enabling the control after it has gone haywire does not make changes, disabling the groupbox instead of the single control doesn't make any difference, debugging step by step confirms that things go wrong when drawing the controls within the private system form classes.

View 3 Replies

Reference To Any Code Classes For Enabling Selection Of Folder Via A Dialog Window

Mar 30, 2006

I could use a reference to any code classes for enabling the selection of a folder via a dialog window.

View 5 Replies

Disabling Close Button(X) Of Window?

Apr 15, 2009

I am trying to work on an application that disables the close button (X) on the upper right hand corner of a window. In order to do that I need to use calls to API methods like GetSystemMenu, EnableMenuItem and RemoveMenu. I can figure out how these methods work but there are certain parameters that these methods have whose values that need to be passed to them as argument is unknown to me. How can I know them.

E.G.- for EnableMenuItem, the parameters are- hMenu (handle to the menu), uIDEnableItem (The menu item to be enabled, disabled, or grayed), uEnable (This parameter must be a combination of at least two of the following:

MF_BYCOMMAND or MF_BYPOSITION
MF_ENABLED, MF_DISABLED, or MF_GRAYED)

Now when I call this method from my application I supply the current window handle as the first argument, the item no. to be disabled/enabled as the second argument but I CAN'T UNDERSTAND WHAT TO SEND AS THE THIRD ARGUMENT. What exactly are the possible values for those parameters- MF_BYCOMMAND or MF_DISABLED. I checked certain examples where they are supplying hexadecimal values like &HF060, &H1, 0x400, 0x1000, 0x2 etc. or integer values like 1024, 2 etc. But how would I know what exactly these values are and when to use which value. The same problem arises in case of calling RemoveMenu method. If you know about any chart or tutorial that lists the values of these parameters

View 4 Replies

Disabling Close Window Option In Windows 7?

Apr 13, 2011

I have an application developed in VB.net with 3.5 framework. I have disabled close (X) button on the main form of the application while doing some processing. I have achieve disabling by "Overriding ReadOnly Property CreateParams()" of the form. This is working fine as both control button on form and close option on right click in the taskbar shows disabled. This fulfill my needs on the Windows XP OS but not on Windows 7 OS. As in Windows 7 right click on application icon in taskbar shows a different menu, which has a new "Close window" option.

The close in original menu still shows disabled (this old menu is hidden but can be shown by holding Shift key and right click on the application icon in taskbar). Now I need to disable this "Close window" option as well and only for my application.

Is there a method through which I can do this programmatically.

View 1 Replies

Forms :: Disabling Close Button(X) Of Window?

Apr 15, 2009

I am trying to work on an application that disables the close button (X) on the upper right hand corner of a window. In order to do that I need to use calls to API methods like GetSystemMenu, EnableMenuItem and RemoveMenu. I can figure out how these methods work but there are certain parameters that these methods have whose values that need to be passed to them as argument is unknown to me. How can I know them.

E.G.- for EnableMenuItem, the parameters are- hMenu (handle to the menu), uIDEnableItem (The menu item to be enabled, disabled, or grayed), uEnable (This parameter must be a combination of at least two of the following: MF_BYCOMMAND or MF_BYPOSITION MF_ENABLED, MF_DISABLED, or MF_GRAYED)Now when I call this method from my application I supply the current window handle as the first argument, the item no. to be disabled/enabled as the second argument but I CAN'T UNDERSTAND WHAT TO SEND AS THE THIRD ARGUMENT. What exactly are the possible values for those parameters- MF_BYCOMMAND or MF_DISABLED. I checked certain examples where they are supplying hexadecimal values like &HF060, &H1, 0x400, 0x1000, 0x2 etc. or integer values like 1024, 2 etc. But how would I know what exactly these values are and when to use which value.The same problem arises in case of calling RemoveMenu method.

View 3 Replies

Forms :: Disabling Close Window Option In Windows 7?

Apr 13, 2011

I have an application developed in VB.net with 3.5 framework. I have disabled close (X) button on the main form of the application while doing some processing. I have achieve disabling by "Overriding ReadOnly Property CreateParams()" of the form. This is working fine as both control button on form and close option on right click in the taskbar shows disabled. This fulfill my needs on the Windows XP OS but not on Windows 7 OS. As in Windows 7 right click on application icon in taskbar shows a different menu, which has a new "Close window" option.

The close in original menu still shows disabled (this old menu is hidden but can be shown by holding Shift key and right click on the application icon in taskbar). Now I need to disable this "Close window" option as well and only for my application.Is there a method through which I can do this programmatically.

View 3 Replies

Asp.net Mvc - Drop Down Troubles In .net Using VB And View Model

Jul 12, 2010

I am new to .net, I am just taking a shot in the dark through this whole thing. I have an Addresses table with a StateID and CountryID field. They refer to the States and Countries table. I am using LINQ to SQL and Visual Studio 2010.

[Code]...

View 1 Replies

VS 2010 Reading XML File Troubles?

Apr 15, 2011

I am using the following code to parse a XML file of mine:

Dim xml As String = "<?xml version=""1.0"" encoding=""Windows-1252""?>" & _
"<theref:theref-msg xmlns:csr=""http://www.xxxxx.com/Schema/csr""
xmlns:theref=""http://www.xxxxx.com/Schema/theref"">" & _

[code].....

View 2 Replies

VB Snake Game Troubles With Array And Growing?

May 26, 2010

im making a game for my assignment of snake. Vb10 Im coding 90% by teaching myself. Was just wondering if anyone has any idea how to help me. Im stuck with the array for making new pictureboxes and moving them to extend the snake here i some of the code.

Private
SnakeHead.Left = SnakeHead.Left + xDifference
SnakeHead.Top = SnakeHead.Top + yDifference
If SnakeBody(1).Left <> SnakeHead.Left And
SnakeBody(1).Top <> SnakeHead.Top Then

[Code]...

View 13 Replies

Threads / Timers Troubles While Creating System Service

Apr 5, 2012

I thought that creating a simple system service under VB .NET would be a piece of cake. Boy, was I wrong. First, I find general postings through Google that say you should use the Windows.Forms.Timer. Then, I found conflicting information that says you have to derive the timer from a timer class through code to make it work. Then, people are reporting all sorts of trouble using the various types of threads available. I can't debug threads using the VS 2010 Just-in-Time debugger for obvious reasons (although, I don't know if there is an alternate method to doing this).My project is an application launcher (similar to cron) that will fire off periodically within a certain amount of seconds. I am trying to use the Process.Start() method. I have a Beep() function as the first instruction, and the Process.Start, along with a Process.WaitForExit method to make it block as the last instruction. I had my code doing this through timers, but now I am starting to use threads. No difference in execution. The over-ridden OnStart method does kick off (as I am certain through debugging), but nothing ever happens when starting the service in production, as if it were ignoring all my code. Putting loops and logic in the OnStart method yields a process that won't start. I know it is a threading issue, but I also know it must be mandatory to use threads. I am now dumbfounded as to how to make this work. I am curious to know the solution.

In addition to the service class, I have a ServiceInstaller and ProcessInstaller implemented that I copied verbatim from MSDN.Here is some of the code I am trying to work with. Note that this simply reflects the current state of my code in trying to implement the logic within a thread instead of a timer (which to me would be optimal):[code]

View 2 Replies

Enabling SSL With TcpClient?

Mar 2, 2009

So how does one turn SSL on in System.Net.Sockets.TcpClient with VB.NET code?

Turning it on in System.Net.Mail.SmtpClient is easy, you set the .EnableSsl property. I cannot find a corresponding property in TcpClient. It's probably buried somewhere.

View 1 Replies

UAC Enabling An Application?

Nov 17, 2009

We have an application that is installed and runs just fine on Vista. Our users are requiring a change to our application in order to change the system time on their PC. The code to change the time is as follows:

Private Sub UpdatePCDate()
Dim _ServerTime As Date = GetServerDate()
Dim _offset As Integer = TimeZone.CurrentTimeZone.GetUtcOffset(_ServerTime).Hours

[Code].....

When this code executes, it bombs because of UAC. How can we modify our program to display the message similar to when they try to change the system time via the Control Panel. That is, it warns them that something is about to happen that requires their permission.

View 2 Replies

Delay The Enabling Of An 'OK' Button?

Nov 4, 2009

I am wanting to know how "You" the reader would "Delay the enabling of the 'OK' button for a user.

View 4 Replies

Enabling A Button From A Text-box?

Jun 6, 2011

I have made a program on Visual Basic 2008. I have put textbox1 and button1 ONLY.I have disabled button1. I want button1 only to be enabled when we type some numbers in textbox1. I also want that we can ONLY type numbers in textbox1, not letters or other symbols.

View 5 Replies

Enabling A Button With An Action?

Jun 30, 2010

I am building an application that has a few elements to it but one of the first elements is that when a user selects a date, they have to hit a button in a message box that confirms the date that they selected and then it enables another button. The code is written as such:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles startDateButton.Click
Dim buttondialogresult As String
Dim confirmbox As DialogResult

[code]....

But when I select ok from the Windows.Forms.DialogResult.Ok, it is not enablind the exceptionsButton.

View 5 Replies

Enabling Button On Another Form

Nov 4, 2010

I have 4 forms. I have a button on form2 that when pressed, I want it to enable a button on form1. What I've tried is this:
Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form1.Button3.Enabled
End Sub
But its telling me that the property access must assign to the property or use it's value.

View 5 Replies

Enabling Buttons After They Are Disabled?

May 13, 2012

I attached a picture of how my project should look and what the labels are. There are a total of 12 books and 4 different age groups. In each age group there are 3 books. There is also a previous and next books button which will show the next book in that age group. I want to make it so that previous button is disabled when it is on the first book of each age group and so that the next book button is disabled when it is at the last book. The only issue that I am having is that after the button is disabled it is not enabled again after. Here is my full code for this part as of now. As you can see I made it so that everytime I click on a new age group the previous button is disabled initially.

I took some unnecessary code out of here because I don't want anyone from my class finding this and coping all of my work.

Public Class BookInfoForm
' use this array to display information in this form
Private books(,) As BookInfo = getBooks()

[Code].....

View 3 Replies

Enabling Flash In The VB Web Browser Control?

Jun 5, 2009

Enabling Flash in the visual basic web browser control?

View 12 Replies







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