|
The first is obviously faster. Creating/destroying a pen is not THAT expensive, you just need to do it. In C#, we have the using keyword, does VB.NET 2005 have that now ? I know 2003 didn't.
Also, if you're drawing with one pixel wide pens, don't create them, use Pens.White, for example.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Christian,
Thanks for the help and input. *really* stupid of me I know, but I figured out I can actually re-use pens... Change width / color on the fly etc... I'm optimising the entire routing now to use only one pen, and draw like I would normally.
So far there's a remarkable improovement... I can just see the memory waiting for something else to complain about again now -grin-
Thanks for the help, I'll shout if there's something else.
--
Chris
|
|
|
|
|
I think I have found a flaw in Visual Basic 6.0 Learning Edition when it is used for development on a Windows XP Professional based PC.
In my first post: "Application doesn't show up on the Windows Taskbar when running." I wanted to know how come the application wouldn’t show up on the Windows task bar while the application was running. There is a property called ShowInTaskBar that when set to true will show the application running in the taskbar, but this doesn’t seem to work if you have more than one form on your application. All forms with the exception of the Splash and Login the ShowInTaskBar property is set to true, so logically any form running on this project should minimize to the taskbar when running. In short the project application should minimize to the taskbar regardless of the number of forms it may contain.
I experimented with a project in VB that contains only three forms, Splash, Login and the Main form. When the project starts it shows the Splash screen for five seconds. Next the login screen will allow the user to log in. After the user is logged on the Application’s name should show up in the taskbar. It does not. I can only assume that there is a flaw in either VB or Windows XP that causes this problem.
I have an application with multiple forms, How do I set up the project so that everything is bundled into ONE application that minimizes to the Windows taskbar when executed?
Thank you,
Quecumber256
Quecumber256
|
|
|
|
|
VB6 works just fine. The Learning Edition uses the exact same runtime version and compiler. There is no flas in VB6 or in XP. The number of forms has never been a problem in the past. We've all had applications with many forms that don't have this problem.
You're project IS in one .EXE.
I still your problem is in your Splash screen or Login form code. But we can't tell because we've never seen it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'll be happy to send the Code. The application starts with the Sub Main. BTW, the problem is showing up on another application that contains multiple forms. Is there some Windows API I should be using?
Quecumber256
|
|
|
|
|
Quecumber256 wrote: I have an application with multiple forms
The number of forms should be irrelevant.
Quecumber256 wrote: How do I set up the project so that everything is bundled into ONE application
Write it that way
Quecumber256 wrote: that minimizes to the Windows taskbar when executed?
I bet you $5 that this google search will work 'VB6 taskbar download source'.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'll give it a try.
Quecumber256
|
|
|
|
|
i want to ask if there is any code that help to compine my program with a picture
please i need this for my university in my project, try to answer me ASAP
|
|
|
|
|
Combine a program with a picture?? I don't understand what you're tyring to do here.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I meant, after doing the program, i want to compine it with picture, so, when i open the picture, the progem works
|
|
|
|
|
Well, you could do something along the lines of a PKUnzip self-extrator, where the .ZIP file is appended to the end of the .EXE unzip code. The resulting file will not be usable as an image file though. It will have an .EXE extension since it's an executable with data attached to the end of it. You will NOT be able to save any changes back to the file though, since the .EXE file will be locked when you launch it.
Other than that, if you want to save any changes to the image, the file MUST be seperate from the .EXE editing it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
can not i make it .jpg for example
|
|
|
|
|
No you can't. If you attach ANY code to the image file, you'll invalidate the image data and it won't be loadable in any application.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
last question, os there any command to change the extension of a file
|
|
|
|
|
File.Move will rename a file. All you have to do is supply it with the original name and the new name. Unfortunately, you can't change the name of a file if it's open, like an .EXE while it's running.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how can i make a tabcontrol tab to come in focus if it is not in focus.
plz help
i mean if i click at button if the tab is not in focus & some other
tab of the same tabcontrol is in focus how should i bing a particular tabcontrol panel in focus.
Plz code me out help in vb.net
-- modified at 10:00 Sunday 8th January, 2008
|
|
|
|
|
hi guyz whats up, need some help on topic subjected .
i want to search for a string within another string
e.g.<link rel="alternate" type="application/rss+xml" title="Mt RSS Feed" href="smsbysan.8m.com" >i want to get the title string & the href string.
|
|
|
|
|
|
Delete this post please...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Who'd have thought - the stupidest person on CP is in the VB forum ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
And Christian gets the bonus points for reducing the title so it doesn't cause my browser to create horizontal scrollbars... Oh, no! The OP's post already did that.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Yeah, I figured it was a lost cause to replace the subject line, since the OP was already causing the scroll bars.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
how coulc i compared password entered by user with the one already existing in the database?
|
|
|
|
|
Well, there's always ==. Personally, I think it's a good move to MD5 both, and then compare the result, but that's another story. Either way, I have to say, this is a pretty inane question. If it means what it says, you should really go and learn some REAL basic stuff before doing anything that requires a password ( i.e. that needs to be secure ).
Christian Graus - Microsoft MVP - C++
|
|
|
|