|
Hmmmm.... I think you might have to change from inheriting from ObservableCollection to implementing your own collection class. You'd probably inherit from Collection(Of T) and implement the two interfaces INotifyCollectionChanged and INotifyPropertyChanged. You'd keep a collection internal inside the class and explose it just like ObservableCollection does, but add code in the Items(Of T) property to check for this condition.
|
|
|
|
|
I am developing a software with vb.net 2008, that I would like to interact with a PLC. Does any one ever tried it? If so can you please explain to me? Or tell me where can I find information on this subject? At the moment I do not have any plc brand, this will depend upon the response and information that I find. Thank you.
|
|
|
|
|
I suggest you start by reading the first 20 pages linked to by this[^].
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
http://consolitech.com/Downloads.htm#OPCClientControls[^]
There are some sample applications etc here so you can see what is involved. They also sell hardware.
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
Okay i just need the code to have my program call upon another program say, Notepad for example. i havnt got the slightest idea how to go about it
thanks in advanced.
|
|
|
|
|
Investigate the Process class, particularly the Process.Start method.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Will do, ill post back to make sure i got it working right.
|
|
|
|
|
System.Diagnostics.Process.Start("notepad.exe");
|
|
|
|
|
|
Hi to all
I have a special keywordlist that I would like to import in a treeview. The txt file looks like this, and works with tabs. So there is a maintopic. under the maintopic in a new line there is the undertopic with a tab. Perhaps under this undertopic is another undertopic in a new line with 2 tabs. It looks like This:
HeadLine
[TAB] Text1
[TAB] Text2
[TAB][TAB] Text3
[TAB][TAB] [TAB] Text 4
[TAB] Text3
Next Headline
[TAB] Text I
[TAB][TAB] Text
[TAB][TAB][TAB]TextI1
Does someone has an idea? I can mail a txt file that shows it detailled.
modified on Monday, October 26, 2009 5:01 PM
|
|
|
|
|
Sounds trivial to me. You count the tabs and every time the number goes up, you're adding child nodes. When it goes back down, you're adding a sibling to the parent.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Perhaps....but I'm a bit new in this. With directories etc. I get this. Your idea is good, but I don't know how to create this for...next body!
|
|
|
|
|
You're a bit new at VB ? In what context have you been given this task then ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I am trying to edit VB 2005 code developed by someone else. The developer put controls in splitter panels. It is not necessary to use them in this app and it also makes it difficult to edit the GUI.
How do I remove the panels/container? Highlighting the panel and pressing "Delete" does nothing.
Thanks!
|
|
|
|
|
In the Form Designer pressing Esc moves focus to the parent of the currently selected control.
What's probably happening is that you are selecting Panel1 or Panel2 of the SplitContainer and these cannot be deleted. So do as you did before but hit Esc before Del. This will take focus to the SplitContainer itself, which can be deleted.
Hope this helps.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
If I get you right, before deleting the SplitContainer, you need to move the container's child controls directly to the form (or wherever the split container is placed). You can do this pretty easily by directly editing the designer generated code. But if you are not sure, use the designer.
1. Set the Dock property of the split container to None and make it smaller so yo have room in the form for other controls.
2. Drag the child controls from Panel1 and Panel2 to the form.
3. Now delete the split container.
|
|
|
|
|
Another related tip....sometimes it is hard to get the correct control selected if you have several overlapping or contained within each other. For example, lets say you want to select the split container not the splitpanel1 and not a textbox inside splitpanel1. If you right click on the textbox in design mode the context menu will provide options to select the different controls that are on top of each other. I've found this very useful so I thought I'd pass it along.
Hope this helps.
|
|
|
|
|
Actually Iam using Office 2007. So I added the reference, Microsoft.Office.Interop.Excel 12.0 to my project.
Iam using vb.net 2008.When I try to insert a picture in Excel. I get a error "Reference require to Assembly 'Office....,
version 11.0.0.0....Microsoft.Office.Core.MsoTriState add one to your project...
I cannot find this reference. Where to find?
Dim xlApp As Microsoft.Office.Interop.Excel.Application
Dim xlWorkBook As Microsoft.Office.Interop.Excel.Workbook
Dim xlWorkSheet As Microsoft.Office.Interop.Excel.Worksheet
Dim misValue As Object = System.Reflection.Missing.Value
xlApp = New Microsoft.Office.Interop.Excel.ApplicationClass
xlWorkBook = xlApp.Workbooks.Add(misValue)
xlWorkSheet = xlWorkBook.Sheets("sheet1")
xlWorkSheet.Cells(1, 1) = "CODEPROJECT"
xlWorkSheet.Cells(2, 1) = "Adding picture in Excel File"
'PROBLEM IN BELOW LINE
xlWorkSheet.Shapes.AddPicture("C:\xl_pic.JPG", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, 50, 50, 300, 45)
xlWorkSheet.SaveAs("C:\vb_net\vbexcel.xlsx")
xlWorkBook.Close()
xlApp.Quit()
Thanks
|
|
|
|
|
Looking at the various results on Google when searching for msotristate, you also need to add the COM reference to Microsoft Office 12.0 Object Library.
When i did this the error went away.
|
|
|
|
|
Hi all,
I'm working on a application which searches for '_FLEX' or '_FLEX_' or '_CABLE' or _'FERME' in a text file.
If found do some action.
I use the below code to set the index to search for the above words.
Issue:
There is a line in the text file in the name fields with '_FLEX1'.
When this word is found, it does the actions that need to be done for lpFlex or lpFlex_ found.
I have used name.IndexOf for '_FLEX' and '_FLEX_' but when found'_FLEX1', it has performed the actionsof lpFlex or lpFlex_.
I dont want any action to be done when something other than lpFlex or lpCable or lpFeme or lpFlex_ found.
I think its because I use name.IndexOf().
Is there some other function/method to search for the specific word in a field/line?
Where am I going wrong?
Any help and suggestion please.
Thanks in Advance.
modified on Monday, October 26, 2009 11:13 AM
modified 28-Nov-12 7:40am.
|
|
|
|
|
Vijay,
use contains method like..
If name.contains("")
'your code
Hope it helps
|
|
|
|
|
Thanks for your reply and suggestion.
|
|
|
|
|
string.Contains will give you the same problems. Use regular expression instead.
|
|
|
|
|
If I understand your question correctly, you only want the action to happen if an exact match is found for one of your trigger words.
This might be very difficult, although it partly depends on what character 'should' follow them. For example, if they should always be followed by a space, then test for "_FLEX ", "_CABLE " etc.
If "_FLEX1", is guaranteed to be the only 'problem' then a test like:
If sampleText.SubString(resultOfIndexOf, 6) = "_FLEX1" THEN Return 'or whatever will ignore that entry
If they can be followed by anything then it would be extremely difficult. It may be possible by using Regular Expressions but I do not have sufficient skills in that area to say for sure. If after a couple more hours no-one has offered a solution I suggest that you post a new question with a title like "Regular Expression problem", that will usually attract the Expressionistas. If you do that, please be sure to mention that you asked earlier but got no luck but someone suggested RE might do the trick.
Good Luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hello All,
I am new to .NET.
Can any body please tell me how to catch all possible error that PrintDocument.Print() method returns!!!
I have installed a dummy printer on my machine..and tried to give print using PrintDocument.Print() method, but it is not giving any error. When i tried with an older application(which is written in C,C++)..it is throwing an error saying Network printer error.
How can i catch same error using VB.NET 2005.
Thanks in advance.
Regards,
Sr
|
|
|
|