Use Condition Option In Program?
May 25, 2011
Proper VB.NET syntax to accomplish the following:
.ForAllMembers(opt => opt.Condition(src => src.Value != "removeMe"))
This is the best I've got, but I get a design-time error on the last statement that reads "property access must assign to the property or use it's value"
.ForAllMembers(Function(opt) opt.Condition(Sub(src As OrganizationMetric) src.Value <> "removeMe"))
View 1 Replies
ADVERTISEMENT
Feb 9, 2012
Actually i am a VB6 developer, switching to VB 2010 (VB.NET), in visual basic we use to do Form1.unloadme.However, its not working in VB2010.
View 1 Replies
Jun 25, 2009
I have two comboboxes which are related to each other. When a make a choice in the first there are different choices possible in the second. So far so good. But is it possible to remember the second choice when i change the first? the program should select the the option in the second if possible or other select the first option.[code]
View 4 Replies
Feb 15, 2012
I have a lot of data stored in Word document. Over 1500 pages. And I want to make a program which would have the search option.Word can not search so fast because there are too many pages so I want some better resolution.I tried to make it in delphi but it's too complicated, and I don't know PHP very well.So how to put these data in V.Basic and which search script should I use.
View 5 Replies
Jun 14, 2009
I have installed WCF / WPF Extension with Visual studio 2005.
I developed the sample WCF services and to consume it I have developed the client project.
In client project I need to give the service reference, however I noticed here Add service reference option is missing.
View 4 Replies
Jan 13, 2012
I would like to make the option available that my program can be changed in another language.
A simple solution would be a checkbox on my form which you can click on to change to language X or Y.
Does anyone have the code for this or can point me in the right direction ?
View 1 Replies
May 28, 2010
I've seen that there are several options out there for being able to send email from within a Visual Basic program, but I've seen much less written about how to use the program to receive emails. What I'd like to do is set up a dedicated email account (probably g-mail or Yahoo or something similar, although it could be through the email package that comes with my web hosting) that I'd use to send short text commands to the program from my laptop or smart phone. Periodically the program would download new emails (if any), and parse the body to see what I'm telling it to do. Something like, "cmd a" tells it to e-mail me Report A, "cmd b" tells it to e-mail me Report B, etc.
[Code]...
View 3 Replies
Aug 3, 2010
Late binding is not allowed and that's how we want it. Depending on whether our program is running on a LAN or the Internet, we need to dim an object as one of two types. We use an if...then statement to ascertain whether or not we are running on a LAN or the Internet.
When we declare our object inside the if...then statement, we have declared in the wrong scope and cannot use the object. When we declare it as an 'Object' type and use DirectCast inside an if...then statement, we receive a late binding error. How can we get around this problem without turning off Option Strict?
View 2 Replies
Dec 2, 2011
I do not live in USA, and my program run specifically with my country's Regional and Language Option format. However, many Windows XP, Vista and 7 installed in my client computers automatically with English (United States) Regional and Language option. I want my program to automatically change the computer regional and language option to my country. However, I do not find anyway to do that (changing the computer regional and language option in runtime by the program), yet.
View 11 Replies
Jan 27, 2010
how to add the Uninstall option in the Start--> Programs, during setup and deployment of an application?
View 4 Replies
Feb 22, 2011
I really like the coding speed that vb.net provides, but I don't like the possibility to forget to declare variable types, return types of functions, etc. and that is why in each class I use[code]..
Is there a way to define those two options on the project/solution level?
View 2 Replies
Jan 26, 2010
the combo box style 1 has both the drop down option but also a manual entry option. I need to know how to code it so that when you manually enter data, it takes that data and places it in a text message "The shipping charges for "data" is $15" displaying in a text box. Shouldn't be hard but have developed a mind block.
View 4 Replies
Feb 12, 2011
I'm trying to do is make a program to where when you click an option, a text outputs for each button clicked, the general design looks like this:
That's just a beginning, since the whole rest of the thing will be the same concept pretty much, and what I want to have it do is, like stated earlier, once the option is chosen, a text output, like this:
I know there is an alternative to solving that, but it will take me 10x more time, and that is, creating a new textbox, setting the visibility to False, and typing what I want outputted in that text box, then putting: RichTextBox1 = TextBox1.Text
I know that works, and gives me my output, but I just wanted to know if there was any other way but that.
View 2 Replies
Sep 8, 2010
I have a program written in VB.net 2003 that are folks run under alternate credentials. Inside the app there is an option to open a UNC path to a network share. We were running Windows XP SP3 and IE6. The code is simple just a call to the explorer.exe with /root,\UNCPath. After installing IE 8 onto the machine this no longer works. Best I can tell the code is still working but now being executed in non interactive mode so nothing opens up. You can however see a new spawned explorer.exe running under the system account for each attempt at opening a UNC Path. Any ideas what IE8 could have done to cause this behavior?
View 4 Replies
Feb 24, 2010
what does these two code means in vb.net: Option Explicit on Option strict on i think option explicit means the compiler is not going to do any kind of conversion and i need to do all of them by the code;also it becomes case sensitive i.e;
[Code]...
View 8 Replies
Jul 28, 2009
I want my console application to be able to do one function I have when you click one option on the windows context menu, and another function when you click another option.
View 3 Replies
Oct 17, 2009
How can I get round this error: Option Strict On disallows implicit conversions from
[Code]...
View 4 Replies
Feb 22, 2011
1. I have read that keeping Option strict on and Option infer off is good practice and will insure your code is tight and properly written. I would like input regarding this, pro's and con's from those who are in the know.
2. Having said that, I have set Option strict on and Option infer off in an existing program I wrote (that was working perfectly mind you) with them off and on respectively. I went through and cleaned up all the errors on the 'need AS' and casting of variables, but one is leaving me a bit put out.[code]
I have also read where using My.Computer.System.Directory.GetFiles() instead of System.IO.Directory.GetFiles() is probably not a good thing, but when I change to this I get no error, but also no dataI am thinking I should stay with the strict on and infer off but am really slogging through getting this code correct.Running Win7 on Dual Quad Core XEON Intel Extreme with 8Gb RAM.
View 2 Replies
Jun 10, 2010
I am writing a text editor program and I have written the new, open, save as, exit menu items but I am struggling with writing the save option.Now I have created the menu itself (well vb did, I just used insert standard items) but how do I code up the save menu option so that it updates the current document or if the documnt has not yet been saved bring up the save file dialog.Here is the code I have so far
Public Class Main
Private Sub NewToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewToolStripButton.Click, NewToolStripMenuItem.Click[code]....
I know I have some finishing touches such as messages and error handling and stuff but at the moment I want to get all the basics working,I think the save menu option is all I am struggling with at the moment.
View 1 Replies
Jul 20, 2009
I need to add an option to a program of mine that enables "High Contrast" mode in windows XP.
Just like the picture below, but programatically
View 4 Replies
Mar 4, 2009
Using VS2008, targetting framework 3.5, trying to update some VB4 code. Yes, VB4.I have a bunch of legacy code I'm trying to update, and I had the idea of trying to work through it by executing the old code, working out what was causing each error as I came to it, solving the problem, and then moving on.In order to do this, I have sinned and set Option Strict Off, Option Explicit Off and Option Infer On.Yes, I'm going to hell for this.Problem is, I'm still getthing errors that various things haven't been declared.All of these the items showing errors are in the form: itemName(obj)Is my problem that the compiler thinks that these are method calls for methods which haven't been declared?PS: For anyone wanting to tell me not to use these settings, I already know
View 2 Replies
Mar 28, 2010
I have to take over a project written in vb.net, which contains more than 400k lines of code written in option strict off mode. I want to build it under option strict on first before I do anything else -- which maybe converting it into C#. I found there's thousands of lines of code raises compilation error, mostly are about implicit type casts. Is there any tool would help to make it compile under option strict on mode if I don't want to correct every single line manually? Because it's really painful to add CStr/CInt invocation into every line of Code myself.
View 3 Replies
Sep 7, 2010
I turned Option Strict On and i get an error on all the ".Cells" lines saying option strict on disallows late binding.
a = 1
b = 3
c = 2
d = 1
With oSheet
[CODE]..................
View 4 Replies
Jun 30, 2011
[Code]...
I really prefer to keep Option Strict On. the proper way to do this?
View 1 Replies
Aug 10, 2011
i mean for e.g., numbers are between 1 and 100 .i want to show messagebox for each number as text for example "One" for 1.
View 1 Replies
Apr 13, 2011
I have inherited a VB.NET application that I need to compile so I can run dorkumentation on it. I first received "Option Strict On disallows implicit conversion from x to y" errors, so I turned off the Option Strict option in the Project file.
So why do I still fail with the same error message?
View 2 Replies
Oct 18, 2010
I had posted this question before but didn't get the right answer -here's my code again with the if condition.
Dim provider As CultureInfo = CultureInfo.InvariantCulture
Dim a1 As DateTime = Nothing
If date1.selectedvalue isnot nothing Then
[code]....
View 4 Replies
Sep 25, 2011
I have a problem. I have been programming an activation type of security protection for my software but i ran into problems when i try to generate an alphanumeric key with conditions. i cant seem to be able to make the keys to be valid with the condition. Basically i can get the 25 keys but all of them seem to be returning 1 (ones) instead of 0 (zero which what i want. below is my sample code may be someone can tell me what i am doing
[Code]...
View 1 Replies
Dec 8, 2009
I have the following code which gives me an error at run time. The problem is when TxtSearch.Text - is not an integer a message box should be prompted saying- Only a numeric value is allowed in this field, otherwise continue with the sub.
Private Sub ButtonSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSearch.Click
Dim query As String
[Code].....
The error I receive is showing ''saved_prac = cmd.ExecuteScalar()''..
First it brings the Message box - Only a numeric value is allowed in this field. When I OK it, then it brings another message box "error converting data type varchar to numeric". When you click OK the application crashes...
View 6 Replies
Jun 20, 2010
What is the correct syntax to go to the next sequence in a loop if certain conditions are met bypassing the contents.
I am using goto and inserting a line number which is probably not the best way.
I.E. My syntax:
For i = 0 to 100
If i = myvariable goto 100
Functions to be performed
[Code]....
View 8 Replies