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


ADVERTISEMENT

Visual C++ :: Auto-close MSG Box - Without Button And Title

Apr 1, 2015

I referred Auto-close message box.

But i like to view the message box with out title bar and buttons. Is it possible?

View 4 Replies View Related

C# :: WPF Create Customize Close / Minimize / Maximize Button?

Jan 11, 2015

i want to create customize close/maximize/minimize button wpf. How can i do that?

View 3 Replies View Related

C/C++ :: How To Change Position Of Image And Button On Window

Jan 12, 2015

The question says:

Place an Image on top of a Button. Move both when the Button is pushed.

Please have a look at this code:

#include <GUI.h>
using namespace Graph_lib;
//------------------------------------------------
class rotation : public Window {
public:
rotation(Point xy, int w, int h, const string& title):
Window(xy,w,h,title),
[Code] ....

The problem is that, it is not possible to define an Image in public/private part of the class rotation. Image needs all arguments to be supplied even when declaring one. (Image is here in Graph.h)

And if I define that Image in the body of main() function, so how to provide access for void rotate() to change its position with the position of button simultaneously.

View 6 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# :: Console App Won't Close

Dec 22, 2014

Im having a problem with the below code within a console app, I am copying and pasting data across server locations, the copy works fine but it looks like the app wont close and I am left with the screen (Shown in attachment). I want to run this in part of a batch process but because the app stay open it wont move onto the next task.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace SQL_Backup_Move_Files {

[Code] ....

View 3 Replies View Related

C# :: How To Close Overlapped I/O Handle

Nov 6, 2012

Consider the following code which closes an overlapped I/O serial handle during application shutdown.

Code:

Win32Com.CancelIo(hPort);
Win32Com.CloseHandle(hPort);

It works fine under .NET 2.0 but after switching to .NET 4.0 it crashes on the CloseHandle. Removing CancelIO doesn't work.

What the correct way is to close an overlapped I/O handle? And why is there the difference between NET2.0 and 4.0?

View 5 Replies View Related

C++ :: RGB To HSL Saturation Close But Incorrect

Feb 9, 2014

Currently I am trying to convert RGB to HSL. Everything is working but the saturation value. It is always close to the correct value (usually less than 10 off). For example:

RGB:(196,72,84)
HSL:(354,-46,52)
Correct HSL(354,51,53)

CODE:

double s=0;
double l=0;
chroma=max-min; //works correctly

//LIGHTNESS
l=(max+min)/2;

//SATURATION
if(chroma==0) {s=0;}
else {s=chroma/(1-fabs(2*l-1));}

s=s*100.000000;
l=(l/255.000000)*100.000000;

View 5 Replies View Related

C/C++ :: How To Get CTRL Z To Close A Pipe

Nov 9, 2012

My 'c' program reads each line of a .txt file, makes a few changes and then outputs the line of text (which are names). I want the contents to be sorted and did not want to bother writing my own sort. The program runs in a command prompt from inside a batch file for example:

sort | makelist.exe BluRay1.txt > sorted.txt
sort | makelist.exe Dvd1.txt >> sorted.txt
..etc..

I have to supply a ctrl-z manually to close the piping. I tried the following which did not work.

buffer[0] = 26;

printf("%c",buffer[0]);
//printf("^(z)");
fclose(stdout);
fclose(stdin);

I never got the above to work so I am avoiding piping and just do a redirect instead.

makelist.exe dvd1.txt > unsorted.txt
makelist.exe dvd2.txt >> unsorted.txt
sort < unsorted.txt > sorted.txt

..etc.

Just wondering if I could have gotten the ctrl-z thru the pipe using "C".

View 2 Replies View Related

C :: Code To Close And Reopen Explorer

Jun 11, 2013

I wanted to stop the user from having access to USB flash drive while my program is reading data from it.I thought i could do so by closing the explorer at the start of my program and reopening it at the end of it.C Code to close and reopen the explorer?Or how to ban access to the USB flash drive?

View 2 Replies View Related

C Sharp :: Cannot Close File With FileStream

Feb 11, 2015

FileStream obj = new FileStream(System.Convert.ToString(row.Cells["Lec_media"].Value), 
FileMode.Open, FileAccess.Read, FileShare.Read);      
 if (Startdate2 == JCM_NOW2) {
                    if (checkBox1.Checked == true)

[Code] ....

View 1 Replies View Related

Visual C++ :: MFC CRecordset Heap Corruption Detected At Close

Oct 28, 2013

I recently upgraded my operating system from Windows XP to Windows 7 SP1 64 bit. We are using Visual Studio 2008 Professional Edition and Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production.

When I try to execute this code I am getting the below exceptions

HTML Code:
try {
CDatabase *pDatabase = CDatabaseConnection::getDatabaseConnectionProcessLog();
ORSProcessLog rsProcessLog(pDatabase);

[Code] .....

Where rsProcessLog is the CRecordset object using a successfully connected database pointer pDatabase

In 32- bit Debug version I get a message box at rsProcessLog.Close(); with the below text Debug Error

Program: ......Test.exe

HEAP CORRUPTION DETECTED: after Normal block (#506) at 0x0087F628. CRT detected that the application wrote to memory after end of heap buffer.

Memory allocated at f:ddvctoolsvc7libsshipatlmfcsrcmfcdbcore.cpp(2626)

(Please Retry to debug the application)

In 32- bit Release version I get a message box at rsProcessLog.Close(); with the below text Windows has triggered a breakpoint in Test.exe

This may be due to a corruption of the heap, which indicates a bug in Test.exe or any of the DLLS it has loaded.

This may also be due to the user pressing F12 while Test.exe has focus.

The output window may have more diagnostic information.

The above code was a working code in Windows XP with the rest of the env remaining the same and it continues to run in Windows XP but not in Windows 7.

View 9 Replies View Related

C# :: Login Then Close Form And Open Main Form

Aug 25, 2014

This is more of a Application Design question, Let's say I have Form1(Login), this is opened from Program.cs, when the user enters details, the Event Handler makes a instance of a class, adds the data and stores the instance within Program.cs class.

So the best thing to do here, is to close the Form1(Login) and open Form2(Main) via Program.cs so that I can send the List<Login> object with my Login instance objects to said form. This form will remain open throughout the applications use as it's like the main GUI for all the programs functions.

When I close this form, I may want to save some information before the application is terminated, so I may as well store the Login instances in Program.cs anyway.

Main stepping stone: Multiple (usually around 3 max) users can login this system if need be, which will mean closing Form2(Main) and then opening Form1(Login) so that once Form1 is closed it can recreate the From2(Main) form and pass the new List<Login> to that form.

What's the best way to do this, at the moment i'm creating the Form2 instance like so:

//....
//Detect the Login form being closed
loginForm.Closed += new EventHandler(OnLoginClosed);
//...
//Open the main form when the login is closed
private void OnLoginClosed(object sender, EventArgs e)

[Code] .....

This seems like it will work and do the job, but is there a better and cleaner way? The List<Login> will be passed to Forms which are created via Form2(Main) as this information will be needed. It's just that ive been told not to use Forms for too much data containment.

View 2 Replies View Related

Visual C++ :: Close CPropertySheet From Another CPropertySheet Property Page

Nov 4, 2014

I was opened CPropertySheet from main dialog at very first time, again i was opened the CPropertySheet from current PropertySheet's Page 1 using button click event.

How can i close these two sheets and go to main dialog.

I was used EndDialog(0);

Which goes to previous sheet only.

View 4 Replies View Related

C++ :: What Are File-open And File-close For

Aug 12, 2014

I wonder, why before accessing a file we need to have it opened, and after finishing with it, we need to close it?

If FileA is already open by PtrA, PtrB won't be able to open it as well until FileA is closed by PtrA?

When PtrA opens a file, are any extra resources allocated by that action?

View 4 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++ :: SDL Window Centering?

Jul 20, 2013

I am trying to do two things that i have an issue with finding on google. the first is im trying to center the main window, but i cant figure out how to do it. secondly i want to make it full screen but the flag for setvideomode doesnt work. is there another way?

View 1 Replies View Related

C++ :: How To Make A Window Always On Top

May 11, 2013

I want to make a window tgat stays always on top like that of a cybercafe software. A window that cannot be closed, minimised, deactivated, etc... with wxWidgets.

So far I've tried making a frame window with the wxSTAY_ON_TOP flag. It works, but not to perfection because, when i press the windows button, the start menu interferes with the window(and taskbar too). Also, the task manager, how to deactivate it.

- a wjndow that strictly stays on top

- deactivate task manager

View 3 Replies View Related

C/C++ :: Make A Window?

Oct 15, 2014

how to make a window in C++? I am trying to make a program that has a boot screen but I want it to be in its own window because it will have it's own pictures in it and text inside too. So not in a terminal but inside a external window.

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







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