|
What do you mean by "system Volume
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
system volume means I want to control master volume of system through my program.
|
|
|
|
|
Import "winmm.dll". You will find suitable methods to do so.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
|
|
|
|
|
Hi Experts,
I am making an vb.net application in vs2005. I run a ppt( quize ) (which is a VBA application again,) from a button click using process.
Now my problem is to link/share the vb.net variable with the variable which i am using in VBA coding(ie total score of quize). so that I can write the score for the particular user who has logged in in my application and has ran the powerpoint(VBA).
[ score is a vriable in VBA, username is the variable present in vb.net application ]
Thanks in advance
Himangshu
|
|
|
|
|
Member 4250705 wrote: Now my problem is to link/share the vb.net variable with the variable which i am using in VBA coding(ie total score of quize).
You can't share variables between two entirely different processes. Your VBA code would have to put this value in a hidden textbox on a PowerPoint slide, then your VB.NET code would have to run PowerPoint as a COM server, show the slide show, let the VBA code run, then pick out that value from the slide using PowerPoint's object model.
No, I don't have any example code. I don't normally do any Office Interop.
Oh, and noone cares how urgent it is. It's not going to get you an answer any faster. After all, you're not paying for this support, are you?? We all donate our time here to answer questions, and we do it when we can, not when you insist on it. We don't get paid to do this...
|
|
|
|
|
thanks for ur reply...And really sorry for the word urgent...sorry for that, actually my deadline was approaching so....anyway thax a lot. I will try the same...
Regards
Himangshu
|
|
|
|
|
Hi all out there!
I got a function (in a C++ dll) that i want to call from VB.NET 2005 (Express). But every time i try this i receive an error "R6034". What can i do against this?
It would be very great, if someone gets me a hint!
Thanky you in advance!
|
|
|
|
|
The answer to this, and all of life's problems are here.[^]
|
|
|
|
|
from http://msdn.microsoft.com/en-us/library/ms235560(VS.80).aspx[^] :-
"Visual C++ Concepts: Building a C/C++ Program
C Run-Time Error R6034
Error Message
An application has made an attempt to load the C runtime library without using a manifest. This is an unsupported way to load Visual C++ DLLs. You need to modify your application to build with a manifest. For more information, see the "Visual C++ Libraries as Shared Side-by-Side Assemblies" topic in the product documentation.
Applications must use a manifest to load the C runtime library. For more information, see Visual C++ Libraries as Shared Side-by-Side Assemblies and Manifest Generation in Visual Studio.
In release builds, the diagnostic message reads: "An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information."
To correct this error
*
Rebuild your application with a manifest. Building an application with Visual Studio automatically puts the manifest into the resulting EXE or DLL file. If you are building at the command line, use the mt.exe tool to add the manifest as a resource. Use resource ID 1 if building an EXE, 2 if building a DLL. For more information, see How to: Embed a Manifest Inside a C/C++ Application."
|
|
|
|
|
I need to get the account number located in cell f10, g10, and h10 of a number of excel files.
I also need to get the total $ amount located in cell H42 of a number of excel files.
I have set up the program to browse for the excel files I want the information from.
But I'm not sure how to get the data I need from them and put into another excel file.
Here is the code I have so far:
Imports System.IO
Public Class Form1
Dim TheFile As Microsoft.Office.Interop.Excel.Workbook
Dim SaveFile As StreamWriter
Dim Files() As String
' Dim filebrowser As New FolderBrowserDialog
Dim intAccountNumber As Integer
Dim decTotal As Decimal
Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click
'Closes the application
Me.Close()
End Sub
Private Sub btnshowthefile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnshowthefile.Click
'Shows the spreadsheet
TheFile = GetObject("G:\data\dr.xls")
TheFile.Application.Visible = True
TheFile.Windows(1).Visible = True
TheFile.Application.WindowState = Microsoft.Office.Interop.Excel.XlWindowState.xlMaximized
End Sub
Private Sub btnbrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbrowse.Click
FolderBrowserDialog1.Description = "Select location of file"
FolderBrowserDialog1.ShowNewFolderButton = False
FolderBrowserDialog1.RootFolder = Environment.SpecialFolder.MyComputer
'FolderBrowserDialog1.Filter = "Excel files (*.xls)|*.xls"
FolderBrowserDialog1.ShowDialog()
Dim fpath As String = FolderBrowserDialog1.SelectedPath()
Dim tfiles() As String
Dim files() As String
Dim count As Integer
tfiles = Directory.GetFiles(fpath)
files = tfiles
For count = 0 To files.Length() - 1
ListBox1.Items.Add(files(count))
Next
SaveFile = File.CreateText("G:\data\dr.xls")
End Sub
Function findAccountNumber()
'To find the account number
Try
If TheFile.Worksheets("sheet1").cells("9", "f").value = ("State") Then
intAccountNumber = TheFile.Worksheets("sheet1").cells("10", "f").value
Else
intAccountNumber = TheFile.Worksheets("sheet1").cells("10", "g").value
End If
Catch ex As Exception
intAccountNumber = 0
End Try
Return intAccountNumber
End Function
Function findthetotal()
Dim intTotalSearch As Integer = 0
'find the total
Try
For intTotalSearch = 0 To 90
If TheFile.Worksheets("sheet1").cells(intTotalSearch, "g").value = ("Total") Then
decTotal = TheFile.Worksheets("sheet1").cells(intTotalSearch, "h").value
Else
MessageBox.Show("Wrong")
End If
Next intTotalSearch
Catch ex As Exception
decTotal = 0
End Try
Return decTotal
End Function
Private Sub btnaccountinformation_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnaccountinformation.Click
Try
For Each item As String In Files
findAccountNumber()
findthetotal()
'ListBox2.Items.Add("Account # " & intAccountNumber & " Total " & decTotal)
ListBox2.Items.Add("Account # " & findAccountNumber() & " Total " & findthetotal())
'To append
TheFile.AppendFile(intAccountNumber & vbTab & decTotal & vbCrLf)
Next
Catch ex As Exception
End Try
End Sub
Thanks for any help...
|
|
|
|
|
What happens when you run the code?
|
|
|
|
|
Well the browse feature works great...
There isn't any errors but it doesn't give me the values I want for the function findaccountnumber and function findthetotal...
But also don't know if I'm searching the files I browsed for to find the information...
|
|
|
|
|
Is is possible to create an exe which doesn't need to be installed to run from a windows.form?
I have a history viewer that I want to just run on the fly when the exe is clicked rather than ask the user if they want to install the application
Cheers
|
|
|
|
|
What do you mean, like a console application? If you are referring to the requirement of .net being installed, for any application you create using vb.net their target machine must have the .net framework installed.
|
|
|
|
|
You already have that. So long as the machine you run the .EXE on already has the appropriate .NET Framework installed and your app doesn't use any COM-based components, you can double-click the .EXE you already have in the bin folder and launch it as normal, no installed required.
|
|
|
|
|
Hi Frineds,
Can checkbox be placed inside dropdownlist of toolbar?
(i.e toolbar contains dropdownlist, i need to add checkbox along with text as a dropdownlist item)
please guide me...
Note : Using Windows Application..
Thanks....
|
|
|
|
|
There is a CheckOnClick property for each item. Use it.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
|
|
|
|
|
|
Hi
In vb.net I am using some form as MDI Child in my appliction i set the windowstae=maximaized. for the child. but when i load it in MDI parent it displays as maximized but for child i set the windowstate maximized then also it displays with actual size . So how can i solve it?
Please give me some solution for this.
modified on Thursday, January 8, 2009 11:35 PM
|
|
|
|
|
Hi Neha,
try setting window property "FormBorderStyle"
|
|
|
|
|
neha.lad wrote: but when i load it in MDI parent it displays as maximized but with actual size
Do you mean child form is maximized, but the parent is not?
If yes, then set the window state for the MDIParent as well.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
|
|
|
|
|
neha.lad wrote: i set the windowstae=maximaized. for the child. but when i load it in MDI parent it displays as maximized but with actual size
Of course, this is the expected behavior. You set the child forms to maximized, so they completely fill the MDI Client area of the MDI Parent form. This setting has no effect on the WindowsState of the MDI Parent.
So, if you want the MDI Parent to be maximized, you have to set IT'S WindowsState property to maximized.
|
|
|
|
|
Hi,
How to read from USB (Pendrive) content and information using vb.net???
|
|
|
|
|
You don't read from "USB". It's not a port, but is in fact, an expansion bus. You treat it just like the expansion slots on the motherboard.
You talk directly to the device attached to it, using whatever methods the device driver for the device expects. In the case of a "Pendrive", I'm assuming you mean a storage device, so, it'll show up as a disk volume. In that case, you use file system methods...
|
|
|
|
|
hi.
is there a way to query the print copy so that i can label one print to say for example. ORIGINAL and the second copy to print DUPLICATE on the header somewhere.
I've googled and can't seem to find anything like that. i can't see a routine where vb can query for COPIES . i can only see PAGEQUERY.
any help or advice would be much appreciated.
Thanks
Robbo
|
|
|
|