|
The problem is I don't have code. I just used something I used in the previous project to read a text file. If you can kindly point me into the right direction I woudl really appreciate that.
Thank you,
|
|
|
|
|
alexfromto wrote: If you can kindly point me into the right direction I woudl really appreciate that.
I thought I'd done that ?
http://msdn2.microsoft.com/en-us/library/db5x7c0d.aspx[^] is a good starting point for the reading of text. Use the method that returns a string []. Each string is a line in your file. Iterate over these, and use the split method on each string, using the , as a delimiter, you'll get back a new string []. Each string is now a field.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
When I set the background image of a form whether it is opened already or not. It doesnt work. I have an MDI form with the option of changing backgrounds. When one of these is selected it uses an image from my.resources. The MDI background changes but the other forms backgrounds that are supposed to change do not. Not when these forms are opened and not when they are closed... HELP!!!!!!
(Sorry, Dave, I thought I had figured it out...)
|
|
|
|
|
Well, you probably want to add a property that stores the background image to use, and then uses that image right away if the form is open, or reads it when it is opened.
If it's not working when your form is open, then your code must be quite wrong. How are you accessing the other forms ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Believe it or not, I can not figure out how to reference the 'My' object in my VB.net 2005 smart client app. What do I need to import?
|
|
|
|
|
You shouldn't have to reference anything, Visual Studio should recognize it automatically (unless a reference is not properly set).
If it is not, you could try referencing it like so:
Imports ProjectName.My
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
That didn't work. What did you mean by a reference improperly set?
|
|
|
|
|
Well, you could try going into your Project's Properties and clicking on the References tab. There at the bottom you should see a list of all references set in your project. Make sure that the Microsoft.VisualBasic and ProjectName.My references are checked. This may be causing the problem. If that doesn't help, then Import the same references in the code also.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Thank you fo your reply.
Microsoft.VisualBasic is checked.
Project.My (CRM_SmartClient.My) is not found on the list.
Is there a My assembly I need to add from somewhere?
|
|
|
|
|
pa28140 wrote: Project.My (CRM_SmartClient.My) is not found on the list.
It's kind of hard to find. But it should be on there.
Do you need to use the My Statement? Because you can always use the System namespace (which does everything My does and a lot more).
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Hello,
VS 2005
I have program that on first run will run after installed will setup a server connection. The next times the program is run it will not execute this code to setup the server as it was done in the first run.
I can't use clickOnce IsFirstRun as the customer doesn't want that used for installation.
I am using MSI to create the setup. I right click setup | view | Registry. I create a key value, example "HKEY_CURRENT_USER\Software\Reality", "App", "Installed"
I set the property AlwaysCreate = false, and DeleteAtUninstall = true.
My big question I don't want to create the key value when the application is first installed. Only delete it when uninstalled.
My code for checking for the key value:
<br />
If (My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\Reality", "App", Nothing) <> "Installed") Then<br />
'The program is running for the first time so create key value My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\RealitySolutions", "CodeRed", "Installed")<br />
'Setup server for the fist time<br />
<br />
Else<br />
'The key exists so no need to setup the server<br />
'Do something else<br />
End If<br />
The key value deletes on the uninstalled - which is what i want it to do. However, it always creates the key value when installed. i don't want it to do this. It should only create the key value in the code.
Can any tell me, when setting up the registry in the setup project, is there a way to stop it from creating the key value when the program is installed.
I thought by setting the AllwaysCreate property to false would stop this.
many thanks for your ideas,
Steve
|
|
|
|
|
The Data Grid (at class level):
Protected WithEvents dgProducts As System.Web.UI.WebControls.DataGrid
Setting up the event handler (in a method called from Form_Load):
AddHandler dgProducts.ItemDataBound, AddressOf dgProducts_ItemDataBound
The event handler:
Private Sub dgProducts_ItemDataBound(ByVal sender As System.Object, ByVal e As DataGridItemEventArgs)
dgItemDataBound(sender, e, dgProducts, "ddl_4")
End Sub
The problem (VB.Net, ASP.Net v1.1):
A breakpoint set on the single line of this event handler is never hit even though this DataGrid does contain a DataBound column that does display data.
-- modified at 12:12 Wednesday 20th December, 2006
Eric
|
|
|
|
|
I have an MDI application with the option of changing the background. Some of the child forms open maximized and I want them to have the same background as the MDI parent. This is what I have:
If frmMainMDI.BackgroundImage = My.Resources.TurquoiseBack Then
Form.ActiveForm.ActiveMdiChild.BackgroundImage = My.Resources.TurquoiseBack
And so on and so on for each background the user can choose from.... This code is in a setbackground() sub in a global module. Each time one of these maximized child forms open I run the Setbackground sub.
on the " frmMainMDI.BackgroundImage = My.Resources.TurquoiseBack " I get a squiggly and it says that operator " = " is not defined for system.drawing.image and system.drawing.bitmap.
The wierd thing is that if I type this same thing in after my "then" of the if statement I do not get the squiggly... This is kind of hard to explain because there is alot more to the way I am trying to accomplish this but this is just the part that is confusing me. Please, anyone that knows why I am getting this, please help me. Thank you!!!
|
|
|
|
|
Joey Picerno wrote: on the " frmMainMDI.BackgroundImage = My.Resources.TurquoiseBack " I get a squiggly and it says that operator " = " is not defined for system.drawing.image and system.drawing.bitmap.
It says this because you're trying to compare an Image object to an Image object, which you can't do.
Why are you checking to see if the Background image is equal to something? If the rest of your explanation is any indicator, you shouldn't even have to check this. Your SetBackground code should just set the BackgroundImage and BackColor of all your forms without regard to what they currently are.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
when the user selects a new background (from images in my.resources) the MDI parent background changes. When they open say the Employee form (a child form that when opened stays maximized) I want that forms background image to change to the same one as the MDI parent's. The code I am working with is in a seperate module from these forms. thank you for your assistance with this.
|
|
|
|
|
Nevermind, I got it. Your explanation helped me out. I was trying to go to complex. I wasnt thinking simple enough... I always do that!!!!! Anyway, thank you for the help. Im sure I will be back soon, needing more. Have a good one!!!
-Joey
|
|
|
|
|
i have an ocr coded in matlap how could i add it to my project in vb.net
SUMA
|
|
|
|
|
i want to upload pictures in database how can i make this??
|
|
|
|
|
I can tell you didn't do any Googling yourself first considering the last time I checked, Google had about 700,000 hits on the subject. Let me help, click here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am creating an RCON program for Call of Duty:United Offensive clan that I'm in. Here are my text boxes, txtNumberOfPlayers, txtPlayersOnLine, txtCurrentRunningMap, and txtCurrentMapRotation. My Strings are the same W/O the txt. Do I have to make individual requests to the server for each text box or will I have to sort the info that is retrieved from the server. I am using the UDPClient in winsck ctrl and how would I set this up in the UDPClient_DataArrival Sub. This is the first time for doing something like this and all help will be deeply appreciated.
|
|
|
|
|
OilcanHarry wrote: Do I have to make individual requests to the server for each text box or will I have to sort the info that is retrieved from the server.
That depends on the requirements of the server. Sorry, we can't help you there. You'll have to get a hold of whoever wrote Call Of Duty and see what the requirements of the server's API are.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
"This program has performed an illegal operation and will be shut down"
This error comes in my program when i close a window in which i used a rich text box and display an rtf file.
Please give me an idea to avoid this error.
Thanks.
|
|
|
|
|
We'll need to know a lot more about your app before we can suggest anything. What else did you code do? Are you sure you're freeing all of your unmanaged resources? Are you doing any custom drawing of an graphics or controls? ... ... ...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
There is no built-in way to handle concurrency issues - you must do a number of things for example:
1) Add a timestamp column to each database table
2) When loading a row update/get the timestamp
3) when saving a row compare client-side timestamp with current database timestamp
4) If they differ reject the update (or take appropriate action)
|
|
|
|