 |
|
 |
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
|
 |
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
|
 |
Is it possible to run a Photoshop action with VB.NET. If so can any one tell me the way.
|
|
|
|
 |
|
 |
what is "Photoshop action"? are you after launching photoshop from your application? if so I would look at ProcessStartInfo
If I have it all wrong please expand your question
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
 |
|
 |
I just want to run a action installed in Photoshop. First my app will start Photoshop. I can do it. Then it should run given action installed in Photoshop. That is the problem
|
|
|
|
 |
|
 |
How can I pass the value from pop up menu to column gridview?
In my gridview I have a link button which will open another page which has a gridview also.
After I click an item to the pop up menu gridview, the data selected should copy to
the parent page inside column gridview.
note: this gridview is a third party which is obout.
To make it clear, please see the attached image.
http://i44.tinypic.com/4socgk.jpg[^]
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
 |
|
 |
whenever my program used by multiple computer, i have to change the connection string to the destination computer IP (database there) and build again the project,
i wonder if visual basic support reading connection string from .txt?
can somebody gimme the illustration?
i think it's easier this way.
|
|
|
|
 |
|
 |
There are many ways to get a dynamic connection string, one of them is supported directly by .NET through the application config, which has a connection string section, and even a way to encrypt that part. Start Googling! I'm pretty sure you even will find articles here on CodeProject that illustrate it all.
|
|
|
|
 |
|
 |
i found it, check this out :
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim FileName As String = Application.StartupPath + "\Config\conString.txt"
Dim TextLine As String = String.Empty
If System.IO.File.Exists(FileName) = True Then
Dim ObjectReader As New System.IO.StreamReader(FileName)
Do While ObjectReader.Peek() <> -1
TextLine = TextLine & ObjectReader.ReadLine()
Loop
Else
MessageBox.Show("Connection String not found " + vbNewLine + vbNewLine + FileName, "Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1)
End If
End Sub
working perfectly, thankyou..
|
|
|
|
 |
|
 |
you're welcome.
However:
1. That wasn't what I suggested, through the official app config file.
2. You could read all content of a text file without using streams, just a single Dim Text As String = File.ReadAllText(Path)
|
|
|
|
 |
|
 |
Have a read of this Connection Strings and Configuration Files (ADO.NET)[^]
This is what Luc was pointing you towards
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
 |
|
 |
did SQL Server need ADO.NET?
|
|
|
|
 |
|
 |
When programming for the .NET framework, ADO.NET is the normal way to interact with an SQL Server database.
|
|
|
|
 |
|
 |
Sending SMS using .NET[^]
I used this code to send SMS by an application. it's need to pass com port as a parameter. But my PC doesn't have com ports. it only have USB ports only. So how do i find the com port which attached my phone. (Here i use a mobile phone instead of a GSM Modem)
|
|
|
|
 |
|
 |
One can buy USB-to-serial convertors e.g. here[^]. They tend to add a serial port to your system, hardly distinguishable from motherboard ports (very fast toggling of the control lines may be a problem, but they are fine for normal use).
They normally come with their own driver. Sometimes, the driver allows you to assign a static name to the new port, it may not even have to start with "COM". So you could have your app connect through such fixed name; or, what most programs do, have a ComboBox show all available ports (as obtained from SerialPort.GetPortNames[^])
|
|
|
|
 |
|
 |
I tried that SerialPort.GetPortNames function. It shows COM1 only. So if I connect my phone to a USB port can I use the port as COM1?
|
|
|
|
 |
|
 |
Plug it in and TRY IT. Chances are, you cannot use your cell phone as a modem without installing some software on the PC to enable it and that's IF you phone even comes with the software to enable it. Check with the cell phone vendor to find out.
|
|
|
|
 |
|
 |
You could use Device Manager (one of the options when right clicking My Computer), locate COM1, and try and decide whether it is hooked up to your phone.
Note: some PCs have a built-in modem which is implemented as a serial port, so your COM1 might be that too.
You'll have to look around and experiment, there isn't a fixed way to identify ports unfortunately.
|
|
|
|
 |
|
 |
Is there any method to insert a combo box in to list box. I want to allow users to choose items in a list box. It just like check boxes in a list box. But i want to use combo boxes instead of check boxes.
|
|
|
|
 |
|
 |
No, there isn't. You'd have to create your own custom control to do this. But, I've never seen or heard of anything like this being done. I have heard of nested listbox controls, but only in WPF, not Windows Forms.
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
hello:
I am trying to copy one two-dimensional array to another. The elements of the arrays are list of integers.
I want to copy by value. I mean, I need to change the second array without changing the first one.
I have tried with both array.copy and array.clone
Dim myarray1(3, 4) As List(Of Integer)
Dim myarray2(3, 4) As List(Of Integer)
Dim mylist As New List(Of Integer)
For i = 1 To 3
mylist.Add(i)
Next
For i = 0 To 3
For ii = 0 To 4
myarray1(i, ii) = New List(Of Integer)
myarray2(i, ii) = New List(Of Integer)
myarray1(i, ii).AddRange(mylist)
Next
Next
myarray2 = CType(myarray1.Clone, Global.System.Collections.Generic.List(Of Integer)(,))
myarray2(2, 2).Clear()
In both cases, the original array (myarray1(2,2)) is changed too.
I want the first array (myarra1) stay unchanged.
Any sugestion appreciated.
Greetings,
Alex
|
|
|
|
 |
|
 |
Array.Copy and Array.Clone create a shallow copy, i.e. for each array element they copy the value (for value types) or the reference (for reference types); they do not create a whole lot of new elements.
As you want a deep copy, you have to program that with explicit loops, copying each element, one by one.
|
|
|
|
 |
|
 |
Your code won't work because you're not making copies of the List(Of Integer) objects. Your code holds references to 12 seperate List(Of) objects, and when you use Array.Copy or Array.Clone, you are copying the references to those Lists, not the values in them. So, you now have two arrays with references to the same 12 Lists. Any changes you make in one array will be seen in the seconds array because they both point to the exact same objects.
Dim originalLists(3, 4) As List(Of Integer)
For i = 0 To 3
For j = 0 To 4
originalLists(i, j) = New List(Of Integer) From {1, 2, 3}
Next
Next
Dim copyLists(3, 4) As List(Of Integer)
For i = 0 To 3
For j = 0 To 4
copyLists(i, j) = New List(Of Integer)
copyLists(i, j).AddRange(originalLists(i, j))
Next
Next
|
|
|
|
 |