|
You can put it in the 'run' key of the registry, in the 'startup' group of the start menu, or in the old, text config files that windows still uses.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
set objlistitem=lvwoutput.listitems.add(,Key & objresultset("salesid"),index1 &"",0,0)
this the syntax what we are using its fine but i want to add an extra key like
objresultset("patientName")
its possible
both this r going to refer another form to check the queries
pls help me its urgent
kankeyan
|
|
|
|
|
I don't really understand the problem. Is the problem that you need a key, but you want to store a string ? The best thing to do is to create a hash table that looks up the key, from the values you pass in ( making sure they will be unique )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi Kubben,
I am still facing the same problem of dot net fraqmework dependency.
Problem is when i click my setup file , it shows the message....that it requires the .net framework 2.0.5.727
But it is added into the deployment project.
|
|
|
|
|
The only thing you can add, is a dependecy, the framework is not included in your installer, only the requirement to download it, is. I find it easier to just ship a CD that comes with a C++ program that provides a splash screen, and installs the framework before running the MSI that installs my program.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
My program works like this:
I have two forms, one is main.vb, and the other options.vb
I have three picture boxes 'picMain', 'picA' and 'picB'
I have a button 'btnOK' in the main form which you click and the options.vb form shows
i.e.
btnclick event
Dim options as new form options()
options.showdialog(me)
So far so good...
I have a few radio buttons in options.vb, and when they are checked, the images in the picture boxes in main.vb changes. My Options form has two buttons 'OK' and 'Cancel'
I put the code in the btnOK_click event
IF options.dialogresult = windows.forms.dialogresult.OK Then
If radiobutton1.checked = true then
picMain.image = picA.image
End if
If radiobutton2.checked = true then
picMain.image = picB.image
End if
End if
Nothing seems to work, the images don't change, whether I put these codes in options.vb, or the click event of the 'OK button' or main form load event. Please help!! Am I suppose to put it elsewhere? Or nested IFs don't work in this case? Thank you!!
|
|
|
|
|
Your problem seems to be that you are not passing data between the two forms correctly. You need to use either global or public variables, or use that DialogResult correctly.
To use the dialogresult correctly you would put the code in the button that shows the options form. Like this:
If Options.ShowDialog() = Windows.Forms.DialogResult.OK Then<br />
If radiobutton1.checked = true then<br />
picMain.image = picA.image<br />
End if<br />
If radiobutton2.checked = true then<br />
picMain.image = picB.image<br />
End if<br />
End if
But this won't work if the picA and picB are on the options.vb form. If the picA and picB are on the OPtions.vb page you will need to use variables or something.
I hope this helps.
|
|
|
|
|
Hmm thanks for the prompt reply! Well, my pictureboxes picA and picB are on the main form, so I dont have to put options.picA or options.picB.. this is really mind boggling because all the codes seem right but yet so wrong! Hehe
|
|
|
|
|
But the radio buttons are on the options form. That means that after you've done your show dialog you can't reference the radiobutton values because the options form is gone. You need to pass the value of your radio buttons back to the main form when the ok button is clicked by a global/public variable.
|
|
|
|
|
marshmayllow wrote: I put the code in the btnOK_click event
IF options.dialogresult = windows.forms.dialogresult.OK Then
If radiobutton1.checked = true then
picMain.image = picA.image
End if
If radiobutton2.checked = true then
picMain.image = picB.image
End if
End If
If thise code is on the Options form, it won't work. Similarly, if it's on the Main form, it wont work for different reasons.
You OK button event handler on the Options form should normally do nothing but validate the information on the form. Since all you have is a couple of radio buttons, you really should even have an event handler for the OK button.
This could should go in the section where you created and displayed the Options form:
Dim optionsForm As New OptionsForm
If optionsForm.ShowDialog() = DialogResult.Ok Then
If optionsForm.radiobutton1.checked Then
picMain.image = picA.image
End if
If radiobutton2.checked = true then
picMain.image = picB.image
End if
End If
This is only a sample of what's wrong. Depending on your requirements for functionality, there are MANY more problems with this code.
|
|
|
|
|
Your first port of call should always be to set breakpoints and step through your code, to see exactly what is going wrong. Nested 'if's obviously always work, if coded correctly.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Ok I've tried using:
Dim frmOptions As New frmOptions
frmOptions.ShowDialog(Me)
If frmOptions.ShowDialog() = Windows.Forms.DialogResult.OK Then
If radiobutton1.checked = true then
picMain.image = picA.image
End if
..etc.
This however did not work too, and instead displayed the options form again after clicking 'ok' the first time
One thing i've realised is that the code works when I put it in the mainform_load event. It just doesnt work when I put the exact codes under the btnOptions_click event. Oh no.. this is getting really strange !
|
|
|
|
|
I create and populate a dataset based on a database based on a sqlquery (da.Fill(ds, "SomeTable")).
This works great to create the columns and populate the rows, but I was hoping to also inherit the column constraints.
My end goal is to create a XSD schema object. (ds.WriteXmlSchema(“newSchemaFile.XSD”). That includes column constrants.
Thanks in advance!
Kermit
|
|
|
|
|
Hi guys
I was trying to display the popup window in the article at http://www.codeproject.com/vb/net/popup.asp my problem is that the poup will not close until the mouse is clicked outside it but what I need is that the window closes when the mouse leaving the button.
Can anyone help me please
Regards
Saad
|
|
|
|
|
Post your code so we can review it.
______________________
stuff + cats = awesome
|
|
|
|
|
I am trying to write a simple procedure to update a record in a data base using the following:
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
If m_dtEmployees.Rows.Count <> 0 Then
m_dtEmployees.Rows(m_rowPosition)("Employee") = txtEmployeeName.Text
m_dtEmployees.Rows(m_rowPosition)("Password") = txtPassword.Text
m_daDataAdapter.Update(m_dtEmployees)
End If
End Sub
End Class
If I make a change to the txtEmployeeName textbox and hit save it works fine. If I make a change in the txtPassword text box I get a Syntax error in UPDATE statement error. I used the m_dtEmployees.Columns.Contains method to check to make sure it saw "Password" as a column and it does...
Any thoughts?
My goal in life is to be the kind of person my dog thinks I am.
|
|
|
|
|
By what you've posted I cant see anything that would be causing a problem.
When I get errors like this I always look at the SQL command that is being executed. (Either by examining the Update command in the Adapter or by doing a trace on SQL and seeing what exactly is being executed.
Try looking at that, and if you don't see anything wrong with the SQL, post it here and I'll check it out.
Good luck.
|
|
|
|
|
Have you tried EndEdit for the datarow just before the m_daDataAdapter.Update(m_dtEmployees)?
Alexei Rodriguez
|
|
|
|
|
I'd like to be able to configure this programmatically or with a script.
The two properies are: tiff output, and the folder where the tif will appear.
I had found on Google that printers can be setup via scripts. But I'm not familiar with the scripting language.
Thanks!
|
|
|
|
|
|
The question is how does one programmatically set the two properties (tiff output, and the default print folder).
|
|
|
|
|
From what I've been able to mess around with so far, it's not looking good. The only thing you cannot do is set the filename. It will always prompt you for the filepath.
|
|
|
|
|
Hey Dave,
I'm not trying to set the file name.
When my app starts, I just want to select the output as a Tif, and I want to set the path to the current users data folder (rather then MyDocuments).
|
|
|
|
|
I wonder if anyone could help me. I have the following function I took from VB6 and entered it into VB.Net 2005. When I try and compile it, I get lines under Scripting.FileSystemObject & Scripting.Folder. I know you have to use Imports but what one do I use. This function is in a module. If anyone has a different way to do a files in folder count let me know.
Public Function FileCount(ByVal DirectoryName As String) As Long
'E.g. MsgBox FileCount("C:\windows")'
Dim objFS As New Scripting.FileSystemObject
Dim objFolder As Scripting.Folder
If objFS.FolderExists(DirectoryName) Then
Set objFolder = objFS.GetFolder(DirectoryName)
FileCount = objFolder.Files.Count
End If '
Set objFolder = Nothing
Set objFS = Nothing
End Function
|
|
|
|
|
This MIGHT help:
The FSO model is contained in the Scripting type library, which is located in the file Scrrun.dll. If you don't already have a reference to it, you can create one.
To create a reference to the Scripting type library (Scrrun.dll)
1. On the Project menu, click Add Reference, and then click the COM tab.
2. Choose Microsoft Scripting Runtime from the Component Name list, and then click Select.
You can now use the Object Browser to view the FSO model's objects, collections, properties, methods, events, and constants.
My goal in life is to be the kind of person my dog thinks I am.
|
|
|
|