Click here to Skip to main content
15,302,644 members
Home / Discussions / C#
   

C#

 
GeneralRe: SIFT Pin
ri19872-May-12 21:13
Memberri19872-May-12 21:13 
GeneralRe: SIFT Pin
ri19872-May-12 21:16
Memberri19872-May-12 21:16 
JokeRe: SIFT Pin
PIEBALDconsult2-May-12 11:05
professionalPIEBALDconsult2-May-12 11:05 
GeneralRe: SIFT Pin
Pete O'Hanlon2-May-12 11:32
mvaPete O'Hanlon2-May-12 11:32 
GeneralRe: SIFT Pin
Member 1239536924-Apr-16 23:11
MemberMember 1239536924-Apr-16 23:11 
QuestionHow to Override FileSystemInfo Class Readonly properties (Exists, Extension, Name, and etc)? Pin
ShadowUz1-May-12 19:34
MemberShadowUz1-May-12 19:34 
AnswerRe: How to Override FileSystemInfo Class Readonly properties (Exists, Extension, Name, and etc)? Pin
egenis1-May-12 20:05
Memberegenis1-May-12 20:05 
QuestionShowingTabs After Authentication Pin
AmbiguousName1-May-12 19:03
MemberAmbiguousName1-May-12 19:03 
hello guys... In my program, user will first need to enter the credentials on Tab1, in order to be able to see the rest of the tabs (and controls on it). If wrong credentials are given then upon clicking any other tab, for a fraction of second it shows the other tab (onwhich I click: say Tab3) then switches almost immediately back to first tab, although the code works fine . Here is what I have tried so far
C#
private void OnMouseDown(object sender, MouseEventArgs e) 
{
  if (e.Button == MouseButtons.Left)
  {
      if (tabMainTabCtrl.SelectedIndex != 0)
      {
        if (IsUserAuthenticated) // this is set when user is authenticated or not
          tabMainTabCtrl.SelectedIndex = m_iSelectedTab;
        else
          tabMainTabCtrl.SelectedIndex = 0;
      }
  }
}

private void tabMainTabCtrl_SelectedIndexChanged(object sender, EventArgs e)
{
     m_iSelectedTab = tabMainTabCtrl.SelectedIndex; //m_iSelectedTab: class level global variable
}

As I said, it works fine but it seems strange. So what can be a better solution? thnx for any input.

This world is going to explode due to international politics, SOON.


modified 2-May-12 1:12am.

AnswerRe: ShowingTabs After Authentication Pin
Eddy Vluggen2-May-12 0:02
professionalEddy Vluggen2-May-12 0:02 
Questionembed javascript code in c# Pin
mrx1001-May-12 12:02
Membermrx1001-May-12 12:02 
AnswerRe: embed javascript code in c# Pin
Dave Kreskowiak1-May-12 13:27
mveDave Kreskowiak1-May-12 13:27 
AnswerRe: embed javascript code in c# Pin
Abhinav S1-May-12 16:36
MemberAbhinav S1-May-12 16:36 
Questionhow can i add a midi file in my csharp project? Pin
SeyedRezaFatemi1-May-12 10:20
MemberSeyedRezaFatemi1-May-12 10:20 
AnswerRe: how can i add a midi file in my csharp project? Pin
Richard MacCutchan1-May-12 10:41
mveRichard MacCutchan1-May-12 10:41 
AnswerRe: how can i add a midi file in my csharp project? Pin
egenis1-May-12 20:28
Memberegenis1-May-12 20:28 
QuestionHow can i specify drive specification Pin
Fred 341-May-12 9:11
MemberFred 341-May-12 9:11 
JokeRe: How can i specify drive specification Pin
Wes Aday1-May-12 9:42
professionalWes Aday1-May-12 9:42 
GeneralRe: How can i specify drive specification Pin
Fred 341-May-12 9:51
MemberFred 341-May-12 9:51 
GeneralRe: How can i specify drive specification Pin
Richard MacCutchan1-May-12 10:40
mveRichard MacCutchan1-May-12 10:40 
GeneralRe: How can i specify drive specification Pin
PIEBALDconsult1-May-12 10:37
professionalPIEBALDconsult1-May-12 10:37 
GeneralRe: How can i specify drive specification Pin
Wes Aday1-May-12 10:49
professionalWes Aday1-May-12 10:49 
GeneralRe: How can i specify drive specification Pin
PIEBALDconsult1-May-12 11:10
professionalPIEBALDconsult1-May-12 11:10 
GeneralRe: How can i specify drive specification Pin
Wes Aday1-May-12 11:26
professionalWes Aday1-May-12 11:26 
GeneralRe: How can i specify drive specification Pin
PIEBALDconsult1-May-12 11:40
professionalPIEBALDconsult1-May-12 11:40 
AnswerRe: How can i specify drive specification Pin
Bernhard Hiller1-May-12 23:56
MemberBernhard Hiller1-May-12 23:56 

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

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.