User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion

Reply
Thread Tools Display Modes
Unread 12 Apr 2006, 16:18   #1
JammyJim
Godfather
 
JammyJim's Avatar
 
Join Date: May 2000
Location: England
Posts: 5,185
JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
VB2005 - Visual Studio (vb.net)

Before anyone replies with 'shouldve learnt c# or c++ or any other derivative of c or infact any other language' - the reason ive chosen vb is because its close to ASP and ASP.NET (its teh same \o/) and im converting a really really old quickbasic 4.5 program so the code differences are not huge...


Right onto the problem:

I have 4 forms.

Each form represents a new screen for the user.

The first form has on it a password box and a button.
It also has a background image that is scalled to fit the window and the form is maximised on screen with no mdi container crap around it (the graphic fills the entire screen so no drag menu at top or maximise buttons or taskbar etc etc)

The contents of the form are in a panel which is centred when the form loads ...


Me.SuspendLayout()
Me.DoubleBuffered = True
Panel1.SuspendLayout()

' Centre(Panel)
Panel1.Left = (Me.Width / 2) - (Panel1.Width / 2)
Panel1.Top = (Me.Height / 2) - (Panel1.Height / 2)
Panel1.ResumeLayout()
Me.ResumeLayout()


If they hit the contineu button it does a check on the textbox and if the password = "123" or whatever it does the following :

If TextBox1.Text = "123" Then


form2.Show()
Me.Hide()


Else
passworderror.Text = "Incorrect Password"
End If



Now when form 2 loads its very similar insomuch as it has a panel with controls inside it.

However because form2 is also being maximised on load and stretched to fill the screen i had to have the same 'move the panel to the centre' code.

THe problem is that the controls flicker.
I dont understand why it does it because i have suspendlayout commands above and resumelayout after its been moved.

I cannot for the life of me work out why its doing it.


Does anyone have any suggestions?


(it does this on all 4 forms with varying levels of flickeryness depending on how many controls are present in the panel)
__________________
Forum Administrator
Mail : [email protected] // IRC : #forums
__________________
It's not personal, it's just business.
JammyJim is offline   Reply With Quote
Unread 12 Apr 2006, 17:06   #2
Squidly
Avenger of Calamari
 
Squidly's Avatar
 
Join Date: Aug 2003
Location: Alberta, Canada
Posts: 939
Squidly is a pillar of this Internet societySquidly is a pillar of this Internet societySquidly is a pillar of this Internet societySquidly is a pillar of this Internet societySquidly is a pillar of this Internet societySquidly is a pillar of this Internet societySquidly is a pillar of this Internet societySquidly is a pillar of this Internet societySquidly is a pillar of this Internet societySquidly is a pillar of this Internet societySquidly is a pillar of this Internet society
Re: VB2005 - Visual Studio (vb.net)

Err... flickering? could you elaborate a bit more on that?
Squidly is offline   Reply With Quote
Unread 12 Apr 2006, 17:34   #3
JammyJim
Godfather
 
JammyJim's Avatar
 
Join Date: May 2000
Location: England
Posts: 5,185
JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: VB2005 - Visual Studio (vb.net)

When the user hits the 'continue' button and it shows the next form - form2.show()


When the form is being displayed for the first second or half second the cotents of the panel flicker like crazy. As in they appear and reappear all the time. Like its drawing it over and over until it gets it right.

Ill try and video it but thats about the best way i can describe it.
__________________
Forum Administrator
Mail : [email protected] // IRC : #forums
__________________
It's not personal, it's just business.
JammyJim is offline   Reply With Quote
Unread 12 Apr 2006, 18:19   #4
JammyJim
Godfather
 
JammyJim's Avatar
 
Join Date: May 2000
Location: England
Posts: 5,185
JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: VB2005 - Visual Studio (vb.net)

It would seem the internet has lied to me.

I have spent hours trawling google looking for an answer to this. There is no logical explanation as to why it should do it. Everything is doublebuffered etc....


I thought id try one last thing..

When i first starting learning vb2005 i was told to slap all the contents into a panel and then use the above code to centre the panel so that if the application was set to maximise it wouldnt bugger up the layout..

I did this.


I just dragged the contents of the panel onto the main form. Removed the panel. Ran the program.......

No flicker...

Problem still remains that its all top left...

Then i find the 'anchor' property is set to 'top left'
i change it to 'none'



low and behold. no flickering. Everything where it should be.


I blame the fecking internet and its stupid goddamn advice.


Mind you this is a good thread for anyone else who reads the same thing.


(bare in mind when i started this project i had absolutely 0 experience in vb)

(FFS)
__________________
Forum Administrator
Mail : [email protected] // IRC : #forums
__________________
It's not personal, it's just business.
JammyJim is offline   Reply With Quote
Unread 12 Apr 2006, 23:20   #5
Raging.Retard
Street Tramp
 
Raging.Retard's Avatar
 
Join Date: Apr 2000
Location: Street Gutter
Posts: 341
Raging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant future
Re: VB2005 - Visual Studio (vb.net)

Quote:
Originally Posted by JammyJim
Before anyone replies with 'shouldve learnt c# or c++ or any other derivative of c or infact any other language' - the reason ive chosen vb is because its close to ASP and ASP.NET (its teh same \o/)
Time to clear up some misconceptions then.

Apart from the syntax, VB is different from ASP, and it is VERY different from ASP.Net. They are not "the same". There are very fundamental architectural differences, and the way you write applications with them are very different. Choosing to learn VB over (as you mentioned) C# because its "the same" as ASP.Net is wrong. VB.Net, C#.Net and a whole host of other languages will all compile to MSIL to be used for an ASP.Net application. I encourage you to forget everything you know about ASP when trying to write an ASP.Net application as it will hinder the code you produce. It's normally very easy to spot someone who has just shifted from ASP to ASP.Net by the mess of code they create.

Now, on to your problem. The flickering is caused by redrawing, though I'm not sure why that is happening. Your panel is clearly raising Paint events during the maximise and forcing the controls within the panel to redraw. It sounds like a queue of the events are being raised. I would be interested to see the whole application for a better look.
__________________
Chimney Pots.
Raging.Retard is offline   Reply With Quote
Unread 12 Apr 2006, 23:31   #6
JammyJim
Godfather
 
JammyJim's Avatar
 
Join Date: May 2000
Location: England
Posts: 5,185
JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: VB2005 - Visual Studio (vb.net)

Ok yes you are right about them being different. However much of the basics (which is all i need right now) are very very similiar.

Im not performing vastly complicated programming calling upon every facet of VB. Its all basic maths formula and saving the data to an external file and reading from an external file.

That file doesnt even need to be encrypted in any way.

However i have fixed the problem..
__________________
Forum Administrator
Mail : [email protected] // IRC : #forums
__________________
It's not personal, it's just business.
JammyJim is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Forum Jump


All times are GMT +1. The time now is 15:27.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018