|
It sounds as though you shouldn't be creating and deleting the panels. Rather just altering what they're displaying. Creating and killing controls at runtime is a very expensive operation.
Just keep track of the Panels in your own array and modify their properties. Instead of killing the panel, couldn't you just set it's Visible property to False?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well yeah I have thought about taking it to a more "stationary system"... but I don't really want to mess up the layout(in the designer), everthing will become stacked and impossible to find, that was one of the reason to do it at runtime.
Also as I said... it's about sequences and just using a timer to flash a panel at a time, but with this is also 3 different difficulties, which contains of more and more panels, at most 5 x 6 panels. That would be like 30 * 30 loops == 900 loops, which might not be very efficient no=/ But if I go for the stationary with allready placed panels... I guess I would have a limited amount of panels to handle and therefore could handle them all in one single handler. But isn't there away to handle all those created controls? ( I guess there is one for ALL controls, but I do have buttons and radio buttons that need special treatment, so what about a range of controls?)
Thanks alot for help so far.
Regards,
Hmmkk
|
|
|
|
|
Like I said, you'll have to track them yourself in your own collections. They'll also have to be added to the Form's Controls collection so you can actually see them.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi folks,
I need (a Tool or a Hint) to convert programmatically a webpage (URL) to a thumbnail,
even using Internet Explorer as a parsing unit.
There's many tools over the Internet, but i figure out that it can be possible
using the GDI+ API's in the .net Framework.
Nobody knows how to perform this task?
Thanks i.a. to all that read this topic.
Ennio Della Lucia
Italy
|
|
|
|
|
This is done in VB6.0
I have closed the application, the workbook and quited the excel application but the excel is still in memory.
Actually i have some macros in my excel .It might be creating the problem,i guess now.
and from one site i have seen that i have to ensure whether the excel has been saved or not (I am giving book.save in the code)
for that i did
while (not workbook1.Saved)
DoEvents
wend
But it didnt work...then,
I closed each and every workbooks by putting it in a loop.
But still excel remains in memory .I could open only if i have closed the excel.exe from the taskbar.Please help...
Thanks
|
|
|
|
|
can anybody tell me how i can communicate with the hardware through serial port in VB.NET.
Kusum
|
|
|
|
|
What you send over the serial port will be VERY device specific.
How you send it will depend on the version of the .NET Framework you're using.
For .NET 1.0 and 1.1, you'll have to find a 3rd party Serial Port library (unless you want to write your own). I suggest searching GotDotNet.com for "serial port" to find one.
For .NET 2.0, you can use the SerialPort[^] class.
I don't have any examples for either of them. You'll have to do some Googling yourself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Hi!
Trying to get the handle of the window (actual app, not textbox or other window) that was active before I clicked in my own win form? I've tried GetActiveWindow and GetWindow with the GW_HWNDNEXT and GW_HWNDPREV paremeters but I'm no expert using Windows API's and can't seem to get it to work:
'Get the next window handle.
Dim vWndActive As IntPtr = GetActiveWindow
Dim vWndPrev As IntPtr = GetWindow(vWndActive, GW_HWNDPREV) 'this line doesn't work!!
'Activate previously active window
Dim vClassName As String = Space(256)
GetWindowText(vWndPrev, vClassName, vClassName.Length)
AppActivate(vClassName)
I know this code doesn't work and may not make much sense but it's the stripped version of what I'm trying to do and I think you get the point.
(Ps. Using vb.net)
|
|
|
|
|
There is no function that will return the previously active window. AFAIK, the only reliable way would be to override your window's WndProc and look for the WM_ACTIVATE message. If the low order word of the wParam field of this message contains the WA_ACTIVE or WA_CLICKACTIVE message, the lParam of the message will contain the handle to the window that lost the focus.
Once this message is processed by your application, it's way too late to call any function to find out what the previous window was.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
What are the list of events that get fired during the life cycle of a Win Form in .NET, I mean when it is created and destroyed.
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
After a quick search on MSDN for "forms order of events", click[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thats for Visual Studio 2005. Is it the same for Winforms in Visual Studio 2003?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
No, that's for Windows Forms in .NET. VB.NET 2005 added the little note in the middle of the page, but the order of events has not changed in the Form class since .NET 1.0 was released.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks...
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
Hey
I want to add a column in winforms datagrid
That will show the combo box with multi columns.
How we can create Multi Column Combo Box & embed that with datagrid
Is DataGrid's DataTextBoxColumn can hold the MultiCOlumnComboBox Control???????
Any Source Code,suggestion,link,guidence is highly appreciated
Thanks a bunch in advance.
Hema Chaudhry
|
|
|
|
|
Hi,
there are many articles[^] here on CodeProject showing how to do this.
|
|
|
|
|
Hey,
Thanks for the Prompt & precise reply.
But these all articles I have senn they are implementing the Single Column
Combo Box . WhichI have done already.
My problem is to embed the MultiCOlumn ComboBox inside datagrid
I have seen some multi Column Combobox User Controls Examples also
on CodeProject.com iteself.
But they all are not fully embedded with the wnforms datagrid.
your valuable suggestion are highly appreciated.
thanks a lot
Hema Chaudhry
|
|
|
|
|
You will probably will have to make this yourself. I would suggest you look into one the the articles showing how to add a normal combobox into the grid and try to exchange the combobox with one of the multicolumn comboboxes[^] already available.
|
|
|
|
|
Hey Robert,
Thanks again for this direction.
I will check these articles
& Try to implement
Thank you very much for this direction
thanks a lot
Hema Chaudhry
|
|
|
|
|
on the top-right corner of the form in pocket pc there is a close button, now i would like to disable it, so do not make it use to close this form, so how?what codes can be used?
thanx
go ahead...do best on my works....
|
|
|
|
|
Haven't tried it but in WinForms you would catch the Closing event of the form (or override OnClosing) and set the Cancel property of the given event arguments to true.
Probably its the same for pocket pc development...
|
|
|
|
|
You could set the forms ControlBox property to False although that will also remove the minimize and maximize buttons. If these aren't used then you're good to go.
Dean
|
|
|
|
|
thank you for your suggestion...but i am a new here,so not very familiar with the codes which u are talking about...so could u pls tell me the codes need to be used in this task....
thanx..
go ahead...do best on my works....
|
|
|
|
|
Hi,
Uhm... Ok, I know I need to have a crash course in this whole Bit / Byte / Char thing, but I'm hoping as per usual, that the quickest and best way for me to learn this, will be learning by example...
I get a value from somewhere in memory (Handled by a IPC which, I have *nothing* to do with). Value: 0x3500 (Or rather, &H3500 I believe?)
How do I convert that back to, say a String? Or a Integer?
According to the associated documentation:
Version number:
The HIWORD (i.e. bytes 3306-7) gives the main version as BCD x 1000: e.g. 0x1998 for 1.998
The LOWORD (bytes 3304-5) gives the Interim build letter: 0=none, 1-26=a-z: e.g. 0x0005 = 'e'
The value is 4 Bits long. In (I presume VB 2002), this apparently works:
<br />
Version = Chr(Asc("0") + (&HF And (Shift(myModule.Mod_Version, 28, RightShift)))) & "." & _<br />
Chr(Asc("0") + (&HF And (Shift(myModule.Mod_Version, 24, RightShift)))) & _<br />
Chr(Asc("0") + (&HF And (Shift(myModule.Mod_Version, 20, RightShift)))) & _<br />
Chr(Asc("0") + (&HF And (Shift(myModule.Mod_Version, 16, RightShift))))<br />
I know I may be asking allot here, but I'm more after someone explaining to me HOW this work, rather than just giving me example code (though, a example or 10 would be good as well). I have THOUSANDS of these magical 'Bits' and 'Byte Array' offsets that I need to read, manipulate, and write... Some of them I managed to get right (mostly the ones that returns Byte Arrays), but most of them, is a major battle to me.
From what I understand, I know that I need to loop through all the Bits in the Byte - and convert the Bits to whatever I want (Strings / Integers / etc) as I go along... But... How??
Thanks guys / gals,
Hopefully I'll understand this all better in bit (or, should that be byte?)
--
Chris
-- modified at 23:53 Tuesday 27th December, 2005
|
|
|
|