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?
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.
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 {
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:
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:
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?
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.
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.
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 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?
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?
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.
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.
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?
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?
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):
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:
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!
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())