|
Hi Everybody!
Being a little bit inexprienced in the .NET Toolbox controls department, i keep stumbling across wonderful C++ Controls and components, only to download them and find that all i get is two .cpp files that i can't figure out how to integrate (if it is ppossible at all) into my vb project.
Is it possible to add C++ Controls to a VB Project, and if so, how?
Thanks Everybody!
MrWolfy
|
|
|
|
|
compile the control(s) into a class library, and then load the resulting .dll file into your VB app. I'm sure someone else will give you a more detailed explaination.
How many bytes of text have I typed in my lifetime??? Man, I wish I kept track...
|
|
|
|
|
This should be an easy one .. But I've been struggling all night over this ...
- I'm adding menu items during runtime (keeping track of open files)
- I can add the handler for the menu click event - that works ..
Question:
- How can I search / locate for the "newly" added menuitem just by its Menue NAME
[untitled(1)] as an example
- Is the best approach the use of a hash table ? (indexed by menu location ?)
(I haven't tried this yet)
- You would think there is an easy way of searching for the menu name direct ???
Here is how I'm adding the neue menu Item:
MenuName = "untitled(1)" ' Assigne window name
<pre>WindowsToolStripMenuItem.DropDownItems.Add(MenuName) ' add new created window to menue
Any ideas
Thanks
georg
|
|
|
|
|
The best solution would be to name every menu item both uniquely and meaningful. Then iterate through each menu in the menu system for the particular name.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Thats what I'm trying to do - but I can not figure out what "function" actually lets you
find an existing menu name based on a string
Any idea how to actually do it ?
Indexof / find/ index/ compare and so on have not worked for me (I might not call the correct menu tree
as an example:
WindowName = "untitled(1)"
test = WindowsToolStripMenuItem.DropDownItems.Find(WindowName, True)
does not work ????
Where [WindowsToolStripMenuItem] is the actual menu that contains the menuitems
I most be doing something wrong
Georg
|
|
|
|
|
FYI, if the function doesn't already exist then create the function
pseudocode:
foreach menuitem in windowstoolstripmenuitem.dropdownitems
{
if(menuitem.name=='search criteria' OR menuitem.name.contains('search criteria')
return correct;
else
return incorrect;
}
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
You need to make sure you're actually setting the "Name" property and not the "Text" property. They are different and independent of one another and typically when you create a new menu item you are setting the "Text" property.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Good point - but I believe I did try this also last night as I changed the search String from "untitled(1)" to "untitled(1)ToolStripMenuItem" = added [ToolStripMenuItem] to the text property the same way as VB 2008 is doing it when you create a menuitem ...
But I'll check again tonight
Georg
|
|
|
|
|
I just verified on MSDN[^], the call you are making
WindowsToolStripMenuItem.DropDownItems.Add(MenuName) ' add new created window to menue will add a new ToolStripMenuItem whose text is the value of the string MenuName .
You have two choices:
1. The Add method returns the actual ToolStripItem that was just added, so you can take that instance and assign a value to the Name property. To do this it would be something like this:
ToolStripItem item = WindowsToolStripMenuItem.DropDownItems.Add(MenuName)
item.Name = MenuName 2. Create the ToolStripItem first and then add it to the collection:
ToolStripItem item = new ToolStripItem(MenuName)
item.Name = MenuName
WindowsToolStripMenuItem.DropDownItems.Add(item)
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
This got me going ... not everything is working yet , but I was able to search based on a string
Your where correct in that I had to set the .name also
Thanks a lot
|
|
|
|
|
You're welcome. Glad it going you heading in the right direction.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Hello
I have a VB.Net project which is a WPF Windows App. I took the XAML code sample from the MSDN page 'Viewport3D class', and I wrote the VB.Net version of it. I placed the Viewport3D control by code, as in the C# sample located on the same webpage.
The compilation of the VB code had no errors. However, the control in question does not appear on the form, while the C# version worked just fine.
The question I have is: Is there something I could do to solve this or is it the 3D WPF feature which does not work for VB ?
Th answer would be very helpful for me.
Thanks
|
|
|
|
|
Whatever is programmed in C# can be done in VB, regardless of the XAML used (XAML would not have to be converted in this instance). Since I am assuming you were looking at both codes at the same time, I would assume you missed an important chunk.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Thank you for the answer.
However, I am new to the WPF technology and would need a hint on what to do with the code I wrote. It is based on the XAML code, because I intend to obtain the same result by procedural code, instead of the designer one. That is, I could deliver you the VB code or even the entire project so that we may figure out the problem. If this is necessary, please inform me (email: cristi2go@yahoo.com).
With regards,
cristi2go.
|
|
|
|
|
Well, since it sounds like you ditched the XAML aspect altogether and converted it to procedural code, then I am not quite sure what to tell you. Even I am having problems converting XAML to procedural code. I am somewhat interested in the code that you are working, but I am completely busy all summer and would have no time to look it over, sorry. The best advice that I can give you is to continue to study MSDN documentation/CodeProject/google results/ and possibly buy a good programming book on XAML. Many of the Apress WPF/XAML books I would not be able to code without.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Hi,
My application requires a long process of going through selected rows in the DataGridView and calculating things, this must be done on the main GUI thread. The user needs to be able to cancel this process but otherwise not have any interaction with the main GUI. I need a popup Progress Window (progressBar, label,cancelButton...) that will tell the user how much of the process is done and give them a chance to cancel.
I think I need to create a new thread that will launch a progress window, the progress window will launch a process located on the main thread, and the main thread will comunicate back to the progress window how things are going. I've lookedd for many tutorials but they've all focused on running work on background threads using public variables.
Also, I am still very new to programming and this is m first real application. I ask you explain things in as much detail as possible.
Thank you!
|
|
|
|
|
maksim310 wrote: this must be done on the main GUI thread
Why do you think so?
maksim310 wrote: I think I need to create a new thread that will launch a progress window
No, that's not possible. Only the GUI thread can open windows.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
So what's the best way to do this then? I'm going to be coloring 5000 data grid view rows different colors, I need to show the user the progress.
|
|
|
|
|
maksim310 wrote: I'm going to be coloring 5000 data grid view rows different colors
Why color so many rows when the user is only going to see a few at a time?? You got some ginormous monitor you're not telling us about?
|
|
|
|
|
Only 15 or so rows will be seen at once, but the Data Grid View will be displaying all 5000 rows and the user will be scrolling looking for certain patterns.
This is a scientific program where users will be generating copious amounts of color-coded rows and will need to detect patterns as they scroll. THe only other way I can think of is to paint them as they scrool by, but that might be too slow as well as constantly hang up the GUI.
-Max
|
|
|
|
|
Do the work in a background thread and store the results in a synchronised queue. Run a timer in the GUI thread that get the result from the queue and puts them in the grid.
Search the forum for SynchronisedQueue, and you'll find an implementation that I did a while back.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
How do you bulid a tablebuilder using excel VB
|
|
|
|
|
Thank you for your help.... This is done
|
|
|
|
|
Hi all,
I have a requirement where I need to get the IPs of all Subdomains in a Domain using VB.Net2005.
for example ,
I have the IP of the Domain "codepro.xyz.net"..
under this server there are many subserver(or subdomains) exists like "codepro.xyz.net\code$"
Here my requirement is to get all such subserver names or their ip addresses .
Any cade samples for this
Thanks in advance..
modified on Monday, June 30, 2008 6:31 AM
|
|
|
|