i'm working on a notepad project
and i want to open .txt files with my app
when i open a file ,modify it and save... save only NOT save as
it opens save as file
i want to modify the opened file
here is the code i'm using
Shared Sub DoubleClickFile(Textbox As TextBox)
If System.Environment.GetCommandLineArgs().Length > 1 Then
Dim i As Integer
For i = 1 To System.Environment.GetCommandLineArgs().Length - 1
Dim zReader As StreamReader
zReader = New StreamReader(System.Environment.GetCommandLineArgs(i), True)
Textbox.Text = zReader.ReadToEnd
I've created a custom tooltip control using a UserControl as the base. When dragging the
control from the toolbox to the form it displays the control (of course) but I want it to
be added like a ToolTip when it is dragged to the form; as an object displayed below the form
in the designer. I've been searching for an answer but I'm not even sure what question to
search for. Can someone help?
My teacher gave us an assignment to link two forms together where one form is an admin form where u can put things and delete things together and another form is an user form where they can only view it. My question is I want to do a video input format and I can only embed my videos on form 1 but it wont show on form 2 can anyone please help.
I'm using entity framework 6 and vb.net 2017.
I have a situation where I read some data from database :
Dim lst as ienumerable(of Mytable1)
After that , I've made some modifications on some items on the collection , and after that i want to remove from the collection the items that have vl1=0. (But of course I want to do that only on local data that is read before from database and nothing will be saved on database )
How can I do that ?
I'm sorry to bug people about this but I'm still having a slight problem with a Database programming question with Visual Basic 6/Net. I took the advice of someone else on this message board (thanks) about instead of using a combo box as a control but use a simple textbox/command button to control a database pointer in a database program that controls what table to use within the database. Here is the following code I'm using now...
Private Sub cmdSelectedLeagueGameBack_Click()
Dim DataPointerIndicator As Integer
Dim DataIndexNumber As Integer
DataPointerIndicator = DataPointerIndicator - 1
If DataPointerIndicator <= 0 Then DataPointerIndicator = 1
Select Case DataPointerIndicator
Case Is = 0: DataIndexNumber = 0
Case Is = 1: DataIndexNumber = 1
Case Is = 2: DataIndexNumber = 2
Data1.RecordSource = DataIndexNumber
Text1.Text = Data1.RecordSource
The problem I'm having is that I can't figure out how to use the "DataIndexNumber" varible to connect to the "Text1.Text = Data1.RecordSource" so that I can display each table within the Connected Database. The table display properly within the Text1 Object, but I have no idea how to make a "Pointer" within the Database and how to control the "Pointer".
You use the index value to select the appropriate table. But a much easier method would be a ListBox with the table names, so the user could select the name, and you then have the exact value necessary.
Yes, I was trying to use an varible to "control" a pointer (which I haven't figured out how to create yet) much like the Index value you described but I can't seem to come up with anything with the previous code. I'm kinda stumped.
A listbox sounds like a good idea, but how do I display the individual tables within the Listbox? Do you have an example I could use for this?
I am not sure exactly what you are trying to do. Are you trying to display the content of the tables, or just their names? If the former then there are plenty of articles that explain how to bind between different view types and a database. If the latter then you just need to get the names from the database and add them one by one to the listview, or use simple databinding.
What I'm trying to do is build a simple utility that inputs data from a sporting event into individual tables within a database. Each table represents a sporting event with recorded stats. I have linked the database to the utility porperly with the code I listed before, but I can't seem to figure out how to build a pointer to input the data from each game into a particular table. Switching from table to table in the database is inportant in this utility, but I just can't figure out how to control the pointer in the database with a simple command button and a textbox to display the selected table.