I need to build a dynamic linq query with or operators. I have seen PredicateBuilder but that is in C# and my project is in VB. Basically I need to build a WHERE clause similar to this:
Where((this = 1 AND that = 2) OR (this = 1 AND that = 4) OR (this = 2 AND that = 4))
but the problem is the number will have to be determined dynami...
How do I make VB constantly check for keypresses?
Keypresses ARE detected when debugging step-by-step, but that's it :(
Here's my keypress code so far:
Private Sub Form_Main_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
'Keypress Q, A, or Z if the picture is seen...
I have a gridview that is only shown in a modal popup. right before I call the modal popup I set a value in a textbox. The gridview inside the modal popup depends on that textbox's value for it's data to show up at all. SO onclick I want to reload the gridview so that it will reload with the textbox's value. Any ideas?
...
To me, Visual Basic seems clumsy, ugly, error-prone, and difficult to read. I'll let others explain why. While VB.net has clearly been a huge leap forward for the language in terms of features, I still don't understand why anyone would choose to code in VB over, say, C#.
However, I still see (what seems to be) the vast majority of comm...
I have a problem moving a Word template from Word 2003 to Word 2007
The code which I need to convert is
Sub Standardbrev()
Documents.Add Template:= _
"p:\setup\stdbrev.DOT", NewTemplate:= _
False
mask "<Navn>", False
mask "<Adresse>", False
mask "<Postby>", False
mask "<att>", True
mask "<Jura ...
I understand that Subsonic 2.2 requires the MySQL.data 5.2.3 dll. I'm trying to integrate a subsonic DAL for a VB project in Visual Studio. The project already uses a lot of datasets. Because of this, Visual Studio requires that I have the MySQL NET connector software installed, which automatically throws its own MySQL dll deep into ...
I am trying to change a filename extension in a macro for OpenOffice.
My files are named like "file.odt" and I need to transform this string to "file.pdf".
I use a macro that I have found on the Web but I have never written any line of basic code in my life ... However, the code is buggy and only works for 3 chars extensions (like ".do...
I am converting a c# LINQ example:
var query = from m in typeof(string).GetMethods()
where m.IsStatic == true
orderby m.Name
group m by m.Name into g
orderby g.Count()
select new { name = g.Key, overloads = g.Count() };
In the a...
Hi Guys
I have a question on checkboxes in acess 2003
I have 4 checkboxes on my form and one of these boxes, i want to restrict so only users supplied with the correct password eg (report1) can check that box. I have a small textbox to the side of the checkbox labelled manager password.
I am not sure how to set this validation in acces...
By "group" I mean the collapsible classifications that you get when you enable View->Arrange By->Show in Groups. This divides e.g. messages in a folder into Today, Yesterday, Last Week, Two Weeks Ago, and so on. What I'd like to be able to do is iterate over the messages that are currently classified within a given group. Is this poss...
How can I get Visual Basic to open another form using code? I have attempted to google the solution several times and never found anything that works.
Also, do VB forms share variables? Is there any way for one form to send data to another form?
I know this should be really simple, but I just cannot figure it out.
...
I am using VB.NET 2008 Express Edition to access Serial Port which is a USB to Serial port. Since this is removable, the app user can disconnect it at any time in app. I am getting an unhandled exception when I remove the USB Serial Port.
After research, it seems like a known problem in .NET (even in 3.5)
I am looking for some solutio...
Update: Management has seen the light, we're going with php and mysql. Thanks for your help.
Subject: Access 2007
If it were my choice, i'd write up a web-based app w/ perl and mysql... But the higher-ups aren't good with computers, and know more about microsoft excel than they do the command line. They are great at organizing and...
The only programming language I know is C++, and I would like to learn some others, specifically Visual Basic. So what are some good beginners tutorials for VB, and what others languages would you suggest are good ideas to learn?
...
I have a DataGridView to which I've set a list of objects to the DataSource. (I'm in VS 2005 using VB.) I created the DataGridView by creating a Data Source of type AssetIdentifier and dragging that Data Source onto my form.
I want to update the DataGridView when the selection in either a combo box or another DataGridView changes. (B...
Hi, I've got this macro code in Microsoft Office Word 2003 which reads the lines of a text file. The lines each represent a string value that I need to use later in the code.
However, the first two lines of the text file contains some stuff that I don't need.
How can I modify the code so that it skips the two first lines? The "intellis...
I have a page with several gridviews. For usability, I have put these gridviews into a series of jquery tabs. Tabs works by creating anchor links that go to containers with certain ids, so after clicking on a given tab, the url might change from
host.com/page.aspx
to
host.com/page.aspx#tab2
The issue is that if any elements inside th...
I realise there is a solution for this but I am struggling to get it to convert to VB correctly :(
I have managed to get a cascading set of dropdowns with data based upon each others results which I was really pleased with.
However due to the post back the grid will disappear until the second value is selected and looks awful
Is there...
Hi, I'm trying to write a Word macro which inserts data from the Current User in Registry into predefined bookmarks in the document. I've got an ini-file which dictates what the names of each registry entry is, and that value is then imported into a loop in the Word Macro. This works fine (I think), but the Word macro needs to insert the...
I read somewhere that older VB .net (pre VB .NET 2005?) couldn't use overloaded operators in a C# class. Is it true for overloaded cast operators?
Either way do you guys think it's a disadvantage for a C# class library not to include them and arithmetic methods as actual methods for other languages, like:
ToDouble
ToFloat
FromDouble
Ad...