Click here to Skip to main content
       

C#

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: Help with mutex, cannot get mutex to workmvpDave Kreskowiak8 May '13 - 8:53 
Just because you see a technique all over the Internet does not mean that it applies to your situation.
 
From what I've seen in your code, it suggests you're trrying to make a single instance app. The code you have is not suited for that purpose at all. To make a single instance app, an application first tries to create a Mutex. If it's successfull, it's the first app instance running. If the creation of the Mutex fails, then you know your app is not the only instance running.
 
Follow the logic in your code snippet and you will see that it does not follow the logic I just laid out.

GeneralRe: Help with mutex, cannot get mutex to workmemberturbosupramk310 May '13 - 1:58 
I believe I understand now and yes I was trying to make a single instance app.
 
I had thought a mutex was created as a default and I was trying to find that. Now I have the code set up to create a mutex and if it cannot create it, to bring the minimized app to the foreground.
 
Thanks for the help.
GeneralRe: Help with mutex, cannot get mutex to workmvpDave Kreskowiak10 May '13 - 2:17 
No problem.

Questionlogin authenticationprofessionalgeo thomas8 May '13 - 0:08 
i have created a login page by c# in visual studio.
 
if i want to take it as my system login page,what are the next steps to be done?
 
With out this login authentication no one could access the system.

AnswerRe: login authenticationmemberSivaraman Dhamodharan8 May '13 - 0:22 
Set your Login Page as the startup form and display that Modal dialog. When the authentication succeeds, continue with the application.

GeneralRe: login authenticationprofessionalgeo thomas8 May '13 - 0:30 
i want my login page right after booting.. with out this login no one couls access any features of windows.
GeneralRe: login authenticationmvpDave Kreskowiak8 May '13 - 2:05 
You're not going to do that in a C# application.
 
Your application cannot stop people from using Windows. They have to enter their own credentials to get into Windows to evern see your app, correct? Your app is pointless since you cannot stop a user from terminating your app quite easily.
 
Now, if you wanted to provide a custom authentication package for Windows to use, you would have to write a Credential Provider[^] and register that with the system. The users can then enter their alternate credentials for your authentication scheme. Oh, you'll be writing this in C/C++, not C#.

GeneralRe: login authenticationprofessionalgeo thomas8 May '13 - 20:06 
i want to use my login page insted of windows login page .
can i?
GeneralRe: login authenticationmvpDave Kreskowiak9 May '13 - 1:37 
No, you can't. Not unless you rewrite Windows...

GeneralRe: login authenticationprofessionalgeo thomas9 May '13 - 19:00 
kk..thank you
Questionrunning asp.net website in a windows applicationmembermrkeivan7 May '13 - 22:25 
I have a asp.net website which I want to run locally without using IIS, through a windows application, 
I want to whether this is possible and know how this is done, please let me know if u have any information in this regard.

AnswerRe: running asp.net website in a windows applicationmvpDave Kreskowiak8 May '13 - 2:06 
You've got quite a bit of reading to do...
 
Host asp.net application in Windows Forms app[^]

AnswerRe: running asp.net website in a windows applicationmvpAbhinav S8 May '13 - 21:22 
You can host a web page outside of IIS -
http://hyperthink.net/blog/hosting-asp-net-outside-of-iis/[^]
Light IIS (Run Asp.net without IIS)[^]
 
You will face problems with scripting etc though.

QuestionIIS security settings and different permissionmemberashabhatt27077 May '13 - 19:52 
Hi ,
 
I am using your project from below links
 
http://www.codeproject.com/Articles/440548/IIS-security-settings-and-different-permission-usi
 
But i am facing below problems here :
 
1. Unable to find out and download "Microsoft.Web.Management.dll"
2. This setup application give error. "Class is not registered(Exception from HR Result : 0x80040154 )
 
Please please help me out for this.
 
I have to complete this as soon as possible.
 
Thank you.
SuggestionRe: IIS security settings and different permissionmvpRichard MacCutchan7 May '13 - 21:14 
Please post your question in the forum at the end of the article, so the author can help you. See also http://msdn.microsoft.com/en-us/library/ms652552(v=vs.90).aspx[^].
Use the best guess

Questionsave time with the desired datememberdemoninside97 May '13 - 18:38 
hi all,
below is my aspx code
 
<pre lang="HTML"><MKB:TimeSelector ID="TimeFrom" runat="server" DisplaySeconds="False">
                                                                        </MKB:TimeSelector></pre>
 
and a text box which is having a date.
 
<pre lang="HTML">VehicleBookingDate.Text</pre>
 
I want to save date and time in my database. for that if I want to do like below
 
<pre lang="HTML"> string t1 = tsTimeFrom.Hour.ToString() + ":" + tsTimeFrom.Minute.ToString() + " " + tsTimeFrom.AmPm.ToString();
 
DateTime Time_From = Convert.ToDateTime(t1);</pre>
 
It saves time with current date, where as I want to save this time with this date which is in VehicleBookingDate.Text.
 
how can I do that.
 
Thanks
AnswerRe: save time with the desired datememberdemoninside97 May '13 - 20:05 
Now I get this
<pre lang="c#">
string t1 = Vehicle_Booking_Date.ToShortDateString() +" "+ tsTimeFrom.Hour.ToString() + ":" + tsTimeFrom.Minute.ToString() + " " + tsTimeFrom.AmPm.ToString();</pre>
 
that   is a string but I want to save it as a datetime with the same date which Vehicle_Booking_Date variable is having
AnswerRe: save time with the desired datemvpRichard MacCutchan7 May '13 - 21:06 
Don't use a TextBox, use a Calendar control[^]. You can then create a DateTime object from the two elements.
Use the best guess

QuestionUser defined functions for Excel 2010 in .NET: args linked to cells don't workmemberPozzaVecia7 May '13 - 11:02 
I have Windows 7 64-bit and Excel 2010 32bit
I have the following question: I created an user defined functions for Excel in .NET according to the code http://blogs.msdn.com/b/eric_carter/archive/2004/12/01/writing-user-defined-functions-for-excel-in-net.aspx[^]
 
I'm using now MultiplyNTimes in my Excel 2010 spreadsheet.
 
if in the cell A1 i type =MultiplyNTimes(2,3,4) i get the correct results (162)
 
if in the cell A1 i type =MultiplyNTimes(B2,3,4) and I type 2 in cell B2, then I get #VALUE!
 
Basically my UDF can't accept a link to a cell as argument... can this bug be connected with 64 bit of Windows?
(note thae using the same OS with in 2007 works fine!)
 
not sure I'm clear.
Have you any suggestion to fix this bug?
Thanks for your time
AnswerRe: User defined functions for Excel 2010 in .NET: args linked to cells don't workmvpDave Kreskowiak7 May '13 - 15:10 
PozzaVecia wrote:
Basically my UDF can't accept a link to a cell as argument... can this bug be
connected with 64 bit of Windows?

 
Nope. It works fine on Office 2007 (32-bit) running on Windows 7 64-bit.
 
Typically, bitness problems involving Office interop are because of a mismatch with Office, not with Windows. For example, trying to run 32-bit extension in 64-bit Office.
 
The only time I could get a "#VALUE" error to show up was when I didn't supply 3 arguments.
 
I used the article you linked to and copied the code exactly (except for changing the GUID) as well as the exact steps for registering the Add-In in Excel.

AnswerRe: User defined functions for Excel 2010 in .NET: args linked to cells don't workmemberPozzaVecia7 May '13 - 18:48 
Quote:

Nope. It works fine on Office 2007 (32-bit) running on Windows 7 64-bit.

 
Yes I tested the same Excel 2007 32bit with Windows 7 64bit is fine..
 
I have the problem with Excel 2010 32bit with Windows 7 64bit. I thought It was a problem of bit because if I type argument in a cell the UDF does't work (I thought It was a bit conversion problem). While if I directly write arg in function it works.
 
I also create a function with no args and it works (Excel 2010). So the problem is linked to reading arg from other cells. Very strange
GeneralRe: User defined functions for Excel 2010 in .NET: args linked to cells don't workmvpDave Kreskowiak8 May '13 - 2:14 
I don't have Office 2010, so I can't test against that.

QuestionSolution Explorer to be shown on the toolbarmemberindian1437 May '13 - 7:15 
Hi All,
 
I have started using Visual Studio 2012 with C# as basic settings. But when I opened a project using Visual Studio 2012, I am not finding Solution Explorer in the ToolBar list on the top of the IDE, generally in Visual Studio 2010 I used to click on that Icon on the top of the IDE just below the File, Edit etc menu.
 
Can someone please help me in adding that to the list so that my development would become easy intead of going to View menu and selecting the Solution Explorer every time. I have checked to customize that ToolBar on the top, but I dont know which ToolBar item would add the Solution Explorer to ToolBar actually.
 
Thanks for the help in advance.
Thanks & Regards,
 
Abdul Aleem Mohammad
St Louis MO - USA

AnswerRe: Solution Explorer to be shown on the toolbarmvpDave Kreskowiak7 May '13 - 7:41 
There isn't a button as far as I can tell.
 
I just use the quicker shortcut: Ctrl-W, S.
 
Or just click the View menu, Solution Explorer.

GeneralRe: Solution Explorer to be shown on the toolbarprofessionalT Pat7 May '13 - 20:00 
Another shortcut ctrl + alt + L Wink | ;)
Do not go where the path may lead. Go instead where there is no path and leave a trail.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 18 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid