|
AFAIK, you can't run any applications in the Recovery Console. You're limited to what the Command Prompt provides.
|
|
|
|
|
That's not possible since the .NET Framework isn't loaded when Windows starts in the recovery console.
You'll have to write in a language that compiles to native code.
|
|
|
|
|
Hi all
I am using vs2005 and windows form
I want add a control inside the datagridview's (windows control ) cell
I dont find any method similar to gridview webcontrol's
gridview.rows[0].cells[0].controls.add()
anyone can post the code snippet for this
thanx a lot
|
|
|
|
|
Take a look at DataGridView Custom Column Sample[^] from MSDN.
Or This article[^] from Code Magazine.
If neither of these is quite right, I found them and loads more by Googling custom datagridviewcolumn
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
I try to export datagrid data to one excel spread sheet (i called it ExcelA).
Then, when I want to close ExcelA, I wrote this codes to kill excel.exe.
wExcel.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(wExcel)
System.GC.Collect()
Dim proc As System.Diagnostics.Process
For Each proc In System.Diagnostics.Process.GetProcessesByName("EXCEL")
proc.Kill()
Next
wExcel = Nothing
But then, it killed all the excel that I currently open. (those that are not related to this ExcelA.)
How can i only kill the excel.exe that belonging to this ExcelA ?
Please help. I had tried to search.. but failed to get it.
Thanks in advanced. Appreciate your help.
Here is my codes:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ds.Clear()
ds.Tables.Add()
If ds.Tables(0).Columns.Count <= 0 Then
For i As Integer = 0 To myTable.Columns.Count - 1
ds.Tables(0).Columns.Add(myTable.Columns(i).ColumnName)
Next
End If
Dim dr1 As DataRow
For k As Integer = 0 To myTable.Rows.Count - 1
dr1 = ds.Tables(0).NewRow
For j As Integer = 0 To myTable.Columns.Count - 1
dr1(j) = dgSearch.Item(k, j)
Next
ds.Tables(0).Rows.Add(dr1)
Next
Dim wExcel As New Excel.ApplicationClass
Dim wBook As Excel.Workbook
Dim wSheet As Excel.Worksheet
wBook = wExcel.Workbooks.Add()
wSheet = wBook.ActiveSheet()
Dim dt As System.Data.DataTable = ds.Tables(0)
Dim dc As System.Data.DataColumn
Dim dr As System.Data.DataRow
Dim colIndex As Integer = 0
Dim rowIndex As Integer = 0
For Each dc In dt.Columns
colIndex = colIndex + 1
wExcel.Cells(1, colIndex) = dc.ColumnName
Next
For Each dr In dt.Rows
rowIndex = rowIndex + 1
colIndex = 0
For Each dc In dt.Columns
colIndex = colIndex + 1
wExcel.Cells(rowIndex + 1, colIndex) = dr(dc.ColumnName)
Next
Next
wSheet.Columns.AutoFit()
Dim strFileName As String = "C:\M2.xls"
Dim blnFileOpen As Boolean = False
Try
Dim fileTemp As System.IO.FileStream = System.IO.File.OpenWrite(strFileName)
fileTemp.Close()
Catch ex As Exception
blnFileOpen = False
End Try
If System.IO.File.Exists(strFileName) Then
System.IO.File.Delete(strFileName)
End If
Try
wBook.SaveAs(strFileName)
wExcel.Workbooks.Open(strFileName)
wExcel.Visible = True
Catch ex As Exception
MsgBox(ex)
Finally
' MsgBox("closing now")
End Try
End Sub
Private Sub Excel_WorkbookBeforeClose(ByVal wBook As Excel.Workbook, ByRef Cancel As Boolean) Handles wExcel.WorkbookBeforeClose
wExcel.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(wExcel)
System.GC.Collect()
Dim proc As System.Diagnostics.Process
For Each proc In System.Diagnostics.Process.GetProcessesByName("EXCEL")
proc.Kill()
Next
wExcel = Nothing
End Sub
|
|
|
|
|
Try using environment.exit(exitcode) in the workbook close event.
|
|
|
|
|
Hi ,
I would like to edit 2 columns in datagrid. How can i do that?
I know dgSearch.ReadOnly = False, is to be able to edit all columns.
But now i only want certain columns only.
How should I go about?
Please help and guide me. Thanks in advanced.
regards,
eunice
|
|
|
|
|
You need the DataGridViewColumn.ReadOnly property. MSDN[^]
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi All,
I am loading usercontrols inside form(Pannel).Upon click on button on usercontrol it opens popup(form) which minimizing the toplevel form. The pop up should open above Toplevel form. Any idea please help.
I tried by setting TopMost property to true but no luck.
Many Thanks,
Sri
|
|
|
|
|
Try to set this property after displayed by Show() method. That usually fixes it.
|
|
|
|
|
Hello,
Thanks for the reply. Which property i need to set.
Regards,
Sri
|
|
|
|
|
Same TopMost like below.
Dim f As New Form2
f.TopMost = True
f.Show()
Me.TopMost = True
|
|
|
|
|
i dont think so it will work in MDI i have same problem also
if i put one control box or any other container control on MDI form then the child form goes back
|
|
|
|
|
Hi All,
After loading form loosing focus. I tried by setting focus in "Deactivate" and "LostFocus" event of form but no luck. Form loosing focus after 5-10 sec(After loading).
Many Thanks,
Sri
|
|
|
|
|
Please provide some code for what exactly you are doing on load, Deactivate and LostFocus events.
|
|
|
|
|
Hi All,
I have a Win Form on which I use the KeyDown event to perform certain activities using Alt-Key combinations.
Unfortunately, this also triggers the menustrip 'capturing' the Alt key and highlighting the default menu item ('File') and essentially disabling any further typing until the Alt key is pressed again.
Is there any way to stop the file menu from capturing the Alt when this is used to trigger operations in the KeyDown event?
Thanks,
Sri
|
|
|
|
|
How are you checking if Alt key was pressed?
Instead of e.KeyCode == Keys.Alt , use e.Alt.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hi,
Thanks for your reply.Unfortunately, i did not write single piece of code to check which key was pressed.
In form i have added button text like (&Help...etc).
my menustrip still captures the alt key(First time), and still disables any further typing until I press alt again.
I'm using key combinations of Alt-A, Alt-D etc to focus onto various fields on the form. Any of these will force the menustrip to capture the Alt key.
Regards,
Sri
|
|
|
|
|
Your key-combinations (where Alt and A are both pressed at the same time) work, even if a single keypress on the Alt prevents further input.
A keypress on Alt should give you the option to browse the menu. Windows doesn't capture the key, but the focus. The second keystroke then determines what menu to open. That's two seperate keystrokes.
Your key-combination is Alt-A, and the A is typed while the Alt-key is down. That gives different behaviour on Windows - it first checks if there's a shortcut-key defined (e.g., the letter right after the "&"-char in the caption of a button)
These two behaviors shouldn't bite each other. If your end-user is like me, he'll be using the Alt-key often enough to navigate the menu
I are Troll
|
|
|
|
|
Hi, i want to create a winform that contains a chess board surface/graphic.
I have a programm that generates a specific fieldindex. This index should be given to the chess board form and initiate the highlighting of the choosen field.
How can i handel this two problems.
first the drawing and highlighting of the chess board
and second the datatransfer from the programm to the winform(maybe by using delegates?)
thanks
|
|
|
|
|
benstar111 wrote: first the drawing and highlighting of the chess board
For this you will need to handle the Paint event of the form and then draw the chess board using the FillRectangle method of the Graphics object.
benstar111 wrote: the datatransfer from the programm to the winform(maybe by using delegates?)
That depends on the what exactly is the second program you need to send data to. If that is a managed dll, just add a reference to it and use the methods it exposes.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hi all,
I want to know how windows installs the update while system is shutdown.
Using that knowledge i want to write an application which will able to delete the driver file ;which does not gets deleted in native mode.
|
|
|
|
|
|
Sir, i have tried using the above info but it is not possible to delete the file.
I just want to know how windows installs updates ???
|
|
|
|
|
The Windows API Code Pack for Microsoft .NET Framework provides a source code library that can be used to access some new Windows 7 features (and some existing features of older versions of Windows operating system) from managed code. These Windows features are not available to developers today in the .NET Framework.
You can get code pack from http://code.msdn.microsoft.com/WindowsAPICodePack[^]
For more information, see Windows API Code Pack for .NET Released[^]
|
|
|
|