|
Hello,
have you tried to give the full path?
Regards: Didi
|
|
|
|
|
Hello,
yes i have!
I found the problem!!
i forgot to copy a dependent dll into the output directory!!
|
|
|
|
|
How to create Dynamically DataSource property to Propertygrid in vb.net windows
|
|
|
|
|
PropertyGrid does not have a datasource property!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello every one.
I have a Vb 2005 express application and i am using partial classes. The application works fine. I had a observation that in the solution explorer the partial class is shown as a new form and there is no designer and resx file.
When i double click the partial class file it shows a blank form.
What i was assuming that it should come under the class for which i have declared it as partial class and not as a independent form
Diagrammatically what the solution explorer has
+ -- frmMain.vb<br />
. |-- frmMain.Designer.vb<br />
. |-- frmMain.resx<br />
---- frmMainPartial.vb
What i was expecting was
+ -- frmMain.vb<br />
. |-- frmMain.Designer.vb<br />
. |-- frmMain.resx<br />
. |-- frmMainPartial.vb
I am concern that had i implemented the partial class the right way and the solution explorer is showing the right thing or i am wrong at some place
Regards
Nishkarsh
|
|
|
|
|
The solution-explorer doesn't group the files by the namespace or classes that are declared therein. The grouping can't be changed from the IDE as far as I know, but you can edit the Project file manually (or create a cool tool to do so). Here are the steps to get the Solution Explorer to display it your way;
* Locate the projectfile (*.vbproj) and open in using notepad.
* Find the line that links the file with the partial class to the project. It probably called "frmMainPartial";
<Compile Include="frmMainPartial.vb" /> * Now change it so it looks similar to the entry for the resource-file. It should become something like this;
<Compile Include="Class1.vb">
<DependentUpon>Form1.vb</DependentUpon>
</Compile> Or, using your formnames;
<Compile Include="frmMainPartial.vb">
<DependentUpon>frmMain.vb</DependentUpon>
</Compile> Enjoy
I are troll
|
|
|
|
|
I've already made a program to use 360 controller like a mouse with XNA, but what I am wondering is, how can I play sound via the headset if its connected? ( I know XNA is a c# thing but it works fine in vb)
Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php
|
|
|
|
|
Headset audio is not supported by the XNA Framework yet.
|
|
|
|
|
I have a program that allows me to track incoming leads. The database stores all the info on my computer. I am using the free version of SQL that comes with Visual Studio. If I wanted to give my program to other users and allowing them to work on the existing database on my computer is this possible? Or is it possible for me to change the program or database to allow it to be stored on a server for 2-3 people to manipulate? If so do you have suggestions on where to start in order to understand how to setup the program correctly for this?
|
|
|
|
|
You would have to expose the database over the web, a webservice is the best way to do that. Unless the users are on your network, then just a net work connection string is needed.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Perfect, users are on my network. Obviously I dont expect you to explain the entire process of how to input the connection string and get my program to find the db, can you point me towards a good place to look and learn? Or I guess if you did want to give a little more detail that would help too.
|
|
|
|
|
I am assuming this is the line of code in the app.config file that I need to edit somehow?
<add name="HSOA_HV.My.MySettings.HVConnectionString" connectionString="Data Source=|DataDirectory|\HV.sdf"
providerName="Microsoft.SqlServerCe.Client.3.5" />
|
|
|
|
|
Yes, just change /DataDirectiry|\HV.sdf to be a network path to the file, such as //SMJnr/DataDirectory/etc. Then make sure the file is visible on the network.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Is there anything additional I need to change for instalation purposes, or does switching that line of code handle those issues itself?
|
|
|
|
|
Sorry, forgot to thank you for your help! Very much appreciated that you take time to help people that have limited knowledge, I appreciate it.
|
|
|
|
|
Thanks in advance
modified 28-Nov-12 8:10am.
|
|
|
|
|
You may want to check out the following tool ...
Beyond Compare
http://www.scootersoftware.com/index.php[^]
You could script the tool to generate a difference report by setting the correct command line switches.
Awesome tool.
|
|
|
|
|
Thanks for link, will checkout.
Is it possible to view the coding of the tool and change according to our requirement?
|
|
|
|
|
Vijay
This is your algorithm reduced to the essentials.
Open OutputFile 'Using sw As StreamWriter
Open InputFile 'Using sa As StreamReader
Copy InputFile to CpyFile 'i.e. to Similar1.txt
Read InputFile into temp '1st header
Set up p() array from temp
Read InputFile into temp '2nd header
While not at end of InputFile
Read InputFile into temp 'Data line
Split temp 'Into name, child, etc
Open CpyFile 'Using sa1 As StreamReader
Read CpyFile into temp1 '1st header
Set up p() array from temp 'Why? This has already been done
Split temp1 'Into name1, child1, etc
Write Name1, child1, etc to OutFile '1st header. Why not just write temp1 without splitting?
Read and Write from CpyFile '2nd header
While not at end of CpyFile
Read CpyFile into temp1 'Data line
If (temp matches temp1) and created < created1 Then
Write temp1 to OutFile
Else
Write temp to OutFile
End If
End While 'not EOF CpyFile
Close CpyFile 'End Using
End While 'not EOF InputFile
Close InputFile 'End Using
Close OutPutFile 'End Using
There are some obvious problems - design not coding.
1. You write the header out each time you open the copy file. It should only be done once when you open the input file.
2. For each data line read from the copy file you write a line to the output file. Think about what happens when you read the first data line in both input and copy files. You cannot decide what to write until you have scanned all of the copy file for a match.
3. The scan of the copy file should begin at the next record after the one read from the input file. E.g. if you read the 10th data line from input file, the scan of copy file should start at 11th data line.
4. You have to open and close the copy file once for each data line in the input file. I don't know how many lines you will have in input file but that could be a lot of I/O.
5. The IF statement will be done once for each data line in copy file. But it's enclosing While loop will be done once for each data line in the input file. So if there are N data lines, it will be done N^2 times. For 10 data lines, that's 100 times; for 100 data lines that's 10,000 times. Performance for small test files might be ok, but large production files could be a problem.
I've not suggested solutions because I think this approach is not the right one. As I said before the solution lies in reading the input file into a list (or an array) and processing that.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Thanks for the reply.
Is there a possible way to handle the if statement?
im not sure where to write the if statement, inside the while loop of the 2nd file or outside the while loop of the 2nd file??
|
|
|
|
|
Moving the IF statement won't achieve a lot. There's a lot more needed to fix the logic than that.
If you post your email address (not usually recommended) I can send you a possible solution - it's a bit big to post here.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
|
When you finish scanning the copy file you always need to output a line.
I still think there's a problem not showing up in your test data.
Suppose I have a file where the 5th and 10th lines match with the 10th having a later date. When the 5th line of the input is being processed, it will match the 10th line in the copy and the 10th line will be output. What happens when the 10th line of the input file is being processed? How do you know it's already been written out?
You seem to have introduced a new requirement. Namely, always write out lines that begin with '01' even when there are matching ones.
Try this as a test. Copy first 5 lines of above input, paste them into the file, somewhere in middle of file will do, and change the dates of the pasted lines to e.g. 27/04/2009. Do you get correct output?
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Reply for the first paragraph.
What u say is true, few lines may be written More than once.
For that case,Im writting code currently to remove similar lines.
Reply for the second paragraph:
I will not have this condition, because in my previous function before doing the parent-child, i have counted the similar lines and written as quantity field.
so there is no chance of parent starting with "01" to be repeated with diffeent dates.
|
|
|
|
|
It struck me that one way of thinking about this is that, having read an input line, if a match is found with a later date you just need to ignore the input line (the later dated one will be picked up in it's turn); otherwise you can write out the input line. This will do that.
Using sw As StreamWriter = New StreamWriter(oFile, False, System.Text.Encoding.Default)
Using sa As StreamReader = New StreamReader(iFile, System.Text.Encoding.Default)
File.Copy(iFile, "c:\DB\Output1\Similar1.txt", True)
temp = sa.ReadLine()
....
sw.WriteLine(sa.ReadLine())
While sa.Peek() >= 0
temp = sa.ReadLine()
....
If Trim(name).Substring(0, 2) = "01" Then
sw.WriteLine(name & child & desF & desAF & desA & desAA & ecn & dnf & baloon & dateTime & qty)
Else
Dim foundLaterMatch As Boolean = False
Using sa1 As StreamReader = New StreamReader("c:\DB\Output1\Similar1.txt", System.Text.Encoding.Default)
sa1.ReadLine()
sa1.ReadLine()
While (sa1.Peek() >= 0 ) AndAlso (Not foundLaterMatch)
temp1 = sa1.ReadLine()
.....
If name = name1 And child = child1 And dnf = dnf1 And baloon = baloon1 And result < 0 Then
foundLaterMatch = True
End If
End While
End Using
If Not foundLaterMatch Then
sw.WriteLine(currentLine)
End If
End If
End While
End Using
End Using
I've missed out lines that set name etc. and also dropped currentLine.
BTW Did you know that if you change each And in If name = name1 ... to AndAlso it will be slightly more efficient?
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|