|
Hi,
Can any one of you help me with the problem
I am trying to develop a simple application in Visual Basic using Microsoft Date and Time Picker Control Version 6.0 from the OCX File MSCOMCT2.ocx but after my entire project is ready and Try to run it after a day or two the MSCOMCT2.ocx file disappears from the References.
And have to recreate the entire project again since in references it does not add the msconct2.ocx gives an error Name conflict.
Please can any one help me on this. I have a project dead line to meet
Regards
Dixon
-- modified at 8:24 Thursday 21st September, 2006
|
|
|
|
|
I am creating a file with .ciio extension. Now i want to associate a particular icon with this extension. like other application do (word, pdf etc).
How can i associate an icon with a file type programatically?
|
|
|
|
|
You will have to add that info in the Registry for file association to the Icon
|
|
|
|
|
do u know the registry entries? or do u hav the code sample.
|
|
|
|
|
Some packagers like InstallShield have this ability to association icons to file types built in
Steve Jowett
|
|
|
|
|
Hi All,
I want to modify the app.config file using vb.net(means change the value of key). how to do this?
If you know please tell me.
thanks in advance
chetan
|
|
|
|
|
All you have to do is search the articles and you shall find[^]...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Public Sub ReadMyData(ByVal MyConnString As String)
Dim mySelect As String
Dim MyConnection As New SqlConnection(MyConnString)
Dim myReader As SqlDataReader
Dim myCommand As New SqlCommand(mySelect, MyConnection)
mySelect = "Select * from bobo"
MyConnection.Open()
myReader = myCommand.ExecuteReader()
While myReader.Read()
Console.WriteLine((myReader.GetInt32(0) & "' " & myReader.GetString(1)))
End While
myReader.Close()
MyConnection.Close()
End Sub
The above coding must retrieve and output the data from the database.
I am getting an error on 'myReader = myCommand.ExecuteReader()'
error :" Specified cast is not valid."
Please help
|
|
|
|
|
Lesesi wrote: Dim myCommand As New SqlCommand(mySelect, MyConnection)
mySelect = "Select * from bobo"
These are in the wrong order.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
in a string i need to find a "(quotation mark)and replace it with null
how to do this finding a quotation in a string and replacing
mail me at rajesh.batchu@cesltd.com
|
|
|
|
|
Do you really mean null, or do you just want to remove quotes ? The replace method on the string class will let you do it, just set the second parameter to an empty string ( assuming you don't want to replace with null )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Ok hi guys.
Noob..
Wrote-up a small database application.
What im trying to do is to get a dropdown box to populate with the data from collum one of my sql database.
Lets say colum one is names , simply i would like to drop down the list of names and have the app collect the info for the name I select from the list.
Any help would be greatly appreciated.
|
|
|
|
|
Do a query to return that list, and make the return value the data source for your combo box.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks that makes sense but ,
When I try to add a new query it returns and error that the schema for the new does not match the one of the base query.
As i said im new so , I have no idea what that means.
I created the example query but it doesnt appear on the list of Data Sources.
|
|
|
|
|
OK - it sounds like you're at the mercy of the wizards. I have no idea how they work, I tend to write my SQL directly. Perhaps if you post the code, someone can help you ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi all,
I've been getting a strange problem with anchoring on my forms. I have a form where I put on a tabControl. I set it's anchoring to Top, Bottom, Left, Right. I put a number of tabPages on to the control. On the first tab I put textBoxes and comboBoxes. I set all their widths to 655 and their anchoring to Top, Left, Right.
When I run the app, the form appears and all the textboxes and comboBoxes have truncated from the right, the left hand side is fine. When I go back to designer it's truncated as well. The more I run it the more truncated it gets.
Has anyone else had this issue?
Thanks in advance for any help,
Dave
|
|
|
|
|
I've seen some funky things happen when using the TabControl. That's why I try not to use it - ever.
But, when that problem occured in my project, I ended up killing off the controls that we're affected and recreating them. Things settled down after that. Try no to go back and touch the controls after that. Also, try locking the controls in place when there finally set. Right-click on any control and pick "Lock Controls".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello i have to put this 2 conditions:
Where (id = @id) and (iStatus = 0)
can someone plz tell me the corect code
|
|
|
|
|
Are you asking how to place parameters onto a stored proc call ? Are you asking how to call a stored proc altogether ? Are you asking how to write the proc ?
If you can word the question a bit better, I'd say that typing it into google will answer it, but if you don't know how to use google, by all means ask it more clearly here instead.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I am creating a somewhat complicated application. What I want is, I am using VB.net 2005 and I have a splash screen. I want after 10 seconds, the splash screen to close and the form MainScreen1 to load. How would you do that?
In the end we're all just the same
|
|
|
|
|
I hope you don't mean this is what makes your app complicated...
You can set a timer to close your splash screen. I'd have thought the built in splash screen component would offer this also.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Yeh. Thanks. Thats was the easy part. the rest is complicated.
In the end we're all just the same
|
|
|
|
|
This a full integrated VB.NET 2003 frameworm 1.1 winform (with swf DLLS, swf files, and db connection) sample of using SWF TITLEBAR and LOADING BAR.
IN THIS PAGE YUO'LL FIND THE COMPLETE VB.NET PROJECT
http://www.scacco-mattoband.com/dwn.html
Try and use it if you need
THERE IS ONLY A TROUBLE I'M NOT ABLE TO SOLVE:
If you try this sample you can see i made a select with FOR CICLE to make a longer data elaboration.
During the select subRoutine the titleBar stops run
and the loading bar becomes visible only after the binding of the datagrid.
I'd like to know how can i correctly thread this code:
the right thing is that SWFloadingbar become visible (and run!!!!!) before the star of select subRoutine() and the SWFtitlebar does not stop.
WHEN This truble will be solved i'd like put this sample in the article session
IN THIS PAGE YUO'LL FIND THE COMPLETE ZIP VB.NET PROJECT TO DOWNLOAD
http://www.scacco-mattoband.com/dwn.html
THIS IS THE CODE OF THE WINFORM
Private Sub Form3_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
'SWF TITLEBAR
Dim path As String
path = System.Environment.CurrentDirectory
path = path + "\titoloprovawinform.swf"
AxShockwaveFlash2.LoadMovie(0, path)
End Sub
Private Sub ButtonLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoad.Click
Dim path As String
path = System.Environment.CurrentDirectory
path = path + "\load.swf"
axShockwaveFlash1.LoadMovie(0, path)
selectAndBind()
End Sub
Private Sub selectAndBind()
Dim conStr As String = "Provider=SQLOLEDB;Data Source=localhost;Database=Northwind;Integrated Security=SSPI;"
Dim sqlStr As String = "SELECT * FROM orders"
' Create connection object
Dim conn As OleDbConnection = New OleDbConnection(conStr)
' Create data adapter object
Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn)
' Create a dataset object and fill with data using data adapter's Fill method
Dim ds As DataSet = New DataSet
da.Fill(ds, "Employees")
' Attach dataset's DefaultView to the datagrid control
conn.Close()
Dim conStr2 As String = "Provider=SQLOLEDB;Data Source=localhost;Database=Northwind;Integrated Security=SSPI;"
Dim sqlStr2 As String = "SELECT * FROM orders"
' Create connection object
Dim conn2 As OleDbConnection = New OleDbConnection(conStr)
' Create data adapter object
Dim da2 As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn)
' Create a dataset object and fill with data using data adapter's Fill method
Dim ds2 As DataSet = New DataSet
da2.Fill(ds2, "Employees")
' Attach dataset's DefaultView to the datagrid control
DataGrid2.DataSource = ds2.DefaultViewManager
conn.Close()
Dim conStr3 As String = "Provider=SQLOLEDB;Data Source=localhost;Database=Northwind;Integrated Security=SSPI;"
Dim sqlStr3 As String = "SELECT * FROM orders"
' Create connection object
Dim conn3 As OleDbConnection = New OleDbConnection(conStr)
' Create data adapter object
Dim da3 As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn)
' Create a dataset object and fill with data using data adapter's Fill method
Dim ds3 As DataSet = New DataSet
da3.Fill(ds3, "Employees")
' Attach dataset's DefaultView to the datagrid control
conn.Close()
Dim iii As Integer
Dim aaa As Integer
For aaa = 0 To 60
For iii = 0 To ds2.Tables(0).Rows.Count - 1
ds.Tables(0).ImportRow(ds2.Tables(0).Rows(iii))
Next
For iii = 0 To ds3.Tables(0).Rows.Count - 1
ds.Tables(0).ImportRow(ds3.Tables(0).Rows(iii))
Next
Next
DataGrid1.DataSource = ds.DefaultViewManager
End Sub
ROBERTO BAGGIO RULES
PS
FORGIVE MY BAD ENGLISH
|
|
|
|
|
Whats the name of control in VB.net(2005) which appears in project properties the one which is like tab control but bit fancy can i add that in my project ... how & from where ... thanks in advance
DJ
|
|
|
|
|
You mean the control in the IDE ? No, it's a custom control, you'd have to write one to behave that way.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|