Answer Questions
Agent_ MsgBox always return "no" regardless of what the user click
I am using VS2005 and have a messagebox inside of an event that does not work properly. The code is below: If Microsoft.VisualBasic.MsgBox( "Do you want to save your changes" , MsgBoxStyle.YesNo) = MsgBoxResult.No Then Exit Sub End If The problem is regardless of whether the user clicks Yes or No, it always returns No. If I add another MsgBox in the code immediately before the if statement, then the if statement will always work properly. (see code below) Microsoft.VisualBasic.MsgBox( "Dummy MsgBox" ) If Microsoft.VisualBasic.MsgBox( "Do you want to save your changes" , MsgBoxStyle.YesNo) = MsgBoxResult.No Then Exit Sub End If I can't figure out what is wrong h ...Show All
Chintan Jhaveri quotes inside of a string variable
how can I add qoutation marks inside a string for example dim text as string text = "I would like to qoute the next word "like" this" is this possible how do I go about doing it sorry for the double post... MSDN Forums acted up on me there for a minute. try: text = "I would like to quote the next word " & chr(34) & "like" & chr(34) & " this." the chr(34) is the double quote, i had problems with the "" jazz sure, just place double quotes! text = "I would like to quote the next word ""like"" this" does this work ...Show All
None01 Executing System Stored Procedure in Windows Forms App
I'm new (very new) to stored procedures and I'm having difficutly executing the sp_addumpdevice system stored procedure to backup a database. I've put the following code in a button click event handler: Private Sub btnDBBackup_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDBBackup.Click USE master EXEC sp_addumpdevice 'disk', 'FIRM_Backup', 'C:\MSSQL\BACKUP\FIRM.Bak' End Sub The problem I'm having is Intellisense is telling me that "name 'USE' is not declared" and "name 'EXEC' is not declared." Can anyone assist a stored procedure novice with getting this working Thanks in advance for any assistance! Tony ok, i looked at the stored p ...Show All
magcianaux Copying files over a network - best way?
Okay, here goes... Machine A and Machine B are on the same LAN. There's a file, or more a series of files, in different formats on Machine A. On Machine B there is a Card Reader or USB type storage area. On Machine B, there is a .NET Application, not sure yet if it's going to be a smart or thin client. The job of the .NET App is to copy a file from Machine A to Machine B. Also, it would be nice if it showed a progress bar of the file coming across. I'm relatively new to .NET - any tips or ideas on the best way to go about doing something like this Mods - not sure if this is the correct area to post this thread in - please move if necessary Thanks again for the help Richard Ok I need ...Show All
johnvarney IDE not responding to keyboard
Hi Folks; Infrequently my code editor in the IDE quits responding to keyboard entries. This seems to happen after building a project more than a couple of times without running. What's happenning is I will attempt to make a code entry, but after the first character entered -- type of character doesn't seem to matter -- Intellesense will add a parenthisis and add its interpretation of what should follow. Then, if I try to backspace out of the parenthisis, the cursor simply jumps forward and reapplies the characters it wants. Doesn't seem to matter if I mouse over and cut or delete the characters; any attempt to make an entry results in this behavior. I cannot add any code on the form when this is occuring, and requires that I compl ...Show All
Xzarian OPEN NEW WINDOW WITHIN WEBBROWSER1 AND NOT LOOSE THE SESSION
I have this code whre I want to open a new window within browser1 of my form8 Instead I loose control of the browser and by loosing my session Private Sub WebBrowser1_NewWindow( ByVal sender As Object , ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow e.Cancel = True Form8.Show() 'Form8.WebBrowser1.Name = what goes here I am not sure what to do here 'Here I am forcing the opening of this specific website/I want to open whatever url is clicked Form8.WebBrowser1.Navigate( http://www.accountingonline.us/invoice/index.php page=open ) ' Form8.WebBrowser1.Navigate(sender) this did not work End Sub No worries thanks for efforts. Maybe that way is too ...Show All
Gravy Listbox - SelectedIndexChanged Question
hello. A question please. When I fill the datasource property of my listbox, that executes the code of the selectedindexchanged event automatically. is there a way to avoid that in the begining (I mean when I load the datasource property of the list). Thanks... Or simply using a variable on the form which you can set and in the SelectedIndexChanged event the first thing you do is look at the variable and if its set to a certain value exit the sub otherwise do you processing - so the event is still firing but you are just choosing to do nothing until you want to process it. This is often done like this for stuff processed in the initial establishing of data on the form. So during the form load even ...Show All
MingZhao Login via Access Database help
Hi, I recently got VB 2005 and really like the new features. However, I am on an intermediate level learning Visual Basic. For a test project, I plan to create a login form that validates users through an access database located on a server. Basically, there is a set username and password in the access database and I want my program to execute the main program once the user is validated via the database. I was struggling on this for about a week, but I have no idea on how to do it. I can arrange the controls on my form, but I just need to know how to validate the users. Any ideas you need to strong name/type your assembly if you are running the app over the network. Take a look at this: ht ...Show All
cdun2 datetime manipulation
Hi there! I’m a newcomer, so I’m not sure this is the correct thread...sorry if it’s not... I have the following problem: I need to show in a windows Form the conversion from a normal dd/mm/yyyy shown in a date time picker to two textboxes (and viceversa). The first containing the day of the year (from 1 to 366) and the second the year itself (this oe is easy!). For example: txtdayofyear.text = "360", txtyear.text="2006" ->> Datetimecontrol.value="26/12/2006" My problem grows as i need to convert from one format to another in both senses, depending of what button the user presses. I have found a Date "dayofyear" funvtion, which gives me the partial solution, but I still don’t ...Show All
Steve Whitley send email via outlook
When attempting to send a email from my application via outlook with the following code. I am always prompted to supply a username and password for the account, even thought the dialog box has them in and i have checked save password. is there any way off coding this not to happen Imports Microsoft.VisualBasic Imports System.net.Mail Imports Microsoft.Office.Interop Public Shared Sub EmailwithOutlook() Dim oOApp As Outlook.Application Dim oOMail As Outlook.MailItem oOApp = CreateObject( "Outlook.Application" ) oOMail = oOApp.CreateItem(Outlook.OlItemType.olMailItem) With oOMail .To = "username@hotmail.com" .Subject = "email subject " & Date .No ...Show All
chris441962 How to get a Combo Box to feed from another Combo Box
Hope someone can help me!! I have a form with two combo boxes. One displays different Areas(e.g. Area1, Area2, Area3) and the other one displays different Regions(e.g. Region1, Region2, Region3). What I want to do is to populate the Region Combo Box depending on the Area selected in the Area Combo Box. For Example if the user selects Area1 have the Region Combo Box filter/display on those Regions that belong to Area1. I relly appreciate any feedback. Thanks alot!!! Well thats fine, you can call the method from anywhere within your application/class. The method will get whatever text is selected in comboBox1 and pass that to the PopulateCities method for it to add to the specified co ...Show All
psmithphil SQL 2005 and MS Visual Studio 2003
After I looked the 'RELATED QUESIONS' my questions were answered. My question was "Can MS Visual Studio 2003 and SQL Server 2005 Express Edition be used together " No they can't be used. Since I just started to learn Visual Studio 2003 and updating from VB 6, I find myself having to stick with this verison of VS. Now my question is there a cd I can get MSDE 2000 I call MS and talk to may people and they seem to think there is no way to get this product. I down loaded MSDE 2000; but, all the other programs that look like should come with this mgr, etc. could not be found on the down loads. Any help would be appreciated. THANKS Ray Thanks for all the information you have sent me. It look like ...Show All
Solitaire Problem Converting VB6 to .NET
Hi, i used the Visual Studio Upgrade Wizard to convert my existing VB6 code to .NET but still lots of "upgrade warning" appeared after the convertion. especially during the convertiong of Array to Object . These are part of my codes, may i know how should i modify it Thanx for all the help. i've tried those method above, yet , there are still some upgrade warning prompting out. to be more easier to u all , im putting my Vb.proj here so that u all can have a better view of it. its just a simple project , little coding and easy to be understood. hope it helps, im going crazy coz of those error.... Download the VB6 code here Download the converted .NET code here I haven't tested this, but try ...Show All
Suby786 How to view a web page
I want to do the simplest thing, just call a regular web browser from VB Express to view a page on the web. NOT embed it in the application, not write a web browser, not control a web browser - lots of info on those, but I just can't find anything in help or online to just open up a web browser outside the application and display a page from the web. In summary, I want to : -A button is clicked in my VB app -A web browser (IE, whatever) opens up as a separate application and displays the web page for the URL I have specified. -Thats it This must be sooo easy - but can I find how to do it anywhere!!!! ('view web page', 'call web page', 'view html', 'call html', 'call web browser' etc etc....Arghhhhh) Thanks ...Show All
gumtoo Generics, Collections, and Inheritance...
I have an inheritance model as follows: Public MustInherit Class ProviderBase End Class "So, you are saying you should consider a collection as a type". Yes, List Of SomeType is in fact another type, a new type, that has nothing to do with SomeType. It's List that can contain items of type SomeType or any other types that inherit from SomeType. "What is the purpose of Generics then " Hmm... writing "generic" code List Of SomeType is one of the most common and useful things that Generics enable. Let's say we have 2 classes A and B. Let's also assume that there is no inheritance relation between them to keep things simple. Now let's suppose we need lists that can contain items of type ...Show All
