|
Hi, how can i make these two functions in my form (Zoom in or Zoom Out)?
i wish to increase or decrease size in my form
|
|
|
|
|
You'll have to be a bit more specific than that. What exactly do you want to "Zoom In/Zoom Out"?? A picture being displayed? The contents of the entire form, including all of it's controls?? What?
|
|
|
|
|
without knowing what you are trying to zoom in or zoom out from I would start having a look at the ScaleF methods
System.Windows.Forms.Control.Scale[^]
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
|
|
|
|
|
Hello Commmunity,
I am very new to VB and would like some help with a small project. I am trying to modify a column in a csv file and save my changes to a new csv file. Here is a sample of my file:
firstname, lastname, phone, email
john, smith, 1111111111, jsmith@someone.com
brad, green, 2222222222, bgreen@someone.com
I would like to search for value 'phone' in the column and replace it with 'cell phone' or change any existing column name with a new value.
firstname, lastname, cell phone, email
john, smith, 1111111111, jsmith@someone.com
brad, green, 2222222222, bgreen@someone.com
I found a few examples to import the csv into a datatable but I have not found a solution that would allow for an empty value from the orginal csv file into VB datatable. Here is an example:
Import File:
firstname, lastname, phone, email
john, smith, 1111111111, jsmith@someone.com
brad, green, 2222222222, bgreen@someone.com
sam, brown, 3333333333, ,
mike, black, , mblack@somesone.com
Export File should be this:
firstname, lastname, cell phone, email
john, smith, 1111111111, jsmith@someone.com
brad, green, 2222222222, bgreen@someone.com
sam, brown, 3333333333, ,
mike, black, , mblack@somesone.com
Thank you,
Mike
|
|
|
|
|
It'd be faster to do this using Notepad++, since the column-title is only present on the first line of the CSV-file. That's also the easiest way to build your project; read the content of the file, replace the word, write it. Take a look at the classes in System.IO .
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
If your purpose is to replace all data placed in a certain column (for example, the "phone number" field), you can do it programmatically.
The following function can be useful for that purpose:
' This function returns a token based on its place.
Public Function GetToken(new_txt As String, delimiter As String) As String
Static txt As String
Dim pos As Integer
' Save new text.
If new_txt <> "" Then txt = new_txt
pos = InStr(txt, delimiter)
If pos < 1 Then pos = Len(txt) + 1
GetToken = Left$(txt, pos - 1)
pos = Len(txt) - pos + 1 - Len(delimiter)
If pos < 1 Then
txt = ""
Else
txt = Right$(txt, pos)
End If
End Function
|
|
|
|
|
Hi, Please help me in checking the condition.I am displaying information in a html table.
I have two grids in asp and On click of first grid items it should be added to the second grid. Always items with same satus
we should add.
Example :I have 5 records in First grid.
No Status
== ======
1 closed
2 Open
3 Open
4 Open
5 Open
if I select different status records and click add button on the page it should throw an error message,
If I select same status then it shouldn't through an error message.
I have code like below. Here rs means the number of records in the second grid.
If rs.RecordCount > 0 Then
rs.MoveFirst
If trim(rs.Fields.Item("Status").Value) <> trim(grid.Columns.Item("Status").Value)
MsgBox "Items should be with same status."
Exit Function
End If
End If
Please let me know how to how to validate the above condition.
|
|
|
|
|
pls am in need of a code in visual basic on ant colony optimization,genetic algorithm and simulated annealing... thanks
|
|
|
|
|
Have you not tried Google?
Google Search[^]
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
|
|
|
|
|
You need the code?? Why? So you can turn it in as your own work??
|
|
|
|
|
Dear Expert,
I have a Listview with subitem which i add populate data in listview which is lengthy, i want to shorten the code, i tried For loop but it give me error at run time. With Do loop it working.
Do Until rs.EOF = True
Set LI = ListView1.ListItems.Add(, , rs(0))
LI.SubItems(1) = rs(1)
LI.SubItems(2) = rs(2)
LI.SubItems(3) = rs(3)
LI.SubItems(4) = rs(4)
LI.SubItems(5) = rs(5)
LI.SubItems(6) = rs(6)
LI.SubItems(7) = rs(7)
LI.SubItems(8) = rs(8)
LI.SubItems(9) = rs(9)
LI.SubItems(10) = rs(10)
LI.SubItems(11) = rs(11)
LI.SubItems(12) = rs(12)
LI.SubItems(13) = rs(13)
LI.SubItems(14) = rs(14)
LI.SubItems(15) = rs(15)
LI.SubItems(16) = rs(16)
rs.MoveNext
Loop
|
|
|
|
|
LI.SubItems(i) = rs(x)
What is the value of i in this statement?
|
|
|
|
|
Dear Sir,
is this the right path to display listview subitems with for loop
Li.SubItems(x) = rs(x)
|
|
|
|
|
What happens when you try it?
|
|
|
|
|
Dear Sir,
It work. But i just want to know it will affect the other program when compile or not.
|
|
|
|
|
kurja-kurdoh wrote: i just want to know it will affect the other program In what way affect other program? All you are doing is adding items into a list.
|
|
|
|
|
Can you help me for the vbcode for the game grow island or grow valley ? Thanks !
|
|
|
|
|
Nope.
VB6 is dead and, from what I can find, Grow Island is a Flash game, not VB6. if you want to write it yourself, go right ahead. We're not going to do it for you.
|
|
|
|
|
i was looking for the code of upgrading or evolving an object to another or maybe animation for it what code can i use ?
|
|
|
|
|
That code is custom written for you game objects and environment noone is going to write it for you and you really haven't defined what you mean by an "evolving object".
Seriously, drop VB6 and use something more modern, like XNA studio, C#, C/C++, and pick up a bunch of books on game programming.
Oh! You'll find that NONE of them use VB6.
|
|
|
|
|
We have 2 VB.Net 2008 programs.
They are not 'related'.
They are in separate folders.
If I change a module in 1 via VisStudio and save it, then the other gets
This File has been modified outside the source editor.
The module is NOT in the Solutions Explorer of the 'victum' program.
It happens on more than 1 module and both ways but it does not seem to be for all modules.
How can I stop this form happening???
|
|
|
|
|
QuickBooksDev wrote: The module is NOT in the Solutions Explorer of the 'victum' program.
Close Visual Studio. Start Notepad and open the module. Add the text "Hello world".
Open solution A in Visual Studio. See if it contains the text "Hello world". Do the same for solution B. Chances are, the text will appear in both solutions. Correct?
|
|
|
|
|
I see what you mean. The modules are there but not in the solution explorer.
So I should be able to just x out of the 'misplaced' modules and that should do it.
Amazing that these modules do not show up even when you show all files.
Or am I missing something.
THanks
|
|
|
|
|
QuickBooksDev wrote: I see what you mean. The modules are there but not in the solution explorer.
That could happen when the module is in an assembly that's registered in the GAC, taking precedence over another copy. That doesn't explain why the IDE picks the code up as "changed".
Open the solution file (.sln, in the root of the project-directory) in notepad, and verify that it ain't the same files. Now and then I make a "link" instead of a copy when adding a file from another project - changing the file in one project would then cause the other IDE to "see" the changes and ask whether it should reload.
|
|
|
|
|
I think it happens if you double click on a file that goes to VisStudio. It adds the file to the solution but does not put it into the solution explorer for some reason.
I have looked at the sln in notepad before. I even did a Win 7 search of the folder (but of course the win7 search is not reliable). It was not there.
Doing the find on the text then x-ing out of the windows does fix it.
|
|
|
|
|