This code gives a result of 1 for all numbers and i don't know why. phi(n) for any n in this code give me 1.Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n As Integer
n = CStr(TextBox1.Text)
Dim phi As Integer
I have found lots of posts on the web citing this problem but none of them have solutions, please could someone shed some light on this and help me find a solution otherwise my applicvation will lose a lot of the functionality I have planned?
I have produced a program in VB5 and I have designed a report in crystalreports (4.6). I want to click a button on a form in the program and viewthe report in a view window not in the CR4.6 editor.
I am using the following code to try to call the report however when ittries to start I get a 20536 - Incorrect log on procedures.Additional information:I'm running Win XPI have crystal report control 4.6 selected in the project components menuI have put a CR control on the formI have crystal report control 4.6 selected in the references menu If fixed will this open the report in the viewer window rather than the fullCR editor? (that's what I want)
I am compiling a VB Project in VS2005 with SP1. This is the error that I am getting when I build this project.
12>C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Microsoft.Common.targets(802,9): error MSB3108: Error executing the ResolveNonMSBuildProjectOutput task. An error occurred while parsing EntityName. Line 1, position 115.Microsoft.Common.targets is a file present in WINDOWS folder and used internally by VS2005 while building the projects. I am not able to get any clue why this error has come.
A while ago I wrote a library which helps me simply text operations, serial communications, PLC interaction using OPC Automation, etc... My problem is with the vb6 serial control mscomm32.ocx. In my computer, I can use it with no problem. Everything works fine when testing serial control and my forms can open sucessfully. When I try to run a winform that uses Serial library (mscomm32.ocx) in a computer that doesn't have VB6 installed, I get the error "Common Language Runtime Debugging Services. Application has generated an exception that could not be handled. PRocess id=0xe0 (224). Thread id= 0x6f4 (1780)"
So i've to write this program whose purpose it this:
Purpose: The user enters the item name and amount of the item purchased. The program calculates the tax for the item and the final total, and then displays these values. Tax on all items will be 7.75%.
And so far i've this code but it's not working:
' Program: Cash Register ' Author: Nidhi Shah ' Date: February 2, 2010 ' Purpose: The Cash Register Window application will ' computer the tax and the final cost of a ' purchased item.
Option Strict On
Public Class frmCashRegister ' Tax per item - used in multiple procedures Const _cdecTaxPerItem As Decimal = 0.0775D
I am new to .net and I usually had a common file which was having information of username,server,password,IPS and fixed integers in php and asp classic which i used to include in all files so that i could use them in any page. Since I have come to know that .net has no include function. how i can do it in asp.net?
I need to add some common details in more than two tables. [code]So i have stored the Department (from drop down list box) and assigned it to Dept.So i guess dept would have Csc if i choose csc and commerce if i hoose commerce.When I checked with breakpoint it s workin. Datas are added perfectly. But they are not visible in that respective table
In the old VB, there is a .bas file wherein i place all the global constants there and whenever i create a new project i just include that .bas file so that all the constants i placed are automatically added to my project. Is there any way to do this on VS2008? Ill be doing dozens of Class Libraries that that needs to reference global constants.
1. Is there any other way of referencing the global constants rather than making it a shared variable in a class?
2. Also, is there a way to include a .VB file without the copying it on the local project file? My point being is that this .VB file is also being used by other Class LIbraries that i created.
Is it possible to set up a common event handler for a group of like controls like buttons or text boxes so a single event handler is called regardless of which of the controls is clicked, changed, etc.In my PrinterDialog study project I have 5 text boxes named TB1, TB2, TB3, TB4 and TB5 in a text box array called TBs so they can be accessed with TBs(0), TBs(1), etc.My question is if I can set up a single click event that responds when any of the 5 text boxes are clicked to avoid duplicate code n 5 different click events.
I know it is not vb question but I was wondering if there is any place to get the common images for buttons (like save, clear, find, new , delete etc...)
I have to group the first column (Code) and from the second (Year) I have to get the data 'less common as possible' compared to all the other records. I try to explain this with the example: for the code 'A01' I have 2 years: '2001' and '2002'. I have to take '2001' because it's the one that not recurs in the other records. In the case that there aren't available values 'Year' that not recurs in the other records, it's good to take whatever value.
The data are in the form of array in memory and to interact with them I'm useng some LINQ queries.
Essentially, whenever my users who are logged in via a global module level variable enter a new form, their activity is "logged" in a textfile with their UserID as the name.txt and every time they visit a page it adds a new line to their log file with a number corresponding to the form they visited. For example, if they select "add a user" it will add the line "1" to their log file. Note: At the moment there is only 1 2 and 3 not 0.
I have got this far and I have got as far as creating an array which has: Array(0) = NumberOfTimes 0 appears in the log file Array(1) = NumberOfTimes 1 appears in the log file etc etc
Therefore the output for this is Msgbox(Array(0)) shows "0" MsgBox(Array(1)) shows "4" for example and lets just say MsgBox(Array(2)) shows "9" and MsgBox(Array(3)) shows "1"
Therefore, finally (!) my problem is now finding which 3 are the top. I have tried various methods of sorting them but I just get "9, 4, 1, 0" rather than "2, 1, 3, 0". (By the way the end product for this is to show three links on the "welcome form" of the users 3 most visited forms). Here is a pastebin of all the rubbish I have currently tried that hasn't worked! [URL]
When I was learning QBasic I found a list of most common errors and it told me whether my errors were syntax errors or logic errors. Where I can find a similar list for VB 2008 Express Edition?
i made an application using VB.NET 2010. i have 5 forms. i want to know how to make one common navigation (like in a webpage) for this application. Is it possible to have the menu and header static and loads each form in one dynamic container. I hope my questing is clear :P just to make it more cleared, it is more like having a templates in php coding where we can load other page in a particular area without having to reload the entire page with each links.
I am looking for a way to modify the default values in windows vista and or 7.
Examples:
* The default directory for the save/save-as dialog box. * The size of the window. * The "favorites" list on the left of the box.
I have been looking for a while and the only thing I can find is to edit the group policy but this will only affect programs that are using the xp dialog box.I am sure this is actualy pretty easy but I cannot find anything for the life of me
Here is a complicated, but possibly dumb question concerning adding projects together in the IDE in order to increase performance and share memory at the same time.I have written two distinct exe's. The first exe (file processsor) operates using three timers to perform communication between a hardware OEM proprietary ComServer and file output from the second exe. The second exe (work generator) simply outputs files on hard disk so that the "file processor" can process the commands in the order given. The first exe was written as a "background processor" to the second exe in a stand-alone fashion. There is a need to communicate data between the first and second exe that is time sensitive. The ComServer called by the "file processor" only allows one port to for communication to the hardware device that is a USB. The "file processor" is capable of extracting the data required but the existing technologies, such as RPC, IPC are too slow and or full of pitfalls. Microsoft's Memory Manger has found it easier to create multiple instances of the proprietary ComServer and assign the needed memory to the calling routine so that it can "scoot" memory easily in the garbage collection feature of the operating system. What this does is cause the mullitple instances that are created to "gang up" on the device either slowing its performance down, or causing time outs. [The second process is a custom 3-D graphical CAD/CAM. The first process is a machine interface. Although hind-sight is 20-20, it seemed more ideal to write this background or file processor independantly, as then it could communicate with existing as well as a custom CAD/CAMs.]
Simply writing the first processes' code into the second slows down the second process as a result of all the timer interrupts looking for work to do. (Mouse is squirrely, screen refresh is slow, etc.) I am only guessing here that the operating system's service of the more complicated single memory location is somehow interrupted more frequently for a larger project, than two smaller independant projects running seperately. I only know what I observer here. Interestingly, the two smaller projects running seperately seem to run fine.
Now for the dumb question. Is it possible to merge the "file processor" with the "work generator" in the IDE such that each process runs as independantly as two distinct apps, but at the same time, make it possible to share memory via one Module1.vb? So far, I cannot find a way for the "file processor" to see the "work generator's" Module1.vb, regardless of how many PUBLIC statements I issue in the code. In other words, what would be the steps after File->Add-> Existing Project to cause the "file processor" project with a form to start first, then drop to the background, followed by launching of the "work generator" second where each process shares the same Module1.vb?.
If this could be done, say through a compiler statement, or whatever; then this could make the Memory Manger folks happy, and provide for the speed required to operate real world processes? Basic computer science suggests a simple processor LD instruction could make data available to any application within a few clock ticks. Microsoft now longer allows direct memory access, or the ability to carve out a "stay resident" dll in memory where a memory location can be called for quick distribution information to all apps with just one call to a device.
There are 3 project in vb.net MAIN PROJECT, BLL(Business Logic Layer), DAL(Data Access Layer) now we are trying to maintain one single instance of some values through out the assembly or what we can called single instance should get used in all projects...for example there is a class called clsParameter we need only one instance of this class should get used through out all projects so if i made any change in MAIN PROJECT same values also get updated in BLL or BLL should receive same values....
I have started developing in vb.net 2008. I want to make a common module to validate all text boxes of my every win form. Common Validation I'm looking for are Length ( Size ) of text box value must not greater then that of field size, It must be of numeric, or alpha only, It must not be empty, if single quotation mark, covered with double quote mark etc.
Does DirectCast, ctype, etc., are common function? Why it return type, and how do I used it? Is there others function where I need learn to be dot net expert?
I'm back to working on my program and need a little advice. I have this program on two computers and I want to set it up to access the same set of datafiles. I want the program to tell it's counterpart on the other computer that it has a certain file open so the other program will not allow that person to access the opened file. The data files are all text files. Without using SQL or outside apps, can this be done thru vb.net?
what is the common interface between textblock and textbox when it comes to dela with text stuf?
What I want to do is to create a procedure that accept a textbox or a textblock and change fonts stuff is there a common interface for them that dela with font stuff??