Search Results

Search found 24214 results on 969 pages for 'login screen'.

Page 141/969 | < Previous Page | 137 138 139 140 141 142 143 144 145 146 147 148  | Next Page >

  • How to Redraw or Refresh a screen

    - by viky
    I am working on a wpf application. Here I need to use System.Windows.Forms.FolderBrowserDialog in my Wpf application. System.Windows.Forms.FolderBrowserDialog openFolderBrowser = new System.Windows.Forms.FolderBrowserDialog(); openFolderBrowser.Description = "Select Resource Path:"; openFolderBrowser.RootFolder = Environment.SpecialFolder.MyComputer; if (openFolderBrowser.ShowDialog() == System.Windows.Forms.DialogResult.OK) { //some logic } when I select a Folder and click OK, I launch another System.Windows.Forms.FolderBrowserDialog with same code, My problem is when I select a Folder and click OK, the shadow of FolderBrowserDialog remains on the screen(means my screen doesn't refresh). I need to minimize or resize it in order to remove the shadow of FolderBrowserDialog. How can I solvet his issue? Any help plz?

    Read the article

  • Failure with LogonUser in MC++

    - by Alikar
    After fighting with this for a week I have not really gotten anywhere in why it constantly fails in my code, but not in other examples. My code, which while it compiles, will not log into a user that I know has the correct login information. Where it fails is the following line: wi = gcnew WindowsIdentity(token); It fails here because the token is zero, meaning that it was never set to a user token. Here is my full code: #ifndef UNCAPI_H #define UNCAPI_H #include <windows.h> #pragma once using namespace System; using namespace System::Runtime::InteropServices; using namespace System::Security::Principal; using namespace System::Security::Permissions; namespace UNCAPI { public ref class UNCAccess { public: //bool Logon(String ^_srUsername, String ^_srDomain, String ^_srPassword); [PermissionSetAttribute(SecurityAction::Demand, Name = "FullTrust")] bool Logon(String ^_srUsername, String ^_srDomain, String ^_srPassword) { bool bSuccess = false; token = IntPtr(0); bSuccess = LogonUser(_srUsername, _srDomain, _srPassword, 8, 0, &tokenHandle); if(bSuccess) { wi = gcnew WindowsIdentity(token); wic = wi->Impersonate(); } return bSuccess; } void UNCAccess::Logoff() { if (wic != nullptr ) { wic->Undo(); } CloseHandle((int*)token.ToPointer()); } private: [DllImport("advapi32.dll", SetLastError=true)]//[DllImport("advapi32.DLL", EntryPoint="LogonUserW", SetLastError=true, CharSet=CharSet::Unicode, ExactSpelling=true, CallingConvention=CallingConvention::StdCall)] bool static LogonUser(String ^lpszUsername, String ^lpszDomain, String ^lpszPassword, int dwLogonType, int dwLogonProvider, IntPtr *phToken); [DllImport("KERNEL32.DLL", EntryPoint="CloseHandle", SetLastError=true, CharSet=CharSet::Unicode, ExactSpelling=true, CallingConvention=CallingConvention::StdCall)] bool static CloseHandle(int *handle); IntPtr token; WindowsIdentity ^wi; WindowsImpersonationContext ^wic; };// End of Class UNCAccess }// End of Name Space #endif UNCAPI_H Now using this slightly modified example from Microsoft I was able to get a login and a token: #using <mscorlib.dll> #using <System.dll> using namespace System; using namespace System::Runtime::InteropServices; using namespace System::Security::Principal; using namespace System::Security::Permissions; [assembly:SecurityPermissionAttribute(SecurityAction::RequestMinimum, UnmanagedCode=true)] [assembly:PermissionSetAttribute(SecurityAction::RequestMinimum, Name = "FullTrust")]; [DllImport("advapi32.dll", SetLastError=true)] bool LogonUser(String^ lpszUsername, String^ lpszDomain, String^ lpszPassword, int dwLogonType, int dwLogonProvider, IntPtr* phToken); [DllImport("kernel32.dll", CharSet=System::Runtime::InteropServices::CharSet::Auto)] int FormatMessage(int dwFlags, IntPtr* lpSource, int dwMessageId, int dwLanguageId, String^ lpBuffer, int nSize, IntPtr *Arguments); [DllImport("kernel32.dll", CharSet=CharSet::Auto)] bool CloseHandle(IntPtr handle); [DllImport("advapi32.dll", CharSet=CharSet::Auto, SetLastError=true)] bool DuplicateToken(IntPtr ExistingTokenHandle, int SECURITY_IMPERSONATION_LEVEL, IntPtr* DuplicateTokenHandle); // GetErrorMessage formats and returns an error message // corresponding to the input errorCode. String^ GetErrorMessage(int errorCode) { int FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100; int FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200; int FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000; //int errorCode = 0x5; //ERROR_ACCESS_DENIED //throw new System.ComponentModel.Win32Exception(errorCode); int messageSize = 255; String^ lpMsgBuf = ""; int dwFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS; IntPtr ptrlpSource = IntPtr::Zero; IntPtr prtArguments = IntPtr::Zero; int retVal = FormatMessage(dwFlags, &ptrlpSource, errorCode, 0, lpMsgBuf, messageSize, &prtArguments); if (0 == retVal) { throw gcnew Exception(String::Format( "Failed to format message for error code {0}. ", errorCode)); } return lpMsgBuf; } // Test harness. // If you incorporate this code into a DLL, be sure to demand FullTrust. [PermissionSetAttribute(SecurityAction::Demand, Name = "FullTrust")] int main() { IntPtr tokenHandle = IntPtr(0); IntPtr dupeTokenHandle = IntPtr(0); try { String^ userName; String^ domainName; // Get the user token for the specified user, domain, and password using the // unmanaged LogonUser method. // The local machine name can be used for the domain name to impersonate a user on this machine. Console::Write("Enter the name of the domain on which to log on: "); domainName = Console::ReadLine(); Console::Write("Enter the login of a user on {0} that you wish to impersonate: ", domainName); userName = Console::ReadLine(); Console::Write("Enter the password for {0}: ", userName); const int LOGON32_PROVIDER_DEFAULT = 0; //This parameter causes LogonUser to create a primary token. const int LOGON32_LOGON_INTERACTIVE = 2; const int SecurityImpersonation = 2; tokenHandle = IntPtr::Zero; dupeTokenHandle = IntPtr::Zero; // Call LogonUser to obtain a handle to an access token. bool returnValue = LogonUser(userName, domainName, Console::ReadLine(), LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, &tokenHandle); Console::WriteLine("LogonUser called."); if (false == returnValue) { int ret = Marshal::GetLastWin32Error(); Console::WriteLine("LogonUser failed with error code : {0}", ret); Console::WriteLine("\nError: [{0}] {1}\n", ret, GetErrorMessage(ret)); int errorCode = 0x5; //ERROR_ACCESS_DENIED throw gcnew System::ComponentModel::Win32Exception(errorCode); } Console::WriteLine("Did LogonUser Succeed? {0}", (returnValue?"Yes":"No")); Console::WriteLine("Value of Windows NT token: {0}", tokenHandle); // Check the identity. Console::WriteLine("Before impersonation: {0}", WindowsIdentity::GetCurrent()->Name); bool retVal = DuplicateToken(tokenHandle, SecurityImpersonation, &dupeTokenHandle); if (false == retVal) { CloseHandle(tokenHandle); Console::WriteLine("Exception thrown in trying to duplicate token."); return -1; } // The token that is passed to the following constructor must // be a primary token in order to use it for impersonation. WindowsIdentity^ newId = gcnew WindowsIdentity(dupeTokenHandle); WindowsImpersonationContext^ impersonatedUser = newId->Impersonate(); // Check the identity. Console::WriteLine("After impersonation: {0}", WindowsIdentity::GetCurrent()->Name); // Stop impersonating the user. impersonatedUser->Undo(); // Check the identity. Console::WriteLine("After Undo: {0}", WindowsIdentity::GetCurrent()->Name); // Free the tokens. if (tokenHandle != IntPtr::Zero) CloseHandle(tokenHandle); if (dupeTokenHandle != IntPtr::Zero) CloseHandle(dupeTokenHandle); } catch(Exception^ ex) { Console::WriteLine("Exception occurred. {0}", ex->Message); } Console::ReadLine(); }// end of function Why should Microsoft's code succeed, where mine fails?

    Read the article

  • How do I stop mail.app and its nag screen from opening upon login in OS X if I don't use it

    - by user26453
    Currently whenever I start OS X (10.6.2), mail.app starts up with a "Welcome to Mail" dialog, asking me to create an account by inputting name, email address, and password. If I cancel this dialog, the app just hangs and I have to force quit it. I do not use the mail.app and I do not want it to start up with OS X. I have checked the login items and it is NOT present in the login items list for my account. I have also ctrl+clicked the doc icon that appears and confirmed there is no option enabled for "Run at Login". If I go ahead and just spam continue through the dialogs for a new account, I can get through to actually using Mail and accessing preferences. I cannot find a startup option in Mail preferences. After I have completed this, if I now restart, Mail does NOT open automatically. However as soon as I delete the account that I created, it once again goes back to popping up a "Welcome to Mail" dialog every time I startup and login. As best as I can tell, it seems OS X checks if an account exists in the Mail app, and if it does not, it will always start up a "Welcome to Mail" dialog on login, regardless if the Mail app is set to run via login items, etc. This is incredibly frustrating given I have no intention of using the Mail app. I realize I can easily leave account info in there (perhaps even disable the account via preferences), but this behavior is ridiculous. ajgs

    Read the article

  • How to monitor screen updates?

    - by user299600
    I am trying to write a program that monitors when the screen has been redrawn. Meaning if any part of any window is redrawn, then the program is notified. As far as I understand I should use a journal record hook like at http://www.vbaccelerator.com/home/vb/code/libraries/Hooks/Journal_Record_Hooks/article.asp However, I do not understand which MSG type would get me the WM_PAINT events (WH_CALLWNDPROC and WH_CALLWNDPROCRET do not seem to do the job). I'm not even sure that WM_PAINT is what I'm looking for... Basically, if I knew when the DC associated with GetDesktopWindow() has changed then my problem would be solved. Question is: How do you monitor screen updates?

    Read the article

  • User controls do not properly fit on the screen

    - by Royson
    Hi, My application has several controls. Like in one screen has TreeView on left side, GridView with paging in the middle and 4 buttons at right side. The controls properly appear when the form is in a maximized state, but if I minimize it the controls do not properly fit on the screen. I tried with different different tricks like table layout.. in dat I added a panel, etc... But I could not solve the problem. How can I create such type of screens which fits independently of size of my window? Thanks

    Read the article

  • How to get Screen Shot / Screen Capture from Web user on MVC site?

    - by RSolberg
    I've seen a few different apps that allow users to take screen shots on their PC and then the utility will automatically upload the image to the web server. I'd like to incorporate this type of functionality into a new MVC site. I could certainly just allow the user to upload their own image, but it'd be cleaner if they could click Capture Screen Shot and the image would be uploaded automatically. My team is using ASP.NET MVC2 with a SQL back end database. We are certainly willing to look into 3rd party components (activeX based, etc.) that will allow us to achieve this.

    Read the article

  • SQL Server 2008: Getting Login failed for user "Domain\User". Failed to open the explicitly specified database [CLIENT: IP.ADD.RR.ESS]

    - by GodEater
    This is a very similar issue to " SQL Server 2008 login problem with ASP.NET application: Failed to open the explicitly specified database " which unfortunately seems to have gone unsolved. My issue here is subtly different. Firstly the account failing login is not 'NT AUTHORITY\NETWORK SERVICE' - it's an actual domain account. Secondly, there are two machines involved - I gathered from the first question it was a single machine running both the IIS and SQL instances. The application which is trying to connect to the database is an ASP.NET one running on another server (if that makes any different, I'm not sure it does.) The ConnectionString being used in the web.config for the application is : data source=MySQLServer;initial catalog=MyDatabase;integrated security=sspi; And the Application Pool is set to NetworkService for Identity. So - in the web app, I get the following error : Cannot open database "MyDatabase" requested by the login. The login failed. Login failed for user 'MyDomain\WebServerMachineName$' In the SQL Server logs I see : Login failed for user 'MyDomain\WebServerMachineName$'. Reason: Failed to open the explicitly specified database. [CLIENT: Web.Server.IP.Address] Running this bit of SQL against the database in question : USE [MyDatabase] GO SELECT SDP.name AS [User Name], SDP.type_desc AS [User Type], UPPER(SDPS.name) AS [Database Role] FROM sys.database_principals SDP INNER JOIN sys.database_role_members SDRM ON SDP.principal_id=SDRM.member_principal_id INNER JOIN sys.database_principals SDPS ON SDRM.role_principal_id = SDPS.principal_id Gets me this result : MyDomain\WebServerMachineName$ WINDOWS_USER DB_DDLADMIN MyDomain\WebServerMachineName$ WINDOWS_USER DB_DATAREADER MyDomain\WebServerMachineName$ WINDOWS_USER DB_DATAWRITER Which appears to me to indicate I've got the permissions right. Anyone have any idea why it's not working, or how I can narrow the issue down some more?

    Read the article

  • Two windows fullscreen on two different screen.

    - by sirithang
    Hi! I'm actually working on an app to display an image onto a Dome. The dome projection system is constitued of two projector and a pc running a GentoO Linux and KDE, with nvidia TwinView system. Since here i've used SDL to display a fullscreen windows, and it display my app onto the two screen. But i just figured that i need to project two different images, one on each projector. That's why i search for a solution to display a fullscreen window on the first screen (projector) and another on the second. But SDL fullscreen just extend the window to the two screens. I can use any librairie (since it light and free, as i will wrap it into my small "API"), or change display setting. BTW it would be nice to have openGL support, since SDL manage only one window ^^"

    Read the article

  • User accounts in Symfony?

    - by gruner
    I'm new to Symfony. Is my understanding correct that the User class is actually for controlling sessions? But is there built-in login and account creation? I'm not finding it. But if there's an admin backend generator, how can it function without user logins?

    Read the article

  • Updating Android Home Screen TextView

    - by jmontex2
    Hi, How can we update the View of a Home Screen Widget on the onReceive method of AppWidgetProvider?. I am trying to update the TextView of my Home screen widget but it seems that I cant access the TextView of my AppWidgetProvider on onReceive method. Here is a sample code of my onReceive public void onReceive(Context context,Intent intent) { final String action = intent.getAction(); if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) { final int appWidgetId = intent.getExtras().getInt( AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID); if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) { this.onDeleted(context, new int[] { appWidgetId }); } } else { if (intent.getAction().equals(ACTION_WIDGET_RECEIVER)) { String msg = "null"; try { msg = intent.getStringExtra("msg"); } catch (NullPointerException e) { } Toast.makeText(context, msg, Toast.LENGTH_SHORT).show(); // code for gathering the text to update the TextView } } super.onReceive(context, intent); }

    Read the article

  • Virtual Keyboard doesn't appear when rotate the screen?

    - by user164589
    Hi guys. I am facing to a problem related virtual keyboard. I've created a layout that contains Button, TextView and EditText. When its screen orientation is Portrait, it can show the Virtual Keyboard by one touching on the EditText. Then I've changed screen orientation to Landscape. At this moment Virtual Keyboard hasn't been appeared. What is wrong here ? How to fix it ? I think this is big problem for my application. Please help. guys. Thanks.

    Read the article

  • UISearchDisplayController's full-screen background intercepts touch events in iOS 7

    - by tba
    I have a UITableview that doesn't take up the whole screen (screenshot). Everything worked fine in iOS 6. But in iOS 7, when the user searches, the search result table takes up the whole view (screenshot). To fix this, I tried setting the frame manually as described in this answer. The appearance is now correct (screenshot), but now the "<" button in the top left doesn't receive tap events when the search results table is displayed. It seems the searchResultsTableView is adding a full-screen background view that is intercepting touch events. To prove this, I added this code to didShowSearchResultsTableView: controller.searchResultsTableView.superview.backgroundColor = [UIColor blueColor];` This screenshot confirms my hypothesis. How can I fix this to allow the "<" button to receive tap events? I want to avoid modifying controller.searchResultsTableView.superview so that my change doesn't break in future versions of iOS. And what change in iOS 7 caused this behavior to start happening?

    Read the article

  • Toshiba Laptop Problem - Black Screen on Startup [using Win Vista]

    - by BubblySue
    Hi guys, can anyone help me on my problem? I only see black screen after the startup.. It just shows the logo and the status bar upon start, then it goes black screen with moveable cursor. I tried alt+ctrl+del, but it doesn't work. I pressed shift 5 times and it makes a sound. I already removed battery and restarted it, but still the same. I can go to safe mode and scanned thru there. Still, desktop won't show up. Don't know what else to check? Been searching the net for solutions. Please help? :(

    Read the article

  • popup panel that docks to the bottom of the screen

    - by Michael Wiles
    How do I create a pop panel that docks to the bottom of the screen... The way that I'm doing this is by setting the styling as such: bottom: 10px; position: absolute; This will always set the panel to 10 px from the bottom of the browser window. The problem is that gwt (or gwtp for that matter) is insisting on setting the right and the top of the panel and thus overriding my styling. If I use chrome's element explorer and disable the right and top style rules I get the correct behaviour so one way of doing it is somehow disabling gwt setting of the location of the panel on the screen...?

    Read the article

  • Making a window pop in and out of the edge of the screen

    - by Brad
    I'm trying to re-write an application I have for Windows in Objective-C for my Mac, and I want to be able to do something like Mac's hot corners. If I move my mouse to the left side of the screen it will make a window visible, if I move it outside of the window location the window will hide again. (window would be pushed up to the left side of screen). Does anyone know where I can find some demo code (or reference) on how to do this, or at least how to tell where the mouse is at, even if the current application is not on top. (not sure how to word this, too used to Windows world). Thank you -Brad

    Read the article

  • Evenly distribute items on the screen

    - by abolotnov
    I am trying to solve this little puzzle (the algorithm): I have N image icons and I want to distribute them evenly on users screen. Say, I put them in a table. If there is one image, there will be one cell in a table. If two - one row with two columns, if three - one row and three columns, if four - two rows, two columns... and so on until row space is gone and since then the table should only grow in columns without adding extra rows. I'm trying to figure an algorithm for this and perhaps this is something that has a solution already somewhere? My attempt is so far something like this: obtain_max_rows() obtain_visible_columns() if (number_of_pictures > max_rows*max_columns) { columns = roundup(number_of_pictures/max_rows) for(max_rows){generate row;for columns{generate column}} } else { **here comes to trouble...** } This logic is bit silly though - it somehow needs to think cases where there are 12 pictures on first screen and 2 on the other trying to balance it say 8/6 or somehow like that.

    Read the article

  • drawRect is not refreshing the screen

    - by coure06
    I have this code in my drawRect method float aValue = .0167f; float fValue = 20; for(int i=1; i<=6; i++) { CGContextSelectFont(context, "Arial", fValue, kCGEncodingMacRoman); CGContextSetCharacterSpacing(context, 0); CGContextSetTextDrawingMode(context, kCGTextFill); NSString *hString = [[NSString alloc] initWithFormat:@"%i",i]; CGContextSetRGBFillColor(context, 1, 1, 1, aValue); CGContextShowTextAtPoint(context, i*25, i*16, [hString UTF8String], [hString length]); aValue += 0.167; fValue += 1; } I am calling a method using NSTimer like this staticTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(refreshUIView) userInfo:nil repeats:YES]; here is the refreshUIView -(void)refreshUIView { [self setNeedsDisplay]; } Problem is that drawRect is not clearing the screen, its just over writing what have been written last time on screen.

    Read the article

  • Maintaining a secure database of user logins and info?

    - by Rafe Kettler
    I want to have a login form on a charity website I am building (it's for a friend, and I'm learning on the go), and I want to know what languages/software should I learn to build databases for user logins and info? Note: it HAS to be secure and relatively simple to learn for someone with moderate programming experience. Update: I understand that CMSs offer good tools for logins etc. but I want to do this all by myself.

    Read the article

  • android:black screen switching between activity

    - by 100rabh
    Hi, I am using below code from one of my activity to start another Intent viewIntent = new Intent (getApplicationContext (), landingPage.class); Bundle b = new Bundle (); b.putString ("ApplicationName", a_Bean.getApplicationName ()); if (landingPage.getInstanceCount () < 1) bp.landingPage_ProgressDialog = ProgressDialog.show (ViewAllApp.this, "Please wait...", "Retrieving data...", true, false); viewIntent.putExtras (b); viewIntent.addFlags (Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivityForResult (viewIntent,10); Thread background=new Thread(new Runnable() { public void run() { Progresshandler.sendMessage(handler.obtainMessage());//finishes progressDialog }}); background.start (); but after startactivity it shows a black screen & then displays new activity. Can I make progressdialog to be shown while the black screen is displayed??

    Read the article

  • Screen capture during testing

    - by Edwward
    This is an application for reviewing performance tests. Simple in concept, tricky to describe. Picture: 1) Recording interactions with a WPF program so the inputs can be played back. 2) Playing the inputs back while doing a continuous screen capture. 3) Capturing wall time as well as continuous CPU percentages during playback. 4) Repeating steps (2) and (3) lots of times. 5) Writing the relevant stuff out to files/db. 6) Reading it and putting it all in a fancy UI for easy review/analysis. The killer for me is (2). I could use some guidance on a good, possibly commercial, screen capture SDK. I would also welcome the news that my whole problem already has a solution. And of course any thoughts on the overall idea would also be great. Thanks. Ed

    Read the article

< Previous Page | 137 138 139 140 141 142 143 144 145 146 147 148  | Next Page >