|
Hello,
Could you explain your problem in brief? like what exactly you want by providing us an example.
Regards,
Vilas Shewale
|
|
|
|
|
I know a year and a week
For example 2003 week 13
And I want to get the full date of the thuseday of this week.
So in my exemple, the function should return 04/27/2003
|
|
|
|
|
I have created a database query spreadsheet that pulls Customer ID's and corresponding Job ID's. There are a lot of calculations in this. I am using it as a reference for a separate Time Entry spreadsheet. If I use the Time Entry spreadsheet, I need to have the reference open. That might be too much for the user. I have 3 questions.
1. Is there a way to write a script that will open the reference and keep it invisible?
2. Should I just copy the cells from the reference into the timesheet and hide the tabs?
3. Will the CPU Usage be saved by choosing eother or will it stay the same?
My Brain hurts.
Thanks,
Nicole Sohenick
|
|
|
|
|
How can I extract a content from the OLE object as Text in C#? I have create in VB6:
...
OLE1.object.saveas "c:\tryFile.rtf"
...
and after that I started the Automation like
Set wordAutomation = CreateObject("Word.Application")
With wordAutomation
.Visible = False
.Application.Documents.Open ("c:\tryFile.rtf")
.Application.ActiveDocument.Select
.Application.ActiveDocument.content.Copy 'now is in Clipboard as Text
End With
...
How can I transform and implement this Code in C#?
Best regards
|
|
|
|
|
Hi,
I try to use ListsubItem object but i always this following error message:
Compilation error
method or data member not found
Can anybody help me please
thanks in advance
Cheickna
This is my code
Dim si As ListSubItem
Dim li As ListItem
Dim i, J As Integer
For i = 1 To 20
Set li = ListView1.ListItems.Add(Text:="Item " & i)
For J = 1 To 4
Set si = li.ListSubItems.Add(Text:="Subitem " & J)
si.ForeColor = vbRed
Next J
Next i
|
|
|
|
|
Don't use the add method. Try this:
Dim si As ListSubItem
Dim li As ListItem
Dim i, J As Integer
For i = 1 To 20
Set li = ListView1.ListItems.Add(Text:="Item " & i)
For J = 1 To 4
Set si = li.ListSubItems(J).Text = "Subitem " & J
si.ForeColor = vbRed
Next J
Next i
|
|
|
|
|
Is there some code or component to burn a CD programatically?
I have some data and have to save a CD from my system? Is there a way for doing this?
Thanks,
Mariano
Paranoico? yo???
|
|
|
|
|
If you have Nero 5.5 you could download their free sdk .
http://www.ahead.de/en/content/c1002825712128.html#c1002825712128[^]
I didn't used ... yet ...
Cheers,Joao Vaz
And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary.-Shog9
Remember just because a good thing comes to an end, doesn't mean that the next one can't be better.-Chris Meech
|
|
|
|
|
Hi!
I have a program that only runs the way I want it to from cmd line. Such as:
> myprogram "c:\mydirectory\file.dll"
Now, I want to automate running this program against a lot of dll's so the argument in the cmd line is bound to change. And the other thing is, I need to parse the output of the program dumped to standard out. So essentially, what would be great is if i can call something like:
> myprogram "c:\mydirectory\file.dll" > output.txt
I have the following code so far
---------------------------------------------------
Dim p As New Process()
Dim p_info As New ProcessStartInfo()
p_info = p_info.RedirectStandardOutput = False
p_info.UseShellExecute = True
p_info.FileName = "myprogram.exe"
p_info.Arguments = "c:\mydirectory\file.dll"
p.Start(p_info)
---------------------------------------------------
I tried setting UseShellExecute to false and for some reason, myprogram doesn't launch properly.
I can't have UseShellExecute and RedirectStandardOutput both true. So how do I accomplish getting this standard out?
Thanks for the help!
|
|
|
|
|
never mind
i found how it works
http://www.devx.com/dotnet/Article/7914/0/page/5
|
|
|
|
|
Hi,
I'm having a little problem sorting a 2 dimensional array, and I was wondering if someone could help. I want to sort the information in my array in decending numerical order. An example of my information is as follows: -
[50] [Bananas]
[10] [Lemons]
[30] [Oranges]
[100] [Apples]
I'd like it to sort the information from highest to lowest.
I'm using VB6, is this possible? Any help would be much appreciated.
Cheers
Ben
|
|
|
|
|
I'm afraid that there's no quick to way to do this, you'd have to do some coding. The best way, of course, if to implement a bubble sort through the first dimension, and change the second dimension accordingly
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
I always sort arrays using For loops. It might be a little slow for large arrays, but it always works for me:
Dim myNewArray() As String, q As Integer, r As Integer, s As Integer, t As Integer
ReDim myNewArray(UBound(myOldArray, 0), UBound(myOldArray, 1))
r = 9999999 'Just a big number (bigger than the biggest number in your array)
s = 0
For q = 0 To UBound(myOldArray, 0)
If myOldArray(q, 0) <= r Then
For t = 0 To UBound(myOldArray, 1)
myNewArray(s, t) = myOldArray(q, t)
Next
s = s + 1
r = myOldArray(q, 0)
End If
Next
I haven't tested this code, since I don't have VB6 installed at the place I currently am, but it should work. Just replace myOldArray by your array. You could even put this in a function, returning a String() .
"Make peace, not war"
|
|
|
|
|
I've a problem when using a command control in a form who is linked to a code that opens a executable program (Windows Media Player) and a Mp3's file. The Mp3's file is located in a folder that has spaces on it. The problem is the file doesn't open and the WMPlayer sends a message (file extension not recognized).
I know that the problem is in the spaces in the folder. Tanks a lot.
Here is the code:
Private Sub cmdPlay_Click()
On Error GoTo Err_cmdPlay_Click
Dim stAppName As String
Dim PlayFullName As String
PlayFullName = "G:\MP3\045- Mp3\test.mp3"
stAppName = "D:\Program Files\Windows Media Player\wmplayer.exe " & PlayFullName
Call Shell(stAppName, vbMinimizedFocus)
Exit_cmdPlay_Click:
Exit Sub
Err_cmdPlay_Click:
MsgBox Err.Description
Resume Exit_cmdPlay_Click
End Sub
|
|
|
|
|
The problem is the spaces, your right. But solution is also pretty easy. The problem comes because the spaces are seen as command-line argument seperators. This is the command-line your sending to Shell:
D:\...\wmplayer.exe g:\mp3\045- mp3\test.mp3
Your actually telling wmplayer that there are 2 command-line parameters:
'g:\mp3\045-' and 'mp3\test.mp3'
The solution is to put quotes around both parts of the command-line:
PlayFullName = chr$(34) & "G:\MP3\045- Mp3\test.mp3" & chr$(34)
stAppName = chr$(34) & "D:\Program Files\Windows Media Player\wmplayer.exe" & chr$(34) & " " & PlayFullName
Now your sending the command-line as:
"D:\...\wmplayer.exe" "G:\mp3\045- mp3\test.mp3"
The quotes will prevent the spaces from becoming argument seperators.
RageInTheMachine9532
|
|
|
|
|
I am chaning default printer using WshNetwork. In my project there is a printer pool and machine is Win2k. My code works fine on my machine(XP). But when i try to change the printer on Win2K it doesn't work, if one of the printer is turned off on the printer pool.
Here is the code:
Dim WshNetwork = CreateObject("WScript.Network")
WshNetwork.SetDefaultPrinter(cbobwprinter.Text)
MsgBox("Success")
Catch ex As Exception
MsgBox(ex.ToString)
MsgBox("Can't set the default printer!", MsgBoxStyle.Critical)
Any idea why it won't work in Win2K! .Net framework is installed on Win2K box. Thanks
Zulfikar Ali
|
|
|
|
|
Hello coders,
You know in VB6 there were some apis like
CreateREctRgn
CreateEllipticRgn
...
Is there any equivalent in VB.NET of one of those?
How do I use them?
Thank you
Have a nice day
Best Regards
Emre YAZICI
|
|
|
|
|
The following code can be used to change the shape of a control. It may give you some ideas about how to use regions:
Dim intDiameter As Integer = 200
Me.Height = intDiameter
Me.Width = intDiameter
Dim p As New Drawing2D.GraphicsPath()
p.AddEllipse(0, 0, intDiameter, intDiameter)
Me.Region = New Region(p)
Hope it helps
Regards
Wayne Phipps
|
|
|
|
|
Thank you very much..
I have another problem.
How can I combine two or more RGNs?
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim intDiameter As Integer = 200
Me.Height = intDiameter
Me.Width = intDiameter
Dim p As New Drawing2D.GraphicsPath()
Dim r As New System.Drawing.Rectangle(0, 0, 80, 80)
p.AddRectangle(r)
p.AddEllipse(0, 0, intDiameter, intDiameter)
Me.Region = New Region(p)
End Sub
But there is a problem. It cuts off the region (which already created before)
There was an api called CombineRgn
in the api there was a mode that you can set the combining property
Best Regards
Emre YAZICI
|
|
|
|
|
It's been divided into 5 methods:
Region.Complement
Region.Xor
Region.Union
Region.Exclude
Region.Intersect
So instead of:
Me.Region = New Region(p)
do:
Me.Region.Complement(p)
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
THANK YOU
regards
Best Regards
Emre YAZICI
|
|
|
|
|
Hi....I have a datagrid that as the user finishes entering a row, a duplicate of the row will pop up. When the user saves (updates) sometimes the extra row is saved sometimes not. Very strange behavior. I found a post on another site where a developer expressed the same behavior and said that he "had to detach the grid prior to messing with the dataset". I don't understand what he means (I've asked him but haven't received a reply). Does anyone want to take a stab at what they thing this means and how you would detach a grid? Thanks in advance.
Thanks,
Mike
|
|
|
|
|
I tried to access MS insert data from my VB code... The following Sql String gives error.....
insert into table (name) values ('MyName')
Note - the select, other queries work right... The querry executed in the MS Access worked to insert a record....
Help
I was born intelligent Education ruined me!.
|
|
|
|
|
What was the error (exception) that you got back?
Can you show some code? The DB structure?
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Ray Cassick wrote:
Can you show some code
Dim db As Database
Dim rs As Recordset
Dim SQLString As String
Set db = OpenDatabase("c:\temp\home.mdb")
SQLString = "insert into expense (ExpName) values ('Hai')"
Set rs = db.OpenRecordset(SQLString)
If rs.BOF = True And rs.EOF = True Then
MsgBox ("No Data")
........
The DB structure is simple.. with PKey as a auto number, ExpName as a text. Thats it...
Any idea of my error....
Ray Cassick wrote:
What was the error (exception) that you got back
Run time error:3219
Invalid exception!!
I was born intelligent Education ruined me!.
|
|
|
|