Sanchit Bahal's Q&A profile
Windows Forms How can I set a digital clock on my windows form project in C#?
Hi, The question is very simple. " How can I set a digital clock on my project " I want to put a digital clock seems like that " 2006-09-23 Wendsday 23:12:48 GMT " means " YYYY - MM - DD ' DAY ' HH : MM : SS ' GMT ' " I am master of C and php however I am newbe in the visual languages. Thank you... Edit: I am using C# i dont know how to make a digital clock using structure.can you guide me .i have heard that it can be make by using sleep function ...Show All
Visual Studio 2008 (Pre-release) How to avoid serialization in BeforeSendRequest/GetReaderAtBodyContents?
I am using a IClientMessageInspector to do custom logging request messages and response messages. In my BeforeSendRequest implementation I create a buffered copy of the message and get the body content using the method GetReaderAtBodyContents. We are profiling our application using VSTS instrumentation method, and in the call tree we observed that the get properties of our message are being called. Since I just want to log the raw body message, I wanto to avoid this extra serialization. What I want is to have access to the raw message after beign serialized, but before being sent. Is is possible to do this BTW, when we receive the message from the service, we do the same process, but now in the method GetReaderAtBodyConte ...Show All
SQL Server SQL Delete statement in relational model
Hi, I have a large database with complex relations and I just can't figure out how to delete a single record and all its relations across database (not to mention that I can't understand why can't the DELETE statement work just like the SELECT). It would be impossible to let you know the structure through this message, but let's say that I have 5 tables in which there are relations like this (all the tables contains a unique ID for each record, but not all contains info of the main record): Production -> ProductionTypes Sales -> ProductionTypes Production -> Sales Sales -> Personnel Personnel --> Orders Orders --> Financial I hope we agree that if I delete the ProductionID.Production dir ...Show All
Visual Studio 2008 (Pre-release) Crystal report inside of "WPF" user control
Can someone help me with a code sample which shows how to add a crystal report viewer in user control or how to add a ".net 2.0" user control in a "WPF" user control. Thanks in advice, Ovidiu Ovidiu: I've answered a couple question similar to this but I don't have time to look into the details for crystal or user controls. Take a look at these threads and see if they help: [using an infopath control] http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=856226&SiteID=1 [using the web browser control] http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=845784&SiteID=1 ...Show All
Visual Studio Express Editions y wont this progress bar work
please help me figure this out I cant get the progress bar to move thanks Private Sub player_PlayStateChange( ByVal sender As Object , ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles player.PlayStateChange Bar1.Minimum = 0 Bar1.Maximum = 100 Select Case e.newState Case WMPLib.WMPPlayState.wmppsPlaying 'The Player is playing. 'Enable the buttons. Label1.Enabled = True Label2.Enabled = True 'Make btnPlayPause a pause button. Label1.Text = "Pause" 'Show the title. Label3.Text = "Title: " & player.currentMedia.getItemInfoByType( "Title" , "" , 0) Dim i As Integer Dim TrackLength As Integer D ...Show All
Visual Basic how to set text box borderColor
How to set some color to Border There is not any option provided to change the border color of the text box. If you want to do it then you have to create your own user control extending the TextBox Control. Best Of Luck. ...Show All
Windows Forms Splitcontainer, point in in Panel1/Panlel2?
Given a point co-ordinates how will Know wether thw point is in Panel1 or Panel2 Is there any method for finding above If panel1.clientRectangle.contains(point) then 'point is inside panel1 elseif panel2.clientrectangle.contains(point) 'point is inside panel2 end if ...Show All
Visual Basic OpenFileDialog
I am using a OpenFileDialog and i have the InitialDirectory set to a drive available on my network but I want to build in a catch so that if someone doesn't have access to the network drive then it will default to their "My Documents" folder. How would I go about this Hi, QWERTYtech, You could use " My .Computer.Network.IsAvailable " if you're just checking on whether or not the user can access the network. If instead you want to know if the user can access a particular share on the network, you'll need to do something like try to get file information for that site (" My .Computer.FileSystem.GetDirectoryInfo "), etc., and see if it's accessible (i.e., catch "DirectoryNotFoundExce ...Show All
Customer Care Framework Where to download
Hi, Can someone please tell me where to download the CCF Thanks Does it support IE7 well We are developing a agent desktop similar system bases on CCF, surpose to deploy it on Vista client. Edward ex-ms ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Is XNA GSE the first console SDK for the masses?
tried searching, couldnt find anything. but is XNA GSE for the most part, the first SDK for a game console for the masses well, besides way back in the day before NES, but I mean when it came to the N64 and on generation of consoles most consoles require that you void their warranty to mod them to play custom made games, or the $1000+ dev version from the manufacturer. I may be understanding console dev incorrectly, but I read that the Wii dev console is about $1000 or something. even tho XNA GSE isn't allowing you to make fully working xb360 games that can be distributed, it seems like one of the first available to be pushed by the manufacturer to make indie/solo games without the need to illegally mod your xb360... just the $100/ye ...Show All
SQL Server SQL Agent Job error message, help!
I've just created a Maintenance Plan with Maintenance Plan Wizard, after I hit the Finish button and the SQL Server Management Studio start executing the wizard, it said something has conflict with the new maintenance wizard. Next thing I know, there's this DB Backup agent in SQL Agent Job (in SQL Server Management Studio); and I can't delete it although I'm able to disable it. Can someone help Here's the detail of the error message I received every time I tried to delete the job agent: Drop failed for Job 'DB Backup'. (Microsoft.sqlServer.Smo) Additional information: - An exception occured while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) - The DELETE statement conflicted with the REFERE ...Show All
Windows Forms Trying to deploy the program
I am trying to publish my program using Visual Studio .NET 2005 by going through Build -> Publish "Project".. When I run my project either by building the project and go to bin/Release folder and run the exe file, or just by pressing "F5", it works fine. But if I publish the project and install it on a system, it won't find the access to database file. So I tried to uninstall the program by going to Add/Remove in control panel. But when I try to remove it from the system, it gives me an error messages saying "Uninstall of application did not succeed. See details ...." the detailed message says... ERROR SUMMARY Below is a summary of the errors, details of these errors are liste ...Show All
Visual C++ errors in compiling c code with vc
Hi there, I work on some c++ code which used to be compiled by gcc and try to compile it with visual c7. Things like using ::size_t; in cstdio, cstdlib, cerrno, cstring, ... are all considered as syntax errors as "error C2059: syntax error : ':'. The code I am dealing with is just define some classes with members and methods, I cannot see anything different from what I wrote in vc. Any suggestions on what I should do Thanks, rich ...Show All
Visual C# PNG transparency over painted background?
Hi, I'm creating an application which involves a form which has a background (of several colours) painted onto it using code. I then put a transparent PNG on top (using a PictureBox control generated in code), but it only shows the form's background colour through the transparent parts, rather than the background I've painted. I've had a quick search of the forums, and come up with this: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=616742&SiteID=1 Is this the same problem I'm experiencing, or is there another way to solve this I would like the painted areas to show through my image's transparency, rather than the form itself. Kind regards, Jonathan Thanks for this - it works!! However, my Pict ...Show All
SQL Server Can't set the owner to the current login
I'm using express edition, compatibility set to 2005. I'm logged in as DOMAIN\user , using windows authentication. When I try to set the owner to this login, I get a "login does not exist on the server" error. Setting the owner to sa works fine. Any fix to this problem Also - can I just work with the owner set to sa or can this cause problems in the future Thanks. If you could supply a little code that reproduces the error we could probably get an answer for you. What objects are you trying to own Yes, you can set the owner to sa, but then you have to work with the object as that login. It would be better to have that object owned by someone with only the rights that they ab ...Show All
