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


ADVERTISEMENT

C Sharp :: Cannot Access Server Page Custom Controls In Website Page

Jan 24, 2015

I m making calendar in server control page by taking composite control.I am also adding textbox in each cell of calendar. Now i want to access the value of each textbox of selected month and respected date in default.aspx page on button click event. Here the button is not a custom control but defined in default.aspx page..

Can't access textbox text and date or controls of server page in website(default.aspx) page.

View 2 Replies View Related

Visual C++ :: Child Window On Top Of Control

Nov 30, 2014

I have a child window above an edit control.

When the position of the control in the parent in the child on top of it is clicked the control gets topmost. Is there any way to prevent this?

View 3 Replies View Related

Visual C++ :: MFC MDI Tabbed Child Window Positioning

Jul 18, 2013

Is it possible to specify the size/position of tabs in an MFC MDI tabbed application?

I am trying to save the open tabs when exiting the program and restoring them when the application is relaunched. I have come up with a method of saving and reloading the tabs, but I cannot restore their position.

I have seen SaveMDIState and LoadMDIState but I can't make it do anything and I'm also not sure if it's what I need.

View 3 Replies View Related

Visual C++ :: Splitting Child Window In MFC MDI Program?

Dec 4, 2012

how to split a child window in an MFC MDI program.

Splitting Child Window in MFC MDI Program

[URL]

For my purposes, this achievement is practically useless because I cannot find a way to pass text from one CRichEditView window to another.

Given two CRichEditView windows, CInputViewView and COutputView as child windows in an MFC MDI app, my goal is to capture text in the former and print that text in the later using a button click.

Using what appeared to me to be a logical way to proceed, I tried variations of the following code:

Code:
void CMainFrame::DoSomething() {
//MessageBox(_T("Like What ?"), _T("Do Something"));
//CInputViewView * pin = (CInputViewView*) GetActiveView();
CInputViewView * pin = (CInputViewView*)m_wndSplitter.GetPane(0,0);
pin->GetWindowTextW(m_csDisplay);

[Code] ....

None of this works and even the attempt to access the pane results in an app crash in winsplit.cpp.

Code:
#ifdef _DEBUG
void CSplitterWnd::AssertValid() const {
CWnd::AssertValid();
>ASSERT(m_nMaxRows >= 1);
//..

View 4 Replies View Related

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 Set Printer For A Web Page

Sep 20, 2012

I have a test web page and a windows form which call a printer and sends a print job to a printer that is on the network. I have been able to successfully do this from the windows form, however, I can figure out how to do it from an aspx page to the server's default printer. Sample codes are below.

Windows Form:
  public partial class Form1 : Form   {
    private const string TEMPLATE_DIRECTORY = @"C:Program FilesBrother bPAC3 SDKTemplates";    // Template file path
    private const string TEMPLATE_SIMPLE = "NamePlate1.LBX";    // Template file name
    private const string TEMPLATE_FRAME = "NamePlate2.LBX";        // Template file name
    public Form1() {
      InitializeComponent();

[Code] ....

View 1 Replies View Related

C Sharp :: How To Call A Page Using MenuStrip

Jul 29, 2012

Recently started working with C #, and do not know how to call a page using MenuStrip, for example, when you click any of the menus, I need to call another page ...

View 1 Replies View Related

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 View Related

C Sharp :: Stop Page (or All Its Controls) To Be Autoposted?

Nov 20, 2012

i am tring to update a sql database table, first i select the values from database after it i display them into text boxes and drop dwon lists.and then i make required changes to values but when i click on update button the page is post backed and all values are set as they were already in database.

View 1 Replies View Related

C Sharp :: How To Access Functions Between Two Child Forms

Oct 14, 2014

How can I access a function in a child form from another child form of a same owner?

View 1 Replies View Related

C Sharp :: New Webpage In Same Window?

Oct 17, 2012

I am writing code to open every page in internet explorer and every page will be in new tab but my code open every page in separate window

I am using c#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;

[code].....

View 1 Replies View Related

C Sharp :: How To Consume Data From The Web Service In Window Application

Feb 13, 2015

I am developing project on window application in c#.net. I want to consume the data from the web service and that web service is developed in PHP. So, How to give the reference of that web service?

View 1 Replies View Related

Visual C++ :: How To Set Focus After Using Alt Tab

May 22, 2014

Using mfc I have an application where I'm not allowed to use a mouse and alt+tab will be regularly used. Using alt+tab to come back to my application kills the focus in the view. Once my application comes back to the foreground how can I set the view as the focus?

View 3 Replies View Related

C# :: Changing Focus Using Program PID

Apr 17, 2014

For the past couple days I've been making small improvements on a program I made to keep track of a battle count while playing a game. Mainly to reduce the chore of keeping track yourself while you're playing. But it still becomes a hassle to switch back and forth between the program and your game and I was hoping to be able to set focus to the game after the BattleCount method is called.

Currently I am importing a DLL that somebody recommended I use to make a ActiveProcess method that accepts a integer as a parameter which would set the PID but it doesn't seem to be working. The two methods are as follows.

private void countDownClick(object sender, RoutedEventArgs e) {
//Calls a method within my class that subtracts and adds battle values.
counter.CalculateBattles();

//These two change text on my WPF forms with accessor values from my class.
battlesWonText.Text = counter.BattlesWon.ToString();
battlesLeftText.Text = counter.BattlesLeft.ToString();

[Code] ....

This is the C++ code they told me to use to set focus to another application using a PID.

[DllImport("user32.dll")]
static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
const UInt32 SWP_NOSIZE = 0x0001;
const UInt32 SWP_NOMOVE = 0x0002;
const UInt32 SWP_SHOWWINDOW = 0x0040;

[Code] ....

I'm simply trying to figure out how to set focus to a foreign program using their PID and a button click event in WPF. I'm using Visual Studio 2012 on Windows 7.

View 4 Replies View Related

C# :: Read Barcode Without Having The Focus On Text Box Using WPF

Sep 4, 2014

I want to read the bar code using USB scanner without having the focus on text box using WPF. I have searched around online but not found related answers, I think it is the correct place to post my question.

View 5 Replies View Related

C Sharp :: How To Get Text From Node In XML File That Contains Text And Child Node

May 21, 2013

I have a very big xml file. I read it using by xmlReader. I have problem when i reach to next line:

<title>Abasia<nemod>(-astasia) (hysterical)</nemod></title>

How I can read all that content. I have to have next string at the end: "Abasia (-astasia) (hysterical)".

I tried to use ReadElementContentAsString() for all elements, but elements like this has exception, because it has child element.

View 1 Replies View Related

C# :: Select Text When TextBox Gets Focus Or Becomes Active

May 9, 2013

I can select the textbox #2 text with this.

this.tB2.Click += new System.EventHandler(tB2_Click);

private void tB2_Click(object sender, System.EventArgs e) {
tB2.SelectAll();
}

What would be the simplest way to do the same for all textboxes on the form, preferably on both click and enter events.

View 12 Replies View Related

C++ :: How To Allow Pressing Some Keys On Keyboard

Jul 4, 2014

how can I allow pressing some keys on the keyboard in C++? I mean, when you are in the console and you are only allowed to press numbers before pressing enter, for example.

View 6 Replies View Related

C++ :: End Program By Pressing Enter Key?

Feb 11, 2014

I'm trying to end my program when the user presses the enter/return key.

I'm trying to do this with a break statement.

I have two different situations, one when it is a string, and the other one when it is a char.

for (int i = 0; i < 80; ++i)
{
string s;
cin >> s;
if (s == "
")
break;
S.PushStack(s);
}

I'm doing the same thing for char just replacing string with char.

I'm not sure what I am doing wrong but pressing enter does not end the program.

View 3 Replies View Related

C++ :: Moving Focus In Each Loop Iteration - Directly Come Last Item After Completion

May 17, 2012

I have a strange problem in using C code. I want to move focus from one item to another in a keypress event (like keydown)in loop. But it move directly to the last item

Details: In the code segment, I am generating keypress event explicitly from code and want to move focus for number of items inside loop. Loop is working properly, but output is also generated after completion of loop and focus is directly coming on last item in list not showing intermediate movements. Voice output using espeak is generated correctly in each iteration.

Tryouts: I have tried to call a dilog box which take yes/no event by Btn press,that works fine. That means event generation in code is giving problem, it needs h/w intervention for keypress (As I understood)..

View 10 Replies View Related

C :: Queue Program Not Running After Pressing 1

Apr 20, 2013

Code:

#include<stdio.h>
#include<process.h>
struct que

[Code].....

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/C++ :: Change Background Color After Pressing A Key (Graphics)

Aug 5, 2013

Here is my code:

#include <graphics.h> 
#include <stdio.h>
#include <conio.h>  
int main()  {
    int gdriver = DETECT, gmode, errorcode,i;
initgraph(&gdriver, &gmode, "c:cgi");
errorcode = graphresult();

[Code] ....

View 1 Replies View Related

C++ :: Write Program Where User Will Keep Entering Data Until Pressing Ctrl D

Mar 1, 2013

I'm trying to write a program where the user will keep entering data until pressing control + D. Then the it will display the mean, smallest number, and largest number.

Here are three samples of my program running.

Sample 1
Enter the price for stock 1: $ 10
Enter the price for stock 2: $ 1.555
Enter the price for stock 3: $ 3.648

[Code].....

As you can see in Sample 1, the program runs correctly. The largest number was 20 and the lowest number was 1.555. But in Sample 2, the program shows min as 15.500, where it should be showing 15.000 and Sample 3, the program shows min as 110.000 when it should be showing 55.564.

Here's the code.

#include <iostream>
#include <iomanip>
using namespace std;

[Code].....

View 5 Replies View Related

C# :: How To Highlight / Select Text In WPF Text Box Without Focus

Aug 23, 2012

I want to highlight selected text in a wpf textbox while the textbox is not focused. In my application, my textbox never gets focus, and every key input is done manually. I was wondering if there is a way to highlight the selected text when the textbox is not focused?

View 1 Replies View Related







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