C Sharp :: Loop In A Button / Runs Endless When Pressing The Button And Not Only Once

Jun 10, 2014

I have an code that makes form window + button bet bigger when pressed each time, but it runs endless till out of screen,

code:
{
int S1 = 300;
int S2 = 0;

[Code]...

make it so it runs only each time i press the button?

View 2 Replies


ADVERTISEMENT

C Sharp :: Show Results From Values In Text Boxes On Clicking Or Pressing Tab Button

Feb 21, 2013

I am developing application software.entering two textbox value,while click or pressing tab button in third textbox, the result needs to show in third textbox.

View 1 Replies View Related

C Sharp :: How To Give Backcolor To The Button

Jul 14, 2014

I am designing a form ..in wich i used 3 buttons...from these 3 butons ,i wanna give backcolor to button1 . How to give it a backcolor?

View 1 Replies View Related

C Sharp :: Submit Button (to SQL Server DB) Not Working

Nov 26, 2013

I have a submit button, where users are clicking after entering text into textboxes and (hopefully) check boxes (for yes/no).

Here is my code, and when I run it and press submit, there is no action. It just continues to loo.

 string ConnectionString = @"Data Source=.SQLEXPRESS;
AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;User Instance=True";  
            using (SqlConnection dataConnection = new SqlConnection(ConnectionString))  {
                using (SqlCommand dataCommand = dataConnection.CreateCommand())

[Code] .....

Note: I took out the Checkboxes in the code to hopefully get a successful run, to no avail.

View 3 Replies View Related

C Sharp :: Button Click Continuously Until Stop It

Apr 27, 2014

My question is how the button click mull ti times on page load in C# windows form??because in my project i am working on video for LAN based Skype in which i use 2 pictures boxes one for capture images and another for display .. so i want that on page load picture box capture images until i stop it .. following is my code :

image = ((CaptureDevice)cboDevices.SelectedItem).Capture() ;
pictureBox2.Image = image;

View 2 Replies View Related

C Sharp :: Placing Search Button And Finding For A Particular Row In Datagridview

Nov 8, 2012

private void btnok_Click(object sender, EventArgs e)
        {
            DataView dv = new DataView(ds.Tables["Employee"]);
            dv.RowFilter = "empno=" + txtempno.Text;
            dataGridView2.DataSource = dv;

View 1 Replies View Related

C Sharp :: Change Background In All Forms With Button Click

Jul 14, 2013

I made 2 forms and Form2 has buttons with images like planets and game wallpapers etc. When I write the code for button:

this.BackgroundImage = new Bitmap(Properties.Resources._8_8008_by_amplifier404); 
this.BackgroundImageLayout = ImageLayout.Stretch;

// where _8_8008_by_amplifier404 is name of the image located in resources

It only changes background in form which has those buttons as long the form is used. Once I go back to form1 it's changed to null. How to set background in all forms with a button click which will be there until another button with an image is clicked.

Attached Images
two.jpg (69.7 KB)
three.jpg (76.7 KB)

View 3 Replies View Related

C Sharp :: Detecting Mouse Button Down And Up Events On The System Menu Of Form

Feb 16, 2014

How do I detect left mouse button down and up events on the 'Close' option of the system menu that appears when the mouse is clicked on the top left corner of a form?

View 1 Replies View Related

C Sharp :: How To Get Text Property Of Link Button Inside Repeater Control

Jun 14, 2012

I am working with repeater.. Actually i have placed a linkbtn in item template.. In that linkbtn i am displaying names from database.... And i have created an event for the lnkbtn.. In that event i want to get the text property of linkbtn....

View 1 Replies View Related

C Sharp :: How To Bind WPF Datagrid Radio-button Column To Entities Class

May 7, 2012

In my WPF application I created a LINQ to SQL entities class. Then I created a partial class and there add code to my entity class. Below is the code of it:

namespace Mynamespace {
    partial class rts_index {
        #region Fields  
        /// <summary>
        /// Status:
        /// "Selected" - true, "Unselected" - false.
        /// </summary>
        private bool _is_selected;

[code]....

Then I executed LINQ to SQL. Works perfectly well. Then I bound WPF Datagrid radiobutton column to is_selected property of the partial class. Below is XAML code:

.
.
.
<Window.Resources>
<CollectionViewSource x:Key="rts_indexViewSource" d:DesignSource="{d:DesignInstance my:rts_index, CreateList=True}" />
</Window.Resources>

[code]....

And here I have the problem. When I'm changing the radiobutton status from Unchecked to Checked it doesn't change the value of is_selected property from false to true in the partial class. I don't know why.

View 1 Replies View Related

C Sharp :: Create Instance Of Form Into Non Form Class To Access Button / Label

Nov 23, 2014

I have a non form class. I want to update label/ check status of check box etc.. in non form class ( here resides functions that contains logic). How can i do that ?

View 4 Replies View Related

C++ :: Cab Company Program / Endless Loop?

Jan 14, 2015

I'm trying to get this program to return total taxi cab fair an infinite number of times, however, when I use the while statement after for and try to run the program, it just keeps displaying the first total fair rapidly.

specifications:A cab company needs a program to calculate the cost of a cab ride.

The driver will enter the length of the trip in miles.

The miles entered must be greater than 0.

Create a function to calculate the charge. The function should receive one argument, the length of the trip, and should return the total fare for the ride.

The taxi charges a fixed charge of $2.50, plus an additional charge of $1.85 per mile.

Allow the user to calculate any number of trips.

At the end display the total of all the fares.

here is my code:

#include <iostream>
#include <iomanip>
using namespace std;
//function prototypes
double getLength ();
int main () {

[code]....

View 3 Replies View Related

C++ :: Linked List Concatenation - Endless Loop

Apr 22, 2013

Having trouble with concatenating a linked list.. When I call the display function for the concatenated list, it loops endlessly?

#include <iostream>
#include <cstdlib>
using namespace std;
#ifndef Null//Null is being defined to 0 here
#define Null 0
#endif

[Code] ....

View 5 Replies View Related

C Sharp :: To Get Child Window Of MDI Page In Focus On Pressing ALT TAB

Dec 7, 2012

I have MDI form which contains mutliple tabs and each tab has its own child form . When user presses ALT TAB from the from to other application its fine but when users presses ALT TAB back to my application it should keep focus on child form last time it was selected.

View 1 Replies View Related

C++ :: Stop Infinite Loop By Pressing Enter

Apr 12, 2014

I wondering how to stop a infinite loop. The program clears a file then opens it and refreshes it over and over(the file is going to be modified by another program). I want it to start from the beginning anytime i press enter or escape, it doesn't really matter as long as you can restart it.

Here is the complete code:

#include <cstdlib>
#include <iostream>
#include <fstream>
#include <conio.h>
#include <windows.h>
using namespace std;
void x() {Sleep(1000);}

[Code] .....

View 2 Replies View Related

C++ :: Callback For A Button?

Apr 25, 2013

I have made a calendar that looks similar to Outlook, and I have the next/previous buttons, but they don't do anything when you click them. how to create the callback so that when I click next it goes to the next month?

View 4 Replies View Related

C# :: How To Add A Button To A Groupbox

Jun 25, 2014

I have a winform that I added a button to at design time.

Then I decided to add a groupbox to the form because I want to add a few more components to the gbox.

I notice if I add a gbox at design time and add components onto the gbox at design time, then the components show up when I run my app.

However, if I add a gbox after my form already has compoents on it, I can't see some of my components.

How do I move an existing button onto a new gbox so it shows?

I thought this would work but it doesn't:

gboxSettings.Controls.Add(btnChecklistFonts);

View 14 Replies View Related

C/C++ :: Loop Runs Twice When Reading Chars To Array From File

Nov 26, 2014

I am trying to write a function to save the state of a tic tac toe game. It seems to be working well except the loop to read the chars in from a .txt file is running 18 times instead of 9 and thus overwriting the array with blank boxes. The code below is the part of the function I am having an issue with. Counter is being increased every time the second for loop runs which should be 9 times. However, it is apparently running 18 times with the first 9 runs filling newBoard correctly and the second 9 times overwriting it with boxes. how to fix it?

ifstream inputFile("file.txt");
char newBoard[3][3];
char a;
int counter = 0;
while(counter<=9) {
for(int r = 0; r<3; r++)

[code]...

View 2 Replies View Related

C++ :: Push Button On A Website?

Nov 25, 2013

I was wondering if it's possible to push a button on a website programatically. Unfortunately the button link is invisible, otherwise I could simply use the URL it links to. So is there a way to do it in c++ and if so, how?

View 4 Replies View Related

C++ :: Check If A Button Has Been Pressed?

Jul 7, 2014

I know how to check if a particular button has been pressed but I basically want to disable the delete button when ever the listbox has lost focus. I am having issues with the fact the button gets disabled before it receives the message. Is their a way around this that is non hacky?

BOOL CALLBACK DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{

[Code]....

View 1 Replies View Related

C++ :: QT Make Button Unclickable?

Nov 26, 2013

I am new to qt. I want to make it so a button is only clickable if they check a radio box. otherwise it wont do anything. how would i write that?

View 3 Replies View Related

C# :: Custom Button Shape (WPF)

Nov 30, 2014

I have begun switching from WinForms to WPF and I'm having a hard time understanding the new concepts. In WinForms, I had a few User Controls, custom drawn using shapes (rectangles, ellipses, etc). They had some unique properties, like "Flashing" (setting this property to True and setting the "Flash Interval" property to 500 would have resulted in the control changing its background color to white and back again, every 0.5 seconds), "Beeping", etc.

I have tried to replicate these controls in WPF/XAML and so far managed to draw the shape. However, when it came to implementing a custom property that would redraw the background color of the rectangle every interval set by user in another property, i got stuck. The property is being set, but it doesn't change the background color. Alternatively, i have tried this method, with the same results (i got it to show in the "Properties" window in Visual Studio, i can set it, it is being stored in XAML, but it doesn't affect the background.

C# code behind:
public struct LCARSColors
{
public static Brush DarkBlue = (Brush)(new BrushConverter().ConvertFrom("#FF3366CC"));
public static Brush LightBlue = (Brush)(new BrushConverter().ConvertFrom("#FF99CCFF"));
public static Brush Pink = (Brush)(new BrushConverter().ConvertFrom("#FFCC99CC"));

[Code] ....

If i use this line (commented in this code sample):

<!--<SolidColorBrush x:Name="MySolidColorBrush" Color="{DynamicResource DarkBlue}" />-->

The background is colored in DarkBlue (as defined). But if i use this line:

<SolidColorBrush x:Name="MySolidColorBrush" Color="{Binding BackgroundColor, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />

Nothing happens, the rectangle disappears entirely. If i add this to the above line:

FallbackValue=LightYellow

The rectangle is colored in LightYellow, meaning that the property is not accepted and the fallback value is used. Why?

View 9 Replies View Related

C# :: Button Taking To Another Page

Nov 12, 2014

I decided to code my own GUI menu. getting to another page from a button click. I have added the event handler I think (click="Button_click") then in the event handler I have added this:

private void Button_Click(object sender, System.EventArgs e);
}
Response.Redirect("Login.xaml");
}

After researching it says either to use
Response.Redirect("Login.xaml");
OR
Server.Transfer("Login.xaml");
Neither of these work, underlining "Response" and "Server" as an error saying "A namespace cannot directly contain members such as fields or methods."

NOTE: MY MAIN GUI PAGE IS CALLED "mainpage.xaml" THE CODE ABOVE IS STORED IN THE "mainpage.xaml.cs" THIS MIGHT BE RIGHT OR WRONG BUT I'M NOT SURE SO I AM LEAVING SOME EXTRA INFO!

View 1 Replies View Related

C# :: Sharepoint Radio Button Value

Oct 28, 2014

I am working on a website so you can order online for a restaurant. I currently figured out how to get values of all checkboxes and dropdownlists but i still cannot seem to figure out radio buttons.

Right now i am just making a super string with all of the selected values but eventually i am going to want to make a receipt with a checkout page.

//this seems to work alright
XPathNodeIterator toppingIterator = myNavigator.Select("//my:ToppersGroup", NamespaceManager);
s +=+ "";
while (toppingIterator.MoveNext()) {
XPathNavigator node = toppingIterator.Current;
XPathNodeIterator children = node.SelectChildren(XPathNodeType.All);
while (children.MoveNext())

[Code] .....

View 5 Replies View Related

C# :: Make A Button Transparent?

Apr 22, 2014

How can I make a button transparent? I know i can select color Transparent, but that takes the background color, and i want to be transparent all because i have a video behind it. What can i do? :o3

I have a video and there is some buttons which should be pressed. I could insert the buttons but they are semi-transparent...

View 11 Replies View Related

C# :: WPF Window Close Button

Dec 10, 2014

I've been doing some looking and this example seems like the common way to remove the close button on a wpf window. Other than catching the on_click event or using that example, is there no better way to disable/remove that button?

View 2 Replies View Related







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