Click here to Skip to main content
15,910,787 members
Home / Discussions / C#
   

C#

 
GeneralRe: load internal path of ressource (.dll) Pin
Richard MacCutchan16-Dec-14 10:41
mveRichard MacCutchan16-Dec-14 10:41 
GeneralRe: load internal path of ressource (.dll) Pin
Janis Heller16-Dec-14 10:48
Janis Heller16-Dec-14 10:48 
GeneralRe: load internal path of ressource (.dll) Pin
Garth J Lancaster16-Dec-14 11:32
professionalGarth J Lancaster16-Dec-14 11:32 
Questionconvert any string to 24 hexadecimal digits Pin
Jassim Rahma16-Dec-14 8:40
Jassim Rahma16-Dec-14 8:40 
AnswerRe: convert any string to 24 hexadecimal digits Pin
Richard MacCutchan16-Dec-14 8:59
mveRichard MacCutchan16-Dec-14 8:59 
AnswerRe: convert any string to 24 hexadecimal digits Pin
Kornfeld Eliyahu Peter16-Dec-14 9:55
professionalKornfeld Eliyahu Peter16-Dec-14 9:55 
GeneralRe: convert any string to 24 hexadecimal digits Pin
PIEBALDconsult16-Dec-14 10:21
mvePIEBALDconsult16-Dec-14 10:21 
GeneralRe: convert any string to 24 hexadecimal digits Pin
Jassim Rahma16-Dec-14 10:45
Jassim Rahma16-Dec-14 10:45 
GeneralRe: convert any string to 24 hexadecimal digits Pin
PIEBALDconsult16-Dec-14 11:20
mvePIEBALDconsult16-Dec-14 11:20 
Questionremove handwriting from pdf (not in list of objects) Pin
Ali Hakak16-Dec-14 5:02
Ali Hakak16-Dec-14 5:02 
AnswerRe: remove handwriting from pdf (not in list of objects) Pin
Dave Kreskowiak16-Dec-14 6:00
mveDave Kreskowiak16-Dec-14 6:00 
QuestionMake the routing network safe Pin
Member 1101334015-Dec-14 9:44
Member 1101334015-Dec-14 9:44 
AnswerRe: Make the routing network safe Pin
Eddy Vluggen16-Dec-14 0:28
professionalEddy Vluggen16-Dec-14 0:28 
Questiontool.Strip1.Visible = false and toolStrip2.Visible = false? Pin
Member 1041097215-Dec-14 0:34
Member 1041097215-Dec-14 0:34 
AnswerRe: tool.Strip1.Visible = false and toolStrip2.Visible = false? Pin
OriginalGriff15-Dec-14 1:02
mveOriginalGriff15-Dec-14 1:02 
AnswerRe: tool.Strip1.Visible = false and toolStrip2.Visible = false? Pin
Simon_Whale15-Dec-14 1:02
Simon_Whale15-Dec-14 1:02 
AnswerRe: tool.Strip1.Visible = false and toolStrip2.Visible = false? Pin
Eddy Vluggen15-Dec-14 3:02
professionalEddy Vluggen15-Dec-14 3:02 
GeneralRe: tool.Strip1.Visible = false and toolStrip2.Visible = false? Pin
Member 1041097215-Dec-14 5:35
Member 1041097215-Dec-14 5:35 
AnswerRe: tool.Strip1.Visible = false and toolStrip2.Visible = false? Pin
BillWoodruff15-Dec-14 3:15
professionalBillWoodruff15-Dec-14 3:15 
Welcome to CodeProject !

If you are at a beginning level in programming WinForms and C#, you may want to consider asking questions in the C# QA Forum, rather than in this forum; I say this based on my observation that questions with very little information about the context (lack of code, lack of information about whether it's WinForms or ASP.NET or WPF, etc.) often get a better reception in QA.

And, please do, in any future questions, give more information about what you are working with, what you have tried, and what your overall goals are.

There's one tricky part about dealing with the VisibleChanged Event of the WinForms ToolStrip: it will be fired/triggered when your Application starts, and, in that first event, the 'Visible property of the ToolStrip will be 'false, even though you did not set that Property to 'false at design-time.

Unfortunately, this fire-on-Application-start behavior only happens with certain Controls.

Here's how you deal with the possibility that your code would execute when your Application launches"

1. define a Form scoped variable: private bool intializing = true;

2. in the Form Load EventHandler set it to 'false
C#
private bool initializing = true;

private void Form1_Load(object sender, EventArgs e)
{
    initializing = false;
}
3. define a VisibleChanged EventHandler for both your ToolStrip Controls: you can do this by selecting both of them, hitting F4 in Visual Studio to bring up the Property Browser, select Events, and click on 'VisibleChanged. Or, wire-them=up individually.
C#
private void ToolStrips_VisibleChanged(object sender, EventArgs e)
{
    if (initializing || toolStrip1.Visible || toolStrip2.Visible) return;

    textBox1.Location = new Point(3, 71);
    textBox1.Width = 377;
    textBox1.Height = 490;
    label3.Location = new Point(3, 51);
}
The logic here tests for whether you are initializing, or whether either one of the two ToolStrips is visible, and, if that's true, exits: else it executes your code.
«OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. »  Alan Kay's clarification on what he meant by the term "Object" in "Object-Oriented Programming."

GeneralRe: tool.Strip1.Visible = false and toolStrip2.Visible = false? Pin
Member 1041097215-Dec-14 5:43
Member 1041097215-Dec-14 5:43 
QuestionHow to store GPS Device data in the SQL data base Pin
heyvid14-Dec-14 18:05
heyvid14-Dec-14 18:05 
AnswerRe: How to store GPS Device data in the SQL data base Pin
syed shanu14-Dec-14 20:50
professionalsyed shanu14-Dec-14 20:50 
AnswerRe: How to store GPS Device data in the SQL data base Pin
Eddy Vluggen14-Dec-14 22:32
professionalEddy Vluggen14-Dec-14 22:32 
GeneralMind Your Language Pin
heyvid15-Dec-14 1:56
heyvid15-Dec-14 1:56 
GeneralRe: Mind Your Language Pin
Eddy Vluggen15-Dec-14 3:00
professionalEddy Vluggen15-Dec-14 3:00 

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.