Subodh Sohoni's Q&A profile
Windows Forms How can I persist a login?
I am writing an application that does not necessarily require a user to login (some features available to unauthenticated users). I want to be able to persist a couple of custom objects, like the 'User', some 'Roles', and whether or not they are authenticated. When a user starts the app, the get some screens, but must authenticate to get others. What would be the best way to persist that info. I am an ASP.NET guru ;-), but not a Windows Forms genius. Thanks. Hi Smith, Is this a windows forms application If yes then you can set access privileges set for each screen in the backend. When a user clicks on a screen, in t ...Show All
Visual Studio 2008 (Pre-release) Simple ListBox template change, big performance degradation
I have a ListBox in my application showing around 200 items where the items use their respective data templates. The performance was good enough. Because I needed to put some status information embeded in the ListBox, I modified the ListBox Template to include a TextBlock at the top. To my surprise, when I did that, the performance of the ListBox was greately reduced!! It's 10x slower or more on many aspects: when populating, when selecting an item, when scrolling, etc. Does anybody know why adding a DockPanel and a TextBlock makes it so slow The two styles are listed bellow. Style1 keeps the listbox fast. Style2 mak ...Show All
Windows Forms Help ... Disable Ctrl + Alt + Del in Window Xp using VB 6.0
I need the source code of VB 6.0 to Disable and enable the Ctrl + Alt + Del for Win Xp ... CAn anyone help me Thanks Made By searchatweb.com Search At Web /////////////////////////////////////////////////////////////////////////////// Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As&n ...Show All
SQL Server Opening a PDF report without the OPEN/Save Dialog
Is there a way to render the PDF report in the same broswer window you just called it from without the Open/Save dialog box coming up. The report is being call directly by URL parameters for PDF format This is quite easy with custom programming, I've made a new webapp and gave the aspnet-user full access to reporting services, maybe you could add a cutom file to the Reports-Webapp.. I've default.aspx: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <% Dim pdfloader As New PDFLoader(Request, Response) pdfload ...Show All
SQL Server Cannot connect to SQL Server
I have an SQL Server 2005 installed on one partition (G:). Visual Studio 2005 with C# is on C: The OS on C:\ is Win2K Pro, OS on G: is WinServ2003. I've created a database on G: in SQL Management Studio. Its name is "endPoint_forMe" The Server (default) as I can see is ALEX-*** data source is "strongUpdate" which is one of the tables in the database "endPoint..." I cannot establish connection. What am I doing wrong I checked in the Control Panel-->>Management Tools-->>IIS on C:. Only one server is registered there: My computer name. There is no way to add another server. string myConnString = "Persist Security Info=Fal ...Show All
Visual C# Arraylist of Arrays
When a try to assign an arraylist of arrays to a datagrid, the datagrid columns that i get to see are, Issynchronized, Is anonymous etc... instead of the databade columns i have assigned in the array. What could be the reason Thanks & regards Kitty You should create an wrapper around your ArrayList class that implements the IList , IBindingList and ITypedList interface. Create your own CustomTypeDescriptor 's and you are set. ...Show All
.NET Development ArrayList.Add problem - values and references
Hi, I'm having a problem with my code. I have an Array called moves of length four that contains ArrayLists, each of which I modify according to user input. Each time input is complete I want to save a copy of the moves so that I can go back and retrieve previous entries. In order to do this I have a separate ArrayList called history to which I add moves after input using history.Add(moves); In this fashion I can retrieve previous entired by accessing history(0) for the first set Array etc. Sadly each time I alter the contents of moves , all of the objects I have added to history are also changed, so I just end up with an ...Show All
Visual C# How to wait 2 minutes ?
Hi I need to make my application wait 2 minutes before executing a certain method, how can I make it, what class do I have to use Is there a method to do that Thanks ! Hi, Could you mark the post that solved your problem as answer This would make it for anyone with your the same problem to locate this thread. Thanks. cheers, Paul June A. Domag ...Show All
Visual C++ Optimizer fails to remove unneeded loop?
Here's a minimal code sample that illustrates the problem: #include <cstring> #include <iostream> using namespace std; # define TEST_COUNT 5000000 void AssignStr( char * str ) { strcpy( str, "changed" ); } int main() { char temp2[16] = "no change" ; for ( int i = 0; i < TEST_COUNT; i++ ) { AssignStr( temp2 ); } cout << temp2; return 0; } And the assembly listing generated for the loop: PUBLIC _m ...Show All
Windows Forms how can i close privious form
hi i am using a dot net application in which there is a login form and one mdi form on ok button click i am opening the mdiform and i want to close loginform but its not working how can i close login form regards Prathvi On the code of the button and after the code to open the mdi form write: "me.hide".&nb ...Show All
Visual Studio How to set up this scenerio with VSS
hi, what is the easiest way to update the folder of the project that is on the web server (not in VSS) but the one that is residing inside wwwroot on the server. i want to work with VSS and directly check it through the webserver every time i do a lil work i have to copy the whole project into the server using copy potion in visual studio. is there any way to copy only that file into the server that i worked on bcuz there is just one optoin to copy the whole project. or is there any way to save the project on my web server too as it saves in my VSS database as well as on my local pc's local folder. Thanks. 2 Steps Solutions If the web ...Show All
Windows Forms how to program timed events
Hi Gang! I have been working in vb.net for a few months, and need some help. I only have one paperback vb reference, so plase bear with me. I need to set up timed events in a forms app. It needs to perform a certain function every two minutes or so. Can you point me in the direction of a resource that will show me how to  ...Show All
Windows Forms how to get form window above taskbar
1)how do i program a form window (in c#) to come above the taskbar on desktop , by default it slides under the taskbar . 2)i have a form with a single textbox in it , how do i remove the focus from the textbox when i start the application. i don't want the cursor to be blinking in the textbox. 2)i have a form with a single textbox in it , how do i remove the focus from the textbox when i start the application. i don't want the cursor to be blinking in the textbox. Have your textbox enabled property set to false. On the Activated event, set the enabled property of the textbox to true and you w ...Show All
Visual Studio 2008 (Pre-release) Qustions regarding InstanceMode=InstanceMode.PerSession
Hi, If I am connecting two application servers A and B with Indigo (where A is the indigo 'host' and B is the indigo 'service host') and I have created a ChannelFactory on A that implements the services interface, for example ChannelFactory<IHello> factory = new ChannelFactory<IHello>("HelloEndpoint"); IHello proxy = factory.CreateChannel(); Is the proxy thread safe can multiple threads on server A use the one instance of IHello to call the service on B the InstanceMode is PerSession so it seems like I should be able to do this (or am I wrong ), Or should each thread have its own instance of proxy Is there ...Show All
Visual C++ what's those reserved words meaning in vc++?
_cdecl _stdcall _declspec especially, what's the difference between void _stdcall dummy1() { cout << "dummy1 called" << endl; } void _cdecl dummy2() { cout << "dummy2 called" << endl; } Is there any different efficiency Thx. (Just deleted my long reply since Jon beat me to it.) I just wanted to add that I would recommend just sticking to the default __cdecl calling convention as that is the default for C, with the exception of callback functions used with Windows API's which need to be __stdcall, such as the WndProc for ...Show All
