|
is the DLL a separate user control with a form?
|
|
|
|
|
Sorry about the unaccurate question. The DLL is a form, I'm building a large project and have no intention to have in one project.
Kjartan
|
|
|
|
|
This form is it's own class library?
Then all you would have to do is create an instance of it, just like any other form:
Dim newForm As New MyDllForm
newForm.Parent = Me
newForm.Show()
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I get this errormessage.
An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll
Additional information: Cannot add a top level control to a control.
Kjartan
|
|
|
|
|
instead of newForm.Parent = Me, which gives an error, you should have
newForm.MdiParent = Me, and then it works fine.
Kjartan
|
|
|
|
|
Whoops! My mistake!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I have a filestream that I am able to read only once when my program launches. If I attempt to read the line a second time, I receive the message "The process cannot access the file 'C:\IMGfromDB.BMP' because it is being used by another process." at this line of code...
fs = New FileStream(savedIMGName, FileMode.OpenOrCreate, FileAccess.Write)
I've tried the following to release the processes...
fs.Close()<br />
fs.Dispose() and
File.Delete(savedIMGName)
Thanks in advance
-- modified at 14:11 Tuesday 11th July, 2006
|
|
|
|
|
|
Hi guys
I have stored a treenode text into a custom property then now i want to reselect the specified treenode whenever i start my application.
So plz guys help me out n tell me which code to use.
Thanks in advance.
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
Hi all,
I'm not much of a VB programer so I hope one of you guys or gals could help me with something. I am trying to create a macro to be used with word. The pupose is to search the selected text for a character sequence and edit it. If you know anything about chinese, this macro will convert numbered pinyin into toned pinyin.
it looks something like this
Sub number2tone()
With Selection.Find
.Text = "r1"
.Replacement.Text = "1r"
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "r2"
.Replacement.Text = "2r"
End With
Selection.Find.Execute Replace:=wdReplaceAll
...
With Selection.Find
.Text = "a4"
.Replacement.Text = ChrW(&HE0)
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
The problem I am having is that instead of searching only the selected text, sometimes it goes on to the end of the document and sometimes to the end of the line.
|
|
|
|
|
stored procedure concepts in vb.net
|
|
|
|
|
can you be a bit more specific please?
|
|
|
|
|
Is this a question, a statement, or just a general thought ? I suspect if you wanted info on this, pasting it into google verbatim will give you plenty.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi, I am creating a front-end to the sqlite DBMS using VB.Net 2002. I have managed to get the name of the table, field names and types from user input displayed into a listview but I can only get the Create table command to accept the last input values, so if the table has more than one field(which nealry every table has) it simply ignores the previously entered fields.
How would I get it to create an SQL query with all the inputted field details?
I have inserted the code I have used so far.
Many thanks for your help.
This button opens up a new form for the user to input the field name and select the field type then brings them back and displays them in a listview.
Public Sub btnAddColumn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddColumn.Click
Dim frmAddColumns1 As New frmAddColumns()
frmAddColumns1.ShowDialog(Me)
fldName = frmAddColumns.ColumnNameTB.Text
fldAttribute = frmAddColumns.ColumnTypeTB.SelectedItem
'Create ListViewItem
Dim item1 As New ListViewItem(fldName, 0)
item1.SubItems.Add(fldAttribute)
'Add the items to the ListView.
listView1.Items.AddRange(New ListViewItem() {item1})
Me.Controls.Add(listView1)
End Sub
This button takes the input table name, field name and attributes and creates the SQL command to send to the database to create the table:
Private Sub btnCreateTable_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateTable.Click
Dim tblName As String
tblName = txtTableName.Text.ToString()
If Len(txtTableName.Text) < 1 Then
MessageBox.Show("Please type a name for the table")
ElseIf Len(txtTableName.Text) > 0 Then
Try
dbConn.openExistingDatabse("Data Source=" & getDBName() & ";Version=3;New=False;Compress=True;")
dbConn.createSQLCommand()
dbConn.createTable("CREATE TABLE " & tblName & "(" & fldName & " " & fldAttribute & ")")
MessageBox.Show("Table created successfully")
Me.Close()
Dim frmInsertData1 As frmInsertData = New frmInsertData()
frmInsertData1.Show()
Catch es As Exception
MessageBox.Show(es.Message)
End Try
End If
End Sub
|
|
|
|
|
In btnAddColumn_Click() you assign fldName and fldAttribute and add them to the ListView but in btnCreateTable_Click() you don't iterate the ListView to retrieve all added columnnames and datatypes. You only use the las assigen values for fldName and fldAttribute.
BR
Fredrik
-- modified at 10:05 Wednesday 12th July, 2006
|
|
|
|
|
Hi Fredrik, thanks for your help, I've managed to get all rows from the listview using a for loop and adding them to a string.
thanks again for your help
john
|
|
|
|
|
I had created a vb script file
I want to execute the script file , before of after installing
the applicaion.
how to run vb script form setup using Visual Studio
Setup & deployment wizard
Thanks in Advance
|
|
|
|
|
hi,
i want to print the report using crystal report.
but the layout which i want should be displayed in Boxes.
Plz give me suggestion and code.
thanks
Parag
S/w Engineer
|
|
|
|
|
U can use field format option by right click on field in Detaile Saction.
This may solve ur prblm.
|
|
|
|
|
hellow to all
i am trying to add the Microsoft Outlook 11.0 Object Library reference to my project , but i can't find it in the COM , where can i find it ?
thxx
|
|
|
|
|
Do you have Office 2003 installed on the machine that you're using Visual Studio with?
I recently went through an MSDN call regarding a problem with my application working with different versions of Office, and they said that you need to install the version of Office you want the application to work with on the development box to get the reference.
Hope this helps...
Lost in the vast sea of .NET
|
|
|
|
|
Hi,
Does anyone know any api that could replace hex character?I want to replace null character(00) into space character(20) when I import a text file into DataBase.Thanks.
|
|
|
|
|
What do you mean by "hex character"? Do you mean a character where you express the character code in hexadecimal?
Hexadecimal numbers are written using the &H notaion. The value 32, or hexadecimal 20, are written as &H20.
To create a character value from a numerical value, you use the Chr function.
If you put those togheter, you get Chr(&H20) to produce a space character.
Do you have problems with the replacing part? How about the Replace function?
---
b { font-weight: normal; }
|
|
|
|
|
LOL - when I saw &H20, I thought it said H2O, and that you were kidding....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,Guffa
I had solved my problem,thanks.
|
|
|
|