Answer Questions
Andrea Lattuada Creating Muli Lingual Applications
vb.net 2003 I currently maintain two versions of my application. One is in Spanish and the other is English. I am getting ready to add Portuguese. My application has context menus' and error messages, and button names which need to be in a specific language for a particular build. Can I have one project where my menus', text messages, and button names can be toggled between the three languages. I would like to have one project in which I can easily build applications for my three languages. Thanks, There is a standard "pattern" for doing what you want in .NET - it's called "satellite assemblies." The basic principle is that you load your UI strings from an external assembly based on the current loca ...Show All
PiaMaria Invalid Database File Header
I have an application which runs fine on the design station, but when installed on a non-design station Throughs this exception when attempting to open the SQL Database: The header for file 'C:\Documents and Settings\Administrator\PLDaq.mdf' is not a valid database file header. The PageAudit property is incorect. Cannot open database requested by the login. The login failed. Login failed for user File activation failure. The physical file name may be incorrect. I have insurred that the file name inside the connection string matches the physical file name, and I am using the logical file name and not the physical file name in the connection string, the data file is in the same directory on both machines. I have no idea wha ...Show All
Fata1Attack Automatic Namespace generation in VB
I've just finished a dll written in VB. I've never bothered with namespaces much until now, but this is a bit complex, so I've arranged it into sub-folders, with a top-level class, a few sub-classes (and base classes), and other classes that hang off some of the sub-classes. Every class has the same "Namespace Handler" around it. Looks garbage in the object viewer - every class is under the root namespace. When using the object however, it looks fine, i.e. you only see the correct sub-sub-classes hanging off the correct sub-classes, etc. However, one of my colleagues who talks C# had a look at my code, and commented that my namespaces were not declared properly, then we discovered that when coding in C#, the namespace line wer ...Show All
Aaron Sulwer Adding columns to DataGrid
Hello All, I am trying to add columns to the DataGrid and ultimately my database from the Button_Click event and am at wits end. I tried the code from the msdn library to start with and got the squigglies from DATATABLE in their code.After playing with the code for a little while and got rid af the squigglies and ran it , I got the error message : Object reference not set to an instance of an object. I have also tried code from my books and have had no luck.This is the last block that I have tried: Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim mytable As DataSet1.HammersDataTable Dim myColumn As DataColumn myColumn = New DataColum ...Show All
TobsTec Need help with collision and...
Need help with collision and optimizing the space of an shape when filling it with a bunch of smaller shapes. I got a shape that loos like this and I need to fill that with as many smaller rectangled shapes that I possibly can. So what I first need to do is figure out how to make it check so that the objects are not colliding with eachother or that they are outside the main shape. Then I need to figure out how to maximize the placement so I don't get a lot of blank space. So it might have to flip the rectangled shapes 90 degrees etc. So... my question is.. how do I detect the collision I guess that could be solved like people do with game collision And my second question is for the auto optimizing.. anyone got a clue where to start thinki ...Show All
Arvind Robin Kumar Removing an Error Provider
I have the following code for validating the content of a text box: If String.IsNullOrEmpty(sender.text) Then sender.Text = "" sender.focus() err.SetError(sender, "You must enter a value for this textbox") err.BlinkStyle = ErrorBlinkStyle.AlwaysBlink Else err.Dispose() End If When the user goes back enters valid text into the textbox and leaves the textbox, the ErrorProvider Icon is still visible adjacent to the textbox. My question is how do you remove the ErrorProvider Icon after the error has been cleared. err.SetError(sender, "") HTH ...Show All
Mable Workbooks.open
Hello all, I have tried numerous ways to modify the responses to "Openening an Excel file from within project" to open an existing Excel workbook and also select and activate a minimized workbook but have totally struck out, Can anyone give me some guidance Also, where should I be looking for samples that answer such basic questions Thanks very much. Noel Rietman Imports Excel = Microsoft . Office . Interop . Excel Dim XL As Excel . Application 'Set to new instance of excel XL = New Excel . Application XL . Visible = True XL . WindowState = Excel . XlWindowState . xlMaximized 'Create(New WrokBook) Dim wkbk As Excel . Workbook = XL . Workbooks . ...Show All
Jeff Walsh How to schedule a Windows service
Hi, I am developing a windows service. I need to schedule it, so it executes daily at a specified time. Any help is appreciated.. Thanks.. A windows service either runs or it doesn't. Are you sure you need a service If you only need an application to run at a particular time you could use the built in windows scheduler. If you do indeed have a service, then you can simply have a slow timer which checks the current time, and when it meets your time criteria perform your function. ...Show All
Courtney Goodin Code to Convert numbers to time
I hope I am in the correct forum it is my first posting I have a database which has three fields for Hours Minutes and seconds these are just numbers and have no relation to time. I need in a report,code that will convert the numbers to time and add the seconds to minutes and add the minutes to hours. Thanks Bartley What are you using to create the report. Crystal or something else... Are your values coming from a SQL Database or are they just variables in your application. How is the code entered into the report Thanks Bartley Brendan: I have been looking for you for about 15 years without success. Please reply. John P. Sanger It looks lik ...Show All
blackpuppy Passing variables between forms
My program has several forms in it. There is a form that has some buttons and when i click each button i want text to generate from that button to a textbox on another form. If you know anything about this i would appreciate it. Thanks!! take a look at this and you can modify it easily to set the values of a textbox on this other form when "passing" variables http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=760400&SiteID=1 so on your second form you can make a public property: public property SomeText() as String get return Me. theTextBox.Text end get set (ByVal value as String) Me. theTextBox.Text = value end set end property then on you ...Show All
Pat1111 radio button help
hi folks can you help me please.... I have a radio button on my form which plays a tune when clicked my.computer.audio.play ("c:\windows\media\song1.wav", _ radio button.text= song1........ this button can play any song...if the song is renamed song1..... but what I want to do is let the user change the radio button .text to the name of the choosen song...and save it..... so that when the form loads the radio button displays the name of the song instead of song1.... ps....I am stupid so I may need some code thank you so much cheyenne The following should allow you to modify the radio button songs, by selecting one - clicking on the button and selecting a file. The are then sa ...Show All
Greg Beech Crystal Report And Similar Tool For Printing Document
May i know is there any tutorial on Crystal Report, i want to retrieve some data from database, format it and print it out. Apart from Crystal Report, what other tools is suitable for this Thank you. I have already solved the previous problem. I am really a beginner to crystal report and have no idea on its working principle, is there anyone can provide some information or web tutorial which can guide me from the ground I need to know the basic like how to bound the data to the report and display it properly, how to format the report and do the query to display particular data in the report. Thank you. I have already set the datasource for the crystal report but i dont k ...Show All
Dipi Hiiii I Need To Send A Picture
Hi Every One I need to send a picture via my email application in the MailMessage Body not in attachment if there is any way possiable to do it please share it with us Please Can You tell me how to embed the picture into html thanks I've already shown you :-) Look at the last couple of lines in the code snippet/last sentence Sorry, I don't quite follow - are you wanting to attach a file in the MailMessage From what I understand you do not want this However if you are wanting to attach the file in the MailMessage object then there are a few examples on these forums also. I hope this helps: Dim theMailMessage as new MailMessage(" address@from.com ", " address@to.com ") theMailMessage.Attachments. ...Show All
Can-Ann How to load a dll into a vb program
Hi, I need help, i'm a n00b and i don't know how to load a dll into my program. Using the Add Reference button i'll recive this error: A refence to ... could not be added this is not a valid assembly or COM component. Bla bla bla Someone tell me to install it into the gac directory using gacutils, so i did it but i had recive this error: Failure adding assembly to the cache: Tentativo di caricare un programma con un formato non corretto. (trying to load a program with an unknow format). What's the problem Help me pls ;) I hope this is the right section. Sorry for my bad english You are right, So how i can do it Thank you You have to create declare statements that map ...Show All
wijay_da Object reference not set to an instance of an object.
Hi, I wrote a function and when i'm calling it i keep getting this error. Null reference exception was unhandled. Object reference not set to an instance of an object. Here is the code: -------------------------------------- Function myReplace( ByVal mytxtCtrl As TextBox) As String If Not IsNothing(mytxtCtrl) Then Dim vartxt As String = Replace(mytxtCtrl.Text, "%" , "" ) myReplace = Replace(vartxt, "£" , "" ) Return myReplace Else MsgBox(mytxtCtrl.Name) mytxtCtrl.Text = "" Dim vartxt As String = Replace(mytxtCtrl.Text, "%" , "" ) myReplace = Replace(vartxt, "£" , "" ) ...Show All
