Results 1 to 8 of 8

Thread: PictureBox In SSTab

  1. #1

    Thread Starter
    Frenzied Member arpan_de's Avatar
    Join Date
    Oct 2005
    Location
    Mumbai, India
    Posts
    1,394

    Question PictureBox In SSTab

    I want to change the back color of SSTab for which I am using a picture in a PictureBox control. Though SSTab has a BackColor property, it doesn't change the back color of the SSTab (which is why I am being forced to use a picture). The Form in which the SSTab resides opens up when a menu is clicked in the parent Form.

    Depending upon the skin selected by the user (which they can do from the parent Form), the picture in the PictureBox will change. There are 2 such pictures. The size of the pictures (both GIF files) I am using in the PictureBox is 1.43 KB.

    Now what I find is when I change the skin in the parent Form & open the Form which has the SSTab control, the Form with the SSTab control opens up with a very slight flickering. I am not sure if flickering would be the correct term but the attached images might help clarify any doubts.

    The Form with the SSTab should actually look like the 2nd image. In fact, it looks also like that ultimately but just a nano-second prior to that, the Form looks like the 1st image shown below after which only it changes to the 2nd image. Though it hardly takes any time to change from the 1st image to the 2nd image, it can be easily made out.

    I would like to avoid this. Is the size of the 2 images (1.43 KB) causing this? Are there any ways by which I can avoid this without reducing the size of the images? Only 1 image is used at a time in the PictureBox.

    Note that this started happening only after I started using the PictureBox control to render a different color to the SSTab. Also note than I am using 5 PictureBox controls for the 5 tabs - using just 1 PictureBox for all the tabs doesn't work.
    Attached Images Attached Images   


    ARPAN

    IF YOU HAVE AN APPLE & I HAVE AN APPLE AND WE EXCHANGE THE APPLES, THEN YOU & I WILL STILL HAVE ONE APPLE BUT IF YOU HAVE AN IDEA & I HAVE AN IDEA AND WE EXCHANGE OUR IDEAS, THEN EACH OF US WILL HAVE TWO IDEAS!

    NOTHING IS IMPOSSIBLE IN THIS WORLD.....EVEN THE WORD IMPOSSIBLE SAYS I'M POSSIBLE!

    PRACTICE MAKES A MAN PERFECT BUT NOBODY IS PERFECT; SO WHY PRACTICE?

  2. #2
    Member
    Join Date
    Jan 2008
    Posts
    41

    Re: PictureBox In SSTab

    hmm i have tryed this many of time but i have no succsess im sorry mate but i dont think there is away mabye but im not sure!

  3. #3
    Frenzied Member
    Join Date
    Dec 2007
    Posts
    1,072

    Re: PictureBox In SSTab



    Used TabStrip.

    In one of Microsoft's Common Controls.

  4. #4

    Thread Starter
    Frenzied Member arpan_de's Avatar
    Join Date
    Oct 2005
    Location
    Mumbai, India
    Posts
    1,394

    Re: PictureBox In SSTab

    Using a TabStrip is a very good idea but I have already done a lot of programming work with SSTab & hence wouldn't like to change to a TabStrip now. BTW, will changing to a TabStrip from SSTab involve lots & pots of changes in the code? If not, then I might consider replacing the SSTab with a TabStrip else no! I have never used a TabStrip before.

    Anyway what I had guessed was right. The file size of the images was the reason. When I decreased the file size of the images from 1.43 KB to 615 bytes (using a image compression software), the Form with the SSTab loaded without any aberrations.


    ARPAN

    IF YOU HAVE AN APPLE & I HAVE AN APPLE AND WE EXCHANGE THE APPLES, THEN YOU & I WILL STILL HAVE ONE APPLE BUT IF YOU HAVE AN IDEA & I HAVE AN IDEA AND WE EXCHANGE OUR IDEAS, THEN EACH OF US WILL HAVE TWO IDEAS!

    NOTHING IS IMPOSSIBLE IN THIS WORLD.....EVEN THE WORD IMPOSSIBLE SAYS I'M POSSIBLE!

    PRACTICE MAKES A MAN PERFECT BUT NOBODY IS PERFECT; SO WHY PRACTICE?

  5. #5
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: PictureBox In SSTab

    There is a way to change the sstab backcolor that might interest you, subclassing, here is the Link to that post

  6. #6

    Thread Starter
    Frenzied Member arpan_de's Avatar
    Join Date
    Oct 2005
    Location
    Mumbai, India
    Posts
    1,394

    Re: PictureBox In SSTab

    I used the TabStrip control in one Form but can't find out a way to add a picture to it. The Image textbox under the Tabs tab in the Properties dialog is greyed out. How did you add the picture mate?


    ARPAN

    IF YOU HAVE AN APPLE & I HAVE AN APPLE AND WE EXCHANGE THE APPLES, THEN YOU & I WILL STILL HAVE ONE APPLE BUT IF YOU HAVE AN IDEA & I HAVE AN IDEA AND WE EXCHANGE OUR IDEAS, THEN EACH OF US WILL HAVE TWO IDEAS!

    NOTHING IS IMPOSSIBLE IN THIS WORLD.....EVEN THE WORD IMPOSSIBLE SAYS I'M POSSIBLE!

    PRACTICE MAKES A MAN PERFECT BUT NOBODY IS PERFECT; SO WHY PRACTICE?

  7. #7
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: PictureBox In SSTab

    The other way would be to use a Frame control (with a null Caption) rather than a PictureBox, perhaps.

  8. #8
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: PictureBox In SSTab

    Quote Originally Posted by arpan_de
    I used the TabStrip control in one Form but can't find out a way to add a picture to it. The Image textbox under the Tabs tab in the Properties dialog is greyed out. How did you add the picture mate?
    The Image property of the Tabs is to set a small image on the tab itself and you'll need an ImageList for that. What have been used above is simply a PictureBox above the TabStrip, simular to how you're doing with the SSTab.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width