C# :: Buttons Won't Work On Al Tabs

Jun 24, 2014

The opjective was to build an c# deskop windows application for an classic car sales company.

My job was the employees section of the application.

my problem is the following

i have 3 tabs
summary (overzicht)
details
mutation (muteren)

on the details tab i have 2 buttons and a search box both the buttons only do somthing on the summary tab where they also need to take the selected row to the field on the other tabs.

the search box is a text box that neds to find the valve in the summary tab and then als so select the full row and put it in the onther 2 tabs fields.

this is the code for the back en next buttons

private void btnback_Click(object sender, EventArgs e)
{
if (dataGridView1.CurrentRow.Index >= 1)
{

[Code]....

View 14 Replies


ADVERTISEMENT

C :: Replace Tabs With Spaces

Jul 14, 2013

Basically, the task is to replace tabs with spaces, ensuring that the number of spaces is appropriate to get you to the next tab stop (i.e. if you were only 4 spaces away from a tab stop, don't replace the tab with 8 spaces).i've seen have included character arrays, and many have included multiple functions. I realize the text says "these exercises suggest programs of somewhat greater complexity than the ones earlie in this chapter," but it seemed like a very straightfortward task.Have i oversimplified or something?

Code:

#include <stdio.h>
#define TAB_STOP 8
int main()
{
int c, i;
}

[code]....

View 8 Replies View Related

C :: Replace Tabs With Spaces?

Dec 20, 2014

i want to replace tabs with spaces but i didn't get it. I also tried to count all the chars that i read from a file but that does also not work.

Here's what i have so far (fP is just a file)

Code:

void ReplaceTab(FILE *fP) {
int char_ = 0;
if (fP != NULL)

[Code]....

View 5 Replies View Related

C++ :: Getting Input From Txt File With Tabs In It

Mar 13, 2013

Currently I'm trying to write a program that searches a file named "Babynameranking.txt" for a persons name, sex, and ranking. I'm currently having trouble with just being able to search the first line of the text file, which is somewhat of a precursor to being able to finish the program. My current code is:

#include <iostream>
#include <fstream>
#include <string>

[Code]....

Anyways when I run the program I wind up getting an output of

-858993460 -858993460
Done

I'm thinking that because the text file is formatted like this(just an example):

1 Jacob32509 Emily 25048
2 Michael29666 Madison 22149

(the spaces between everything are actually tabbed over)

that it's the large amount of whitespace messing it up.

View 7 Replies View Related

C# :: Tabs Can't Remove From Tab Control

Mar 1, 2014

i used a tab control to open form when user clicks on button of required form.. now the problem is that if form open once it can b again open using its button... how can i stop this re open problem?

View 10 Replies View Related

C# :: How To Get AI To Look For Specific Buttons

May 5, 2014

Basically I am creating a game and I need the ai to look for specific buttons. At the moment this is the code I have, and what it does is it makes the ai look for any random button that has't already been clicked.

Code:

private Button look_for_spaces() {
Console.WriteLine("Looking for spaces");
Button b = null;
foreach (Control c in Controls) {
b = c as Button; // performs a cast

[Code] .....

Now what I'm trying to do is make the ai go through 4 searches in steps instead of looking for any button. I want it first to look for buttons 1, 2 and 3, if there's a space in any then it will be clicked but if all of them are already clicked it will look for spaces in buttons 4, 5 and 6 and so on if that makes sense. But i'm not too sure how I would do it.

View 3 Replies View Related

C# :: How Add Buttons To Dialog Derived From GTK

Jul 31, 2014

I want write my first application using Xamarin Studio and GTK#.

I create new file Dialog.cs: public partial class Dialog : Gtk.Dialog

I add Fixed container and can't add buttons, why?

I must use class Window : Gtk.Window instead of Dialog and show modal this window?

View 2 Replies View Related

C# :: Matrix Of Buttons Variables?

Jun 14, 2014

There is a genereted matrix of buttons:

private void Single_Load(object sender, EventArgs e) {
//code here
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
//a lot of working code here
b[i, j].Click += new System.EventHandler(ClickButton);
}
}
}

What can I do when one of those buttons is pressed (i have the method ClickButton) to know what i and j has he?

I want to make something like this

ClickButton() {
if (x%2==0)
v[i, j] = x; //i and j should be form the matrix of buttons
}

View 9 Replies View Related

C++ :: Processing Buttons Created At Runtime

Oct 7, 2014

I am developing a small game using MFC in which the game options like new game, save, open, exit etc. can be selected from the menu as well as from the buttons inside the window. I have no problems with the menu but the buttons do not seem to work at all.

The buttons are created at runtime using CButton class. To associate the buttons with the corresponding functions, I just used the same resource ID for the buttons as the menu options, but that did not work. When I click on the buttons, nothing happens. If I assign different resource IDs to the buttons, how do I handle the message map entries? Do I have to write different message map entries for the menus and the buttons while their function is exactly the same?

View 6 Replies View Related

C/C++ :: Creating Many Push Buttons In Win32 API

Apr 13, 2014

I am pretty new to windows programming, but i get around with small applications.

Now I want to create a window with 10 push buttons, and was just wondering if there is some smart way, maybe in a loop to create multiple buttons.

Also, on a very populated window, is there a way to maybe have the WM_CREATE commands stowed away in another cpp file? Just for readabilty.

View 13 Replies View Related

C Sharp :: Convert A List To Buttons

May 27, 2012

I have a txt file of drinks, and I want to meak a list of buttons of it (the txt file is build like this: fanta : 2 ), how can I make buttons of all the drinks ( I get the first one in a button , but not the others).

Dictionary<string, double> drank = new Dictionary<string, double>();
     string[] words = new string[8];
     Button button;
     <Button> BtnList = new List<Button>();

[Code] ....

View 1 Replies View Related

C++ :: Making List Box With 2 Scroll Buttons

Oct 13, 2012

I want to make something like this for a game:

It is a "list box" that has 2 scroll buttons (scroll bar not needed). One button push, "scrolls" the list one entry.

Needs to run crossplatform (windows, linux).

View 4 Replies View Related

C++ :: Making A List Box With Two Scroll Buttons

Oct 13, 2012

I want to make something like this for a game:

Attachment 30507

It is a "list box" that has 2 scroll buttons (scroll bar not needed). One button push, "scrolls" the list one entry.

Needs to run crossplatform (windows, linux).

View 2 Replies View Related

C# :: Create GUI Application That Can Resize Also Control Buttons?

May 23, 2012

how can I create a GUI application that can resize also the control buttons. If the user decide to make the windows bigger or smaller I would like my textbox, buttons, etc.. to follow. Like in Java they use a layout manager, but I can't seem to find the answer for c#. I though to use table layout panel, but it doesn't expand when expanding the windows, unless i miss something

View 3 Replies View Related

Visual C++ :: Create A Column Of Buttons In A ListView?

Mar 26, 2013

Is there an easy way to create a column of buttons ina listView?

I need that every file of the listView has a button in the first cell. Is that possible?

View 2 Replies View Related

Visual C++ :: How To Increase Font Size In Buttons

Jan 15, 2014

How to increase font size for a specific button? I tried to change the nHeight but it doesn't seems to change the font size.

Code:

CFont font;
font.CreateFont(
12, // nHeight
0, // nWidth
0, // nEscapement
0, // nOrientation
FW_REGULAR, // nWeight

[Code] ....

View 3 Replies View Related

Visual C++ :: Can Overlapped Buttons Both Receive Notification

Oct 17, 2013

I have multiple bitmap buttons of non-square shape. Because of their odd shape I can overlap them and they will still look good on screen, which is what I want - that certain layout.

The problem is that because underlying button in reality is square (which I am subclassing), the bitmap of one button may overlay with the non-bitmap area of the other button (in the underlying square). This means that 2nd bitmap button will not receive notification because the press is registered with top level window only.

Is there a way that both windows can receive the notification and check if they are in the hot spot, they will respond? I know this is against windows design.

View 10 Replies View Related

Visual C++ :: Array Of Buttons - Click Event?

Oct 15, 2012

I have successfully compiled a code where I created an array of buttons. I have added a click event to it like this :

Code:
buttons[indexofhashis2]->Click += gcnew System::EventHandler(this, &Execute::GOBUT_Click);

I have a standard event like this

Code:
private: System::Void GOBUT_Click(System::Object^ sender, System::EventArgs^ e) {
int x;
x = sender->Location.X;
}

Returns error saying Location is not a member of Object^.

I'm trying to create an array of button (user/runtime created buttons) and get different interpretations of the click event depending of wich button is clicked.

For example, if we create buttons[0] I wish to get the 0 or something relevant into the GOBUT_Click event.

View 4 Replies View Related

C Sharp :: How To Remove Dynamically Created Buttons In Gridview

Dec 31, 2013

I'm trying to find a way to remove an item that has been dynamically added when I change my drop down list selected user. The way this works is I add an edit and delete button dynamically when I select a user. I need to have the existing one be removed when I change users. Here is the code I'm using to build the two buttons. How do I remove them? Do I wipe out the columns and then add the columns again?

try {
    dgvBG.DataSource = this.bgDataTableAdapter.GetData(cbPatientID.SelectedItem.ToString());
    try  {
        Image editBGImg = Properties.Resources.editor;
        Image delBGImg = Properties.Resources.del;
        DataGridViewImageColumn btnBGEdit = new DataGridViewImageColumn();

[Code] ....

View 4 Replies View Related

Visual C++ :: How To Add Images To Toolbar Buttons For Activex Control

Aug 8, 2013

//#import "c:windowsSysWow64mscomctl.ocx" raw_interfaces_only //in window7

using namespace MSComctlLib;
CComPtr<IButtons> pButtons;
CComPtr<IButton> pButton;
CComPtr<IImages> pImages;

[Code] ....

View 11 Replies View Related

Managed C++ And C++/CLI :: Opening Forms With Buttons From Form 1 (With Conditions)

Jun 12, 2014

I'm pretty much newbie in creating a successful GUI in C++. Although, i managed to create 4 buttons that should show a certain form. Lets say, Form1 is my main form, therefore - Button 1 will open Form2, and Button 2 will open Form3..... But the conditions is - If there is a form that is already open, clicking again on the Button that should open it, will Close it, but all the forms (form1,2,3,4,5) can be enabled together.

Also, a very important note is that whenever i close a form, in any way of closing it (Not the main form) It will "save" the changes i made (Such as ticking checkboxes and so..) and won't reopen it, it will just use "Visible" i guess ?

Notes :

If i use Form2 ^form2show = gcnew Form2;

and then Form2->Show();

I will be able to simply ATTACK the button and open Billions of form2 ^_^

Although, when i use Form2->ShowDialog();

It won't let me open the form3,4,5.

Which isn't so bad, but when i exit from the form2, it won't save my changes (Such as checkboxes..)

View 6 Replies View Related

C# :: Calculator With Buttons - When Click Numbers Or Operators It Goes To String Array

Mar 26, 2012

I have a calculator with buttons, and when I click the numbers or operators, it goes to a string array. So;

Press 3
Press +
Press 2
Press =

and my array is str[0]='3' str[1]=.... so on...

And also I have a C code which calculates the string you entered with some algorhytms and gives a double value as a result. So the question is;

How can I send my STR array in C# to my C program? I mean I want to use my C program as a source code. and How to return that double value to my C# program?

For now, I don't want to change my C codes into C# codes. I want it to keep as is. Just use it as a source code. Is that possible?

View 2 Replies View Related

C++ :: Getline Won't Work

Nov 14, 2013

I've just started learning from "Jumping into C++". Great book. Unfortunately, I've also encountered my first snag. Practice problem number 3 from chapter 4 tells me to make a small calculator that takes one of the four arithmetic operations and its two arguments as input and give the result as output. Here's what my newbie mind came up with:

Code:
#include <iostream>
#include <string>
using namespace std;
int main()

[Code] .....

The thing that I don't get is why doesn't the function "getline" work. It's worked in previous programs. The program seems to work if I simply replace getline with a simple "cin". I could easily use that as a cheap fix but I am interested in knowing why "getline" refuses to work anymore....

View 3 Replies View Related

C :: Cannot Get A Division To Work

Feb 7, 2014

what I do I cannot get a division to work:

Code:

//END RANGE INPUT
long double End;
printf("
Please enter the start of the range (Lower Bound):
");

[Code]...

No matter what I input for the values of 'Start', 'End' and 'Interval', the value of 'SizeL' always seems to be -2.

View 8 Replies View Related

C :: Can't Get Tic-tac-toe Win Algorithm To Work

Apr 9, 2014

I am writing a simple console-based tic-tac-toe game. I am trying to write a function to check whether someone has won the game.

The board data is saved in an array called board: Code: int board[3][3] with each element corresponding either to an empty spot, an X, or an O, using the numbers 0, 1, and 2, respectively. For clarity:

Code:
#define EMPTY 0
#define X 1
#define O 2 Here is my function: Code: int check_state(int board[3][3]) {
int winner = 0;

[Code].....

View 1 Replies View Related

C :: Calendar Doesn't Work

Sep 24, 2013

I just dont see what the issue is here. I have stared at this thing forever. Im trying to make a calendar from scratch so I can be prepared for my second test on Friday.

Code:
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int i, n, s;

[Code]....

View 10 Replies View Related







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