Page 6 of 6 FirstFirst ... 456
Results 76 to 82 of 82
  1. #76
    omanel's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Portugal
    Posts
    93
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    Sorry, didn't understand what this does..
    I have ToolStripMenuItem1 renamed TSGW and others renamed other suff, should this still work?

    I get an error in this:
    Code:
    For Each n As ToolStripMenuItem In Me.Controls
    Error:
    Unable to cast object of type 'System.Windows.Forms.ToolStrip' to type 'System.Windows.Forms.ToolStripMenuItem'.

    Do you know how to solve it?
    Ps:I did rename the ToolStripMenuItem1 in the "enable1DisableRest(ToolStripMenuItem1)" to TSGW so it's not it..

  2. #77
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Quote Originally Posted by omanel View Post
    Sorry, didn't understand what this does..
    I have ToolStripMenuItem1 renamed TSG and others renamed other suff, should this still work?

    I get an error in this:
    Code:
    For Each n As ToolStripMenuItem In Me.Controls
    Error:
    Unable to cast object of type 'System.Windows.Forms.ToolStrip' to type 'System.Windows.Forms.ToolStripMenuItem'.

    Do you know how to solve it?
    Just replace "ToolStripMenuItem" with "ToolStrip" . It might solve this. I gave you a general idea, rest you can figure out !!

  3. The Following User Says Thank You to Hassan For This Useful Post:

    omanel (06-30-2010)

  4. #78
    omanel's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Portugal
    Posts
    93
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    Quote Originally Posted by FLAMESABER View Post
    Just replace "ToolStripMenuItem" with "ToolStrip" . It might solve this. I gave you a general idea, rest you can figure out !!
    thanx for trying to help me but I am not able to do it...i think I'll have to use "If's" in all of my menu items lol

    Ty anyways!

  5. #79
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    you need to check if it is a ToolStripMenuItem or the menu itself, otherwise the program will be crashing like it is happening now... its like... Trying to do a Cast of a Label to a button (crash...)...

    be sure to have a If to check what control is it on the collection.
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  6. #80
    omanel's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Portugal
    Posts
    93
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    I did it the hard way lol

    New question:
    I have several forms and I don't know why form 4 starts first instead of beeing form1..how do I fix?

  7. #81
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Project > *Project name here* Properties > (optional: on the left click "Application") > Startup form > choose your startup form.

  8. The Following User Says Thank You to Lolland For This Useful Post:

    omanel (06-30-2010)

  9. #82
    omanel's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Portugal
    Posts
    93
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    Quote Originally Posted by lolland View Post
    Project > *Project name here* Properties > (optional: on the left click "Application") > Startup form > choose your startup form.
    Thanks, I am starting to understand vb2008 but still got lots of basic things like this to learn lol

Page 6 of 6 FirstFirst ... 456

Similar Threads

  1. Just a simple question.
    By Toxin in forum Help & Requests
    Replies: 25
    Last Post: 07-31-2009, 04:38 PM
  2. HELP PLZ SIMPLE QUESTION
    By GibsonRocks231 in forum Combat Arms Hacks & Cheats
    Replies: 9
    Last Post: 01-05-2009, 04:24 PM
  3. A simple question
    By thechewu in forum General
    Replies: 10
    Last Post: 07-17-2007, 05:17 AM
  4. I Have A Simple Question
    By patrick8099 in forum WarRock - International Hacks
    Replies: 7
    Last Post: 05-13-2007, 03:51 AM
  5. Simple question
    By SoulRemover in forum WarRock - International Hacks
    Replies: 1
    Last Post: 04-22-2007, 09:42 AM