|
Hi all,
I have an object of excel,application class in my application. but when i quit my application, the object remain in my memory inspite of the fact that i am using excel=nothing.
i dont understand y is it heapening.
an suggestions please
its urgent
|
|
|
|
|
I don't usually do Office automation, so I don't know if this is going to work or not. But, did you try to find/call a Quit or Exit method on your Excel Application object?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
yes i did, but its not working
any other clue
|
|
|
|
|
Hi all,
I am using datagrid for my application and i have requirement to check all chack boxes in the grid. It doing well, but for this purpose my page is to be postbaked as my code is written in code behind and i canot understand how can i implement the code performing the same functionality in javascript. here's my code.
Protected Sub CheckAll(ByVal sender As Object, ByVal e As EventArgs)
If CType(sender, CheckBox).Checked Then
For Each i As DataGridItem In dg1.Items
CType(i.FindControl("chkTemplateWO"), CheckBox).Checked = True
Next
Else
For Each i As DataGridItem In dg1.Items
CType(i.FindControl("chkTemplateWO"), CheckBox).Checked = False
Next
End If
End Sub
and then from html i m calling
<asp:checkbox id="chkTemplateHeader" runat="server" oncheckedchanged="CheckAll" autopostback="True"
runat="server">
any advice on how can i do the same thing without going to server.
|
|
|
|
|
I am doing my vb.net programmer training in podicherry.
plz give me coding for treeview
I am Mani I work in pondicherry
|
|
|
|
|
|
I am in need of a insurance application project.
It is very help full to me if any one send the project
my mail id is abhaskar_raomca@yahoo.co.in
krishnasandeep@gmail.com
with Regards
Sandeep
-- modified at 1:04 Saturday 3rd September, 2005
|
|
|
|
|
sandeepreddy wrote:
I am in need of a insurance application project. It is very help full to me if any one send the project
That is a very vague request. There are many applications in the insurance industry and all different. Also, I'm sure that many insurance companies createt their own applications and are very protective of them for competitive reasons.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
hai friend
I need any type of insurance project.
to simply study it and keep that as my exp project
|
|
|
|
|
I've seen quite a few applications if a program is already running, it just brings the instance that is already running back into view. Right now, I could have say, N number of instaces of my contact manager running. How would I go about making a 1 instance app?
|
|
|
|
|
Search the articles for "single instance" and you'll find a bunch of examples. Here's[^] a list of the top 3 VB.NET examples.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If you are using VB6:
If App.PrevInstance Then 'We are already running an instance of this, exit
End
End If
You can also activate the first instance by:
If App.PrevInstance Then 'We are already running an instance of this, exit
Dim sSave As String
sSave = App.Title
App.Title = App.Title & "... duplicate instance."
AppActivate sSave
End
End If
|
|
|
|
|
I want to send Key to another form of another application using API function.
Can you give me source code to do it ?
Hung
|
|
|
|
|
Here is a code snippet to send commands to the Calculator. Hope it helps:
<br />
Dim ProcID As Integer<br />
' Start the Calculator application, and store the process id.<br />
ProcID = Shell("CALC.EXE", AppWinStyle.NormalFocus)<br />
' Activate the Calculator application.<br />
AppActivate(ProcID)<br />
SendKeys.SendWait("22")<br />
SendKeys.SendWait("*")<br />
SendKeys.SendWait("44")<br />
SendKeys.SendWait("=")<br />
|
|
|
|
|
When I apply this code to Command Prompt( Windows XP ) nothing happens.
I don't know why, I have used Win32 API with VB and all things work smoothly. But I don't know how to apply that code to VB.NET
Private Declare Function GetFocus Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Integer) As Long
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Const WM_CHAR As Long = &H102
Private Const CH_A As Byte = 65
Private Sub Command1_Click()
Dim handleactive As Long
Dim recString As String
Dim handle As Long
handleactive = GetFocus()
'Call Shell("c:\windows\system32\cmd.exe", vbMaximizedFocus)
'handleactive = GetActiveWindow()
handle = FindWindowEx(0, 0, "ConsoleWindowClass", "C:\WINDOWS\system32\cmd.exe")
DoEvents
SendMessage handle, WM_CHAR, vbKeyC, 0
SendMessage handle, WM_CHAR, vbKeyD, 0
SendMessage handle, WM_CHAR, vbKeyReturn, 0
recString = String(100, Chr$(0))
GetWindowText handleactive, recString, 50
Text1 = recString
End Sub
Hung
|
|
|
|
|
I modified the code for the command prompt as shown below and seems to work fine:
<br />
Dim ProcID As Integer<br />
' Start the application, and store the process id.<br />
ProcID = Shell("CMD.EXE", AppWinStyle.NormalFocus, True, 1000)<br />
' Activate the application.<br />
AppActivate(ProcID)<br />
SendKeys.SendWait(" CD \TEMP" + vbCr)<br />
|
|
|
|
|
When I use this code:
handle = FindWindowEx(0, 0, "ConsoleWindowClass", "cmd.exe")
The returned handle is different between VB & VB.NET. So I can't use SendMessage (Win32 API function). I don't understand . Please help me !
|
|
|
|
|
Ok so I have TabControl and dynamically created TabPage with dynamically created RichTextBox. I am trying to use a OpenFileDialog to open a .rtf in a new TabPage in a new RichTextBox and read the selected rtf file into it. Here is the code that I am using. Somewhat new so feel free to show me better ways of doing what I am trying to do.
<br />
Dim sr As StreamReader<br />
<br />
Try<br />
With OpenFileDialog1<br />
If .ShowDialog = Windows.Forms.DialogResult.OK Then<br />
If .FileName.EndsWith(".rtf") Then<br />
<br />
'Declare new object variables<br />
Dim rtbTextArea As New RichTextBox<br />
Dim newTab As New TabPage<br />
<br />
TabControl1.TabPages.Add(newTab) 'Add new Tab Page to tab control<br />
<br />
With newTab<br />
.Text = OpenFileDialog1.FileName <br />
.Controls.Add(rtbTextArea) 'Add the rich text Box to the new tab control<br />
rtbTextArea.Dock = DockStyle.Fill 'Set Rich Text box area to fill tab page<br />
.Focus()<br />
End With<br />
<br />
For Each ctl As Control In TabControl1.SelectedTab.Controls 'Find RichTextBox control<br />
If TypeOf ctl Is RichTextBox Then<br />
sr = New StreamReader("" & .FileName & "")<br />
ctl.Text = sr.ReadToEnd<br />
End If<br />
Next<br />
Else<br />
MessageBox.Show("Please choose a Rich Text File (.rtf)")<br />
End If<br />
End If<br />
End With<br />
Catch ex As Exception<br />
MessageBox.Show(MessageBoxIcon.Exclamation, "An error has occured. Please make your selections again")<br />
Finally<br />
If Not (sr Is Nothing) Then<br />
sr.Close()<br />
End If<br />
End Try<br />
<br />
Thanks,
Taen Karth
-- modified at 21:47 Friday 2nd September, 2005
|
|
|
|
|
|
Ha, I forgot to add the question didn't I. Here goes...When I use the code above the text that was read is displayed in the wrong tab.
Not sure why...
Thanks,
Taen Karth
-- modified at 4:38 Saturday 3rd September, 2005
|
|
|
|
|
Nevermind I figured it out. I added
TabControl1.SelectedTab = newTab
Right after
TabControl1.TabPages.Add(newTab) 'Add new Tab Page to tab control
Thanks,
Taen Karth
|
|
|
|
|
I need to grab data from labels on my form so I can perform calculations and other things. Problem is I get a item not declared in the module. I would operfer to put the majority of the code into modules and call as necessary. How do I reference the texytboxes, labels and such in the module. E.g grab the values of the objects input them into the module and return what I need.
I have no problem creating functions, it;s just that I perfer to place my functions into a module and call accordingly.
|
|
|
|
|
If I have understood you correctly: You should use the name of your form or in better words the instance of the form which is beind displayed as follows:
frm.Label1.Text, frm.Text1.Text etc.
|
|
|
|
|
I am trying to capture a windows display, but even if it's off the screen.
The BitBlt api works only for a window that is on the screen, as soon as you move it off the screen or mininmize it you can't capture that windows information.
The OleDraw api is almost what I need but it requires you to pass in the object's IUnknown Interface as one of the arguments and I don't know how to find an objects IUnknown Interface.
My question is either, how do you get an objects IUnknown Interface only knowing the windows handle or is there another api like OleDraw that I should be using when I only have the windows handle, to capture the windows display when it's not on the screen.?
|
|
|
|
|
bountycode wrote:
I am trying to capture a windows display, but even if it's off the screen.
You're wasting your time. You can't capture what is never drawn in the first place. This has been discussed in the boards over and over again.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|