|
I want to load command prompt from VB 6.0 for a click event of a button.
can this be done if it can be how to do it.
A. Miftha Idroos
B.Sc. Engineering, AMBCS, AMIE(SL)
Hatton National Bank,
Sri Lanka
|
|
|
|
|
Hi Miftha,
Here is the code:
Private Sub Command1_Click()
Shell "command.com"
End Sub
Regards,
Premalatha
|
|
|
|
|
On Windows NT Kernels (NT, 2000, XP, 2003, Vista, ...) it's proper to CMD , not Command.com .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 10:31 Monday 20th February, 2006
|
|
|
|
|
hi,
does anybody know how to add functions/procedures for selected properties in an inherited user control?
example:
my grid control has a column property >>> grid.column(x as integer)
i want to add a sum function in the grid.column property of my inherited control.. is this possible? i dont know how to access the grid.column property..
if this is possible i would really appreciate anybody's help.. thanks in advance!
|
|
|
|
|
Anyone know how to solve this warning problem ?
"Warning 1 Function 'report1' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used."
chung
|
|
|
|
|
There are paths in your function that will not set and return a value. For example:
Public Function ReturnExample(ByVal i As Integer) As Boolean
If i < 100 Then
Return True
End If
End Function
This will generate the very same error because if i is greater than or equal to 100, no return value will be set, but the function will terminate. Possible fixes would be:
Public Function ReturnExample(ByVal i As Integer) As Boolean
If i < 100 Then
Return True
Else
Return False
End If
End Function
or
Public Function ReturnExample(ByVal i As Integer) As Boolean
Dim rv As Boolean = False
If i < 100 Then
rv = True
End If
Return rv
End Function
What you do depends entirely on your code and what you expect it to return in ALL cases.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 21:35 Sunday 19th February, 2006
|
|
|
|
|
Thank Dave! i have solve this problem
chung
|
|
|
|
|
Hi all,
I have some screens in the WinForms app I'm working on which have datagrids with long column headers (such as "Cumulative % of Injection Demand" and I want to be able to show these in their entirety by somehow having the header row high enough... it doesn't need to be dynamic - I just want to do something like say "dataGrid1.HeaderRowHeight = 50". Since it can't be done via the normal datagrid properties (I can't beleive how much basic stuff M$ left out of the WinForms datagrid!!) what would be the best way of doing it? (Any examples or links would be appreciated - I didn't find much from Google)
TIA for any help/advice,
Mike
-- modified at 22:46 Sunday 19th February, 2006
|
|
|
|
|
This is a huge pain to implement. But, you can use a library written to do this for you right here[^] on CodeProject. It's a C# library, but it'll add the support you want.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks Dave - that worked very well... except for grids that have sortable columns where the sorting icon (the little triangle) seems to screw the rendering up. Anyway, for one of two of the grids I need it on I don't need sorting so that's cool.
Cheers,
Mike
|
|
|
|
|
Well, I didn't say it was perfect!
You could always use VB.NET 2005! Good support for this is built right into the new GridView!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does anyone know whether its possible to turn off background compilation. I am sure its making my Visual Studio 2005 solution unresponsive.
|
|
|
|
|
From what i read[^], it's not possible to turn of the BC.
"While you can't turn off the background compiler..."
Why do you think that it's the BC that makes the solution unresponsive?
---
b { font-weight: normal; }
-- modified at 14:48 Sunday 19th February, 2006
|
|
|
|
|
Perhaps i've got it wrong and its not background compilation that is the issue. I am running visual studio 2005 on a solution that is upgraded from VB6 and has a vast quantity of errors. Hence my suspicion...
The fact that you can't switch it off, kind of suggests that its never an issue to worry about. If i get to the bottom of it i will let you know.
Thanks
|
|
|
|
|
I would recommend that you DON'T use the VB6 Upgrade Wizard. It puts alot of code in to simulate the way VB6 did things, which can be pretty inefficient when compared to correctly rewritten code in VB.NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can someone provide a checklist on different runtime errors that can occur during drive / directory / file operations ( this is general for any language ) .
Divya Rathi
|
|
|
|
|
|
thanks !!!!!!
The link is exactly what i wanted
Divya Rathi
|
|
|
|
|
You'll have to built that yourself. Lookup each method that your going to use (like Directory.GetDirectories[^] for instance), and look at the Exceptions that each can throw.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dim conMyData = New SqlConnection(ConfigurationManager.AppSettings("psmConnectionString"))
cmdSelect = New SqlCommand("DBAuthenticate", conMyData)
cmdSelect.CommandType = CommandType.StoredProcedure
paramReturnValue = cmdSelect.Parameters.Add("RETURN_VALUE", SqlDbType.Int)
paramReturnValue.Direction = ParameterDirection.ReturnValue
cmdSelect.Parameters.AddWithValue("@NoPekerja", noPekerja)
cmdSelect.Parameters.AddWithValue("@pWord", pWord)
conMyData.open()
there is my code.But it i try to debug it,the conMyData is not working?
any help plizz.
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
---
b { font-weight: normal; }
|
|
|
|
|
when i try to run it exception apper.InvalidOperationException. it highlighted the conMydata.open() and said ==> The ConnectionString property has not been initialized.
how could i solve it?
|
|
|
|
|
You have forgotten to put the connection string in the configuration file.
---
b { font-weight: normal; }
|
|
|
|
|
i've put the connection string in the webconfig file.but the same error still appear.Is there any place else should i put it?pliz man help me.how should i initialize the connection string?
|
|
|
|
|
Set a breakpoint on the line that grabs the connection string from the config file and VERIFY that it indeed does return what you think it does.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|