|
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)
|
|
|
|
|
|
The subject line you used IS useless. Everyone who comes here is looking for help, so putting "Help me!" in the subject line doesn't really make you stand out at all.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
PREMSONBABY wrote: please dont tell that it is not possible or useless
Where exactly did I say waht you are trying to do was "useless or impossible"?? I said your subject line was useless for the reason Dave K described. We also have an SQL / ADO.NET forum here which would have been a better place for this post.
PREMSONBABY wrote: if u dont know something
I know more than something sonny. I have dealt with this particular issue (db concurrency) many many times and I gave you one (of many) solution to the problem. Dave gave a second.
A simple thankyou would have been appreciated!
|
|
|
|
|
PREMSONBABY wrote: i want to know is there any changes in the sql table, in the database.
The only way to tell, and even this isn't perfect, is to load another dataset with the table your updating, then compare each record to what you have. Any differences will tell you that the data has changed. But, the data can change WHILE you're doing the compare.
If you're going to use a disconnected approach like this, you'll just have to deal with the fact that the "last write wins". The last client to write to the database overwrites any and all other changes.
Now, under SQL Server, there is what's called Notification Services. This allows your application to subscribe to certain events that occur in your database. SQL Server will then notify you when these events happen and your code can take appropriate action.
SQL Server Notification Services[^]
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
I don't have any public domain NS code I can share. But, there are TONS of examples in the documentation for it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi , i use from from Shockwave Flash Component in visual studio 2003 without any problem but in VS 2005 whene i want add Shockwave Flash Component to a form,VS2005 show a Error and say i should register "Shockwave Flash Component". please help me.
|
|
|
|
|
I've never heard of the problem. You might want to try reinstalling the Flash Player or see if there is any information on Adobe's support board.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|