I have 2 buttons that will open the same form. but depends on which button is calling, the operation will be different. How can I identify that this form is called from button 1 or 2.Also, if we want to have a password in the vb.net stand alone application, should we use shared property?
Using Excel Automation classes I am seeking to save an Excel file as a delimited text file. The examples given in the MSDN library refer to versions older than Express 2008 with (apparently) different syntax options for FileFormat.Based on the snippet shown, I get a COM exception error (800A03EC). Other variations produce the same error.
Am I improperly applying the Automation features? Imports System.IO Imports Microsoft.Office.Interop
I have a listbox containing a collection of strings (phrases) and would like to know if one of these phrases contains a substring. For example... myListBox contains the following strings stored in the items collection:
i want to get caller id to show this caller infoi used addtapi but it show message at initialization like dll info if any one know how to remove this message
I am trying to read caller id from a internal modem. modem is caller id enable and it works in hyper terminal. but when i try from vb.net it only shows 'RING'. here is my full code
I am creating a component for a third party program. I create a sub-class from a class in the third party dll. During runtime, the program will create an instance of my class. How can i reference to the caller that created an instance of my class? (There are a few class in the program that might use the component that i created.)
I've written a series of ASP.NET pages which have several common methods among them. In my ignorance, the best way I was able to find to move those common methods to a separate file was in a Module. However, what I need is a way to identify from which page was the method called?For example, I have a method call WriteToErrorLog with the following signature:WriteToErrorLog(ByVal sender As Page, ByVal Source As String, ByVal Message As String, ByVal StackTrace As String)
I want to create a Windows Forms Application in Visual Basic 2008. I have created my form already, now I just need to add Caller ID capability. how to do this? Will I need any extra components? If so, where can I get them?
I am creating a class ("Class B") which is used by another class ("Class A") which instantiates it in VB.NET 3.5.I would like Class B to read a value assigned to one of its properties by Class A every time an event happens in Class B.However, I would like this property value to be dynamically assigned to the property by Class A when the event is fired in Class B.I was thinking about somehow creating a delegate function in Class A that is linked to the property in Class B so that when the event is fired in Class B it would eventually invoke the delegate in Class A so that it returns a value to Class B.I've been reading around delegates (that's how I arrived at the idea), but I am stuck on how to code this up - could someone please help with some skeleton code?
Sub ChangeLanguage(ByVal caller As Object, ByVal lang As String) Dim c As Control = caller.GetNextControl(caller, True) Do Until c Is Nothing
[code].....
I call the sub with:
ChangeLanguage(Me, "en")
The problem I have is that I get the error: "Type 'caller' is not defined."If I change GetType(caller) to GetType(vbLogin) it works fine. (vbLogin is one of the forms)I need to find a way to get it working using caller though.
I have a few textboxes that have a context menu on them. what I would like to know.. is how to pass the name of the calling textbox to the form opened by the option in contextmenu.
i see that it is under the sender owner.. name.. but how do i get to that in code?
i am developing a CallerID application in Vb.net using modem..I am sucessfully getting the Callers No through Hyperterminal.How can i capture this Number through Vb.Net and Store it in a Database.
i would like to build a very simple program that connects to my modem and outputs in grid format, caller display, date time etc etc.Ive done loads of searching and i've found a few examples online but most are for VB6 and ive spent ages trying to upgrade them but with no joy!I have found two enxaples that work with VB2010 but i have struggled to make them work and also they seem way too advanced for me to learn from.
very often i see code written from others, and when browsing over a function i want to see where this function is called from. Even when i debug my own code, i'd find it a useful feature.In c++ this feature is default in visual studio(its called browse-something), but i havent found any such thing for VB.NET yet, any ideas?
I'm having trouble creating a sub that can create objects of a variable type on the fly. Here's an example of what I'm trying to achieve:
[Code]...
I can't get it to work. I've done a fair bit of research, and looked at generic types, reflection, and other tools, but I'm having trouble determining how best to tackle this problem.
Consider a MyForm class that contains a shadowed implementation of Show(). It also contains a CreateForm() method, which accepts an instance of the form and calls the shadowed sub:
Can I connect phone landline to my computer and when someone call me his information appears by his phone number this information already exist in database.. I want to know is it a service from communication company or can i do it by code just plug the cable into my computer ?
I have a form with a "Send" button to test a code to send SMTP emails.It fires the click event when I hit the "Send" button, but the email is never sent if I leave the form running. When I close it, the email is sent.This is not the needed behavior because the User may never close the Application (this is a Client/Server application, not Web).Below is the code behind the "Send" button's click event[code]...
I'm having a problem when trying to identify if the CD on the drive is virgen (CD-R or CD-RW).I'm using the following code:
Public Function ExistsCDOnDrive(Drive As String) As Boolean Dim FSO As New Scripting.FileSystemObject If FSO.Drives(Drive).IsReady Then ExistsCDOnDrive = True End IfEnd Function
How to convert every key to something that i can identify.E.g. This returns the actual character "a" or "b" or "6". Not in the format i need it to be.[code]....
How to my Application identify . About Windows Restart Timing And How much time Windows Restartand Thats alllogging it in Txt filei mean My application Logging Text oftime and date when Its Process Killed Like Closed
that is VB.6 code something Acording to my thread Private Sub btnWaitForExit_Click( _ ByVal sender As System.Object, _
I've got a simple Windows Form Application that will tell you the drives on your computer, in a multi-line format using a Rich TextBox.So, If there were the C:\ and d:\ drives on my comp then It'd look like this
C:\ D:\
So, if there is an external drive (such as a USB under the "F:\" directory named "My Data" what would be the way to find the name of that drive, assuming that I do not already know the name Here's my code.
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click RichTextBox1.Text = "" If IO.System.Directory.Exists("F:\") then RichTextBox1.Text = (TextBox1.Text + "F:\" + Environment.NewLine)
How can I uniquely identify a PC using vb.net code? Finding the PC name wil not work, as some users might use the same name. Please explain step by step, as vb.net is new to me.
I am writing a search engine whose purpose it is to search all kind of blogs for specific kinds of content.I'm particularly focusing on these blogs engines:
Blogger LiveJournal MySpace Open Diary
[code]....
Is there any way I can use google to find links that are from a specific type of engine, like for example wordpress?
We are trying to identify the best archtecture while using a ORM like LINQ to SQL. The archture we are defining is for sort of framework that other applications will access either trough directly referencing the DLL or through a webservice. We have .NET apps and PHP apps.The possibilities are: Multiple data contexts: Separting the database into units of work and create separate contexts for each one.
Pros:
Easy of use Classes will be broken into different namespaces Smaller domain to maintain
Cons:
Objects have to be duplicated if related, creating maintenance hell Objects cannot be passed between context, creating the need for another hit on the data base Single data context: All tables, views, procedures, reside in the same huge context.
I have a large string in which I need to replace specific strings with other values. For example, within this string I might see the following characters: [[sub id=5]]. I am trying to replace those substrings with values, pulled from a table and based on the id. What would be the simplest way to accomplish this. My first thought was to loop through and examine each character and note their positions when they match the pattern. I would then have to identify the id. That would be fairly complicated, however, and there must be a better way.
I'm retrieveing the current path with: Dim paths As String = HttpContext.Current.Request.FilePath Which returns something like /VHP/hmo.aspx. What I need to narrow down is the FOLDER (VHP). How do I remove the / before it and the /filename after it?