|
By Using JavaScript you can Run Command as per your requirement.
or you can use BAT file for executing Command.
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
Set wShell = WScript.CreateObject("WScript.Shell")
wShell.Run "c:\windows\system32\calc.exe" Google is your friend, my friend
I are troll
|
|
|
|
|
|
patricemburu wrote: anyone with vb 6.0 code for netmeeting or knows where i can get it?
Nobody is just going to give you code.
I don't know what you mean by 'netmeeting' but if its a program, other developers worked hard on it to create it so by just requesting there work (code) your requesting to steal from them.
patricemburu wrote: pls
you have a full keyboard, use it.
patricemburu wrote: patricemburu@yahoo.com
NEVER a good idea to put your email into a forum post.
There is an email button (just as there is a reply button).
patricemburu wrote: vb 6.0
It's dead and unsupported, so why on earth would you still use it.
|
|
|
|
|
Right
- NetMeeting was not written in VB 6.0. If anything, it would have been written in C, C++ or assembler
- There is no comparison between those languages
- Stealing code is considered unethical or illegal
- Capitalisation is rather useful
- Your keyboard is not locked into the phrase 'pls'
- Posting your email is unwise for the following reasons:
- Spambots
- If you get the code, no-one else can learn from your question
|
|
|
|
|
VB6 is obsolete and unsupported. Why are you still using it ( or, that is, still trying to rip off code written in it ) ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi,
I program in lots of languages but a few days ago I have had a go at programming in VB.net 2008 (express edition for now).
I have got an application up and running but there is an odd difference between the "debug" and 'release" version.
Both work but when I activate the "OpenFileDialog" in the "Debug" version I get a nice size "open file" window that can easily be resized.
When I do the same in the "release" version I get an equally functional "open file" window but it is always "full screen" and cannot be resized at all.
I am new to "VB.NET" and I have looked in lots of places on the internet for a tip on this but have not found anything. Can anyone point me in the right direction ?
Any help much appreciated
|
|
|
|
|
Filip Dossche wrote: but it is always "full screen" and cannot be resized at all
Wow - never seen that and I can't see any settings that would control it. Are you using a dialog dropped on the form or creating it in code?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
It is just an "Openfile" dialog that was integrated in the "designer" page and is activated by clicking a button.
It is actually derived from the 'CommonDialogs' example that came with the VB2008.Net express installation. I have not changed anything to that except for adding some extra decoding and modifying the final file content after the file has been selected and opened.
A colleague told me it could have something to do with certain settings being preset by the VB.NET developers studio when you are running the debug version and those settings being different when the application runs on its own.
As you say though I have not found anything about "OpenFile" dialog size settings or similar.
Ah well, maybe somebody will make it "glaringly obvious once pointed out" .
|
|
|
|
|
hai all,
i am using dotnet 2005 and sql server2000.i have 2 table as follow
table name as bill
cutomercode billno capacity unitmodel rate
act 101 1 ton elite plus 10
act 122 1.5 ton vertix 32
tablename as unit
cutomercode billno capacity unitmodel indoorunit outdoorunit
act 101 1 ton elite plus 232 146
act 101 1 ton elite plus 258 231
act 122 1.5 ton vertix 465 521
act 122 1.5 ton vertix 112 101
act 122 1.5 ton vertix 178 104
here cutomercode,billno,capacity,unitmodel,indoorunit,outdoorunit,rate are columns.
i wrote a command in database expert in crystal report.i passed the parameter values of customercode and billno.
i have coming as follow in crystal report print page.
SLNO capacity unitmodel
1 1 ton elite plus
indoorunit:232
outdoorunit:146
2 1 ton elite plus
indoorunit:258
outdoorunit:231
3 1.5 ton vertix
indoorunit:465
outdoorunit:521
4 1.5 ton vertix
indoorunit:112
outdoorunit:101
5 1.5 ton vertix
indoorunit:178
outdoorunit:104
the above print is wrong.mistake is repeated datas.my client expect print like 1,2,3,4 for each data as follow.i want to display as follow in crystal report print page.
SLNO capacity unitmodel
1 1 ton elite plus
indoorunit:232,258
outdoorunit:146,231
2 1.5 ton vertix
indoorunit:465,112,178
outdoorunit:521,101,104
how to print these datas in crystal report.
|
|
|
|
|
Hi,
You can use a blank table in your Database.After executing a command you can save result of data in this table.After that easily u can access table from crystal report.
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
I am trying to convert a VB6 code to VB.net using VS2008. The program interfaces with excel and other programs and I have managed to get them to work ok, but get stuck when trying to call a dll I need. Have tried to follow examples without success. The dll is called NSGA2.dll and the function I want to use is called Initialize, it works fine with VB6 but not working with VB.net?
The VB6 code;
Option Explicit
Private Declare Function Initialize Lib "C:\Documents and Settings\My Documents\NSGA2.dll" (Ret1() As Double, Ret2() As Double)
Private Sub Command1_Click()
Dim Inputarrays(14) As Double
Dim DVArray() As Double
For i = 0 To 13
Inputarrays(i) = Text1(i).Text 'Takes the values from the form where there are 14 inputs
Next i
ReDim DVArray(Inputarrays(4) - 1, Inputarrays(0) - 1)
Call Initialize(Inputarrays, DVArray)
End Sub
The VB.net code;
Public Class Form1
Private Declare Function Initialize Lib "C:\Documents and Settings\My Documents\NSGA2.dll" (ByVal Ret1() As Double, ByVal Ret2(,) As Double)
Private Sub btnRun_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRun.Click
Dim InputArray(13) As Double
Dim i As Integer
Dim FileName As String
Dim DVArray(,) As Double
Call GetInput(InputArray) 'Calls a Sub which takes the values from the form where there are 14 inputs
ReDim DVArray(InputArray(4) - 1, InputArray(0) + InputArray(1) - 1)
Call Initialize(InputArray, DVArray)
End Sub
Any suggestions would be grateful.
|
|
|
|
|
Do you have the source for the NSGA2.dll? If so, you could debug the VB6 version while running .Net and attempt to see where the error is occurring.
Do the bounds on DVArray match the VB6 version prior to calling Initialize?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
I do have the original source code for the NSGA2.dll, however it was compiled in VC++6, which I don't have.
The bounds for DVArray for the VB6 version and the .net version are the same.
I'm not sure how I can debug the original source code from .net. The error I get from the .net debugger is "PInvoke restriction:cannot return variants." which occurs at the Call Initialize (InputArray, DVArray) step. It doesn't allow me to procede and therefore I can't actually go into the C++ code at all.
|
|
|
|
|
I've never tried passing a variant from VS6 to .Net. Its probably an interop problem with the variant return type. It doesn't look like your using the return value so could this be made a sub or return a simple data type instead? Of course this would recompiling the source, so you'd have to get a copy of VC++6.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hi All,
I am trying to read text from ListView of other application.
I have created a demo application which is working fine for all listview (FolderView/ Winzip Listview control and listview of some application), but it is not working for a particular Listview.
I am able to get the RowCounts/ Column Counts but I am not able to read text.
Below is my code which I am executing to get ListItem.
<pre>Private Const LVM_FIRST = &H1000
Private Const LVM_GETITEMCOUNT = (LVM_FIRST + 4)
Private Const LVM_GETITEM = (LVM_FIRST + 5)
Private Const LVM_GETSTRINGWIDTH = (LVM_FIRST + 17)
Private Const LVM_GETCOLUMN = (LVM_FIRST + 25)
Private Const LVM_GETITEMTEXT = (LVM_FIRST + 45)
strLength = SendMessage(hWindow, LVM_GETITEMTEXT, iItem, ByVal pMyItemMemory)</pre>
Above code is working fine for other listview, and strLength is returning currect length of text of the List item.
I tried to debug, and understand nature of window (Listview Window) and I observed that all other listview where it is working fine having Windows Proc as Unicode and for list where it is not working having Windows Proc as ANSI (I got this information using Windows Spy++ utility).
My understanding is to get listview item for ANSI strings there would be different message needs to pass.
I appreciate your time and thanking you for any help or direction.
Regards
Rushi
|
|
|
|
|
Good day!
I have this windows application where I have to compare two listboxes(data came from a .csv file) and output the "incorrect lines" into another listbox.
Listbox1 is the "original source", Listbox2 contains "tampered data".
Example:
Listbox1:
---------
| A | 1 |
---------
| B | 2 |
---------
| C | 3 |
---------
| D | 4 |
---------
| E | 5 |
---------
Listbox2 :
---------
| A | 1 |
---------
| C | 2 |
---------
| B | 3 |
---------
| D | 4 |
---------
| E | 5 |
---------
Listbox3 should only have an output of lines that are correct:
---------
| A | 1 |
---------
| D | 4 |
---------
| E | 5 |
---------
How can I compare data between Listbox1 and Listbox2 before appending the result to Listbox3?
Could any of you please provide some inputs?
Thanks in advance!
---$$$---
Just an update, here is my code for those who want to help me.
Private Sub btnOpenCSV_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpenCSV.Click
ofdOpenCSV.Filter = "All CSV Files|*.csv;"
If ofdOpenCSV.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim strPathString As String
Dim strTestString As String = ""
Dim strArrString As String()
Dim strCSVRollNumber, strCSVRFIDNumber As String
strPathString = ofdOpenCSV.FileName.ToString
Dim myStream As System.IO.StreamReader
myStream = File.OpenText(strPathString)
Try
While myStream.Peek() <> -1
strTestString = myStream.ReadLine()
strArrString = strTestString.Split(",")
lstCSVListBox.Items.Add(strArrString(0).ToString & " :: " & strArrString(1).ToString)
End While
Catch ex As Exception
End Try
btnOpenCSV.Enabled = False
lblCSVSuccesful.Text = "File has been loaded."
End If
End Sub
Private Sub btnOpenAPI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpenAPI.Click
ofdOpenAPI.Filter = "All CSV Files|*.csv;"
If ofdOpenAPI.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim strPathString As String
Dim strArrString As String()
Dim strTestString As String = ""
Dim strAPIRollNumber, strAPIRFIDNumber As String
strPathString = ofdOpenAPI.FileName.ToString
Dim myStream As System.IO.StreamReader
myStream = File.OpenText(strPathString)
Try
While myStream.Peek() <> -1
strTestString = myStream.ReadLine()
strArrString = strTestString.Split(",")
strAPIRollNumber = strArrString(1).ToString
strAPIRFIDNumber = strArrString(2).ToString
lstAPIListBox.Items.Add(strArrString(0).ToString & " :: " & strArrString(1).ToString)
End While
Catch ex As Exception
End Try
btnOpenAPI.Enabled = False
lblAPISuccesful.Text = "File has been loaded."
End If
End Sub
Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
'WHAT SHOULD I PUT HERE?
End Sub
modified on Thursday, April 2, 2009 11:38 PM
|
|
|
|
|
Do a for each compare and copy the dodgy item to listbox3
|
|
|
|
|
daveauld, thank you for your immediate response, can you give me a sample code for your suggestion?
Here is what my current code looks like:
Private Sub btnOpenCSV_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpenCSV.Click
ofdOpenCSV.Filter = "All CSV Files|*.csv;"
If ofdOpenCSV.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim strPathString As String
Dim strTestString As String = ""
Dim strArrString As String()
Dim strCSVRollNumber, strCSVRFIDNumber As String
strPathString = ofdOpenCSV.FileName.ToString
Dim myStream As System.IO.StreamReader
myStream = File.OpenText(strPathString)
Try
While myStream.Peek() <> -1
strTestString = myStream.ReadLine()
strArrString = strTestString.Split(",")
lstCSVListBox.Items.Add(strArrString(0).ToString & " :: " & strArrString(1).ToString)
End While
Catch ex As Exception
End Try
btnOpenCSV.Enabled = False
lblCSVSuccesful.Text = "File has been loaded."
End If
End Sub
Private Sub btnOpenAPI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpenAPI.Click
ofdOpenAPI.Filter = "All CSV Files|*.csv;"
If ofdOpenAPI.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim strPathString As String
Dim strArrString As String()
Dim strTestString As String = ""
Dim strAPIRollNumber, strAPIRFIDNumber As String
strPathString = ofdOpenAPI.FileName.ToString
Dim myStream As System.IO.StreamReader
myStream = File.OpenText(strPathString)
Try
While myStream.Peek() <> -1
strTestString = myStream.ReadLine()
strArrString = strTestString.Split(",")
strAPIRollNumber = strArrString(1).ToString
strAPIRFIDNumber = strArrString(2).ToString
lstAPIListBox.Items.Add(strArrString(0).ToString & " :: " & strArrString(1).ToString)
End While
Catch ex As Exception
End Try
btnOpenAPI.Enabled = False
lblAPISuccesful.Text = "File has been loaded."
End If
End Sub
Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
'WHAT SHOULD I PUT HERE?
End Sub
Thanks again!
|
|
|
|
|
I am writing a Visual Basic.Net 2005 desktop application that exports data to individual excel 2003 spreadsheets in separate workbooks. (The data is written to separate workbooks since the workbooks are emailed to different customers.)
I am exporting all the data I want to the spreadsheets now. However, I would like to know how to do any of the following:
1. Put the column headers on to the top of each data column.
2. How to put report headers on the first 3 rows of each spreadsheet,
3. How to set the wraparound property one column in particular. I have one column that is varchar(500) and I want this column to wraparound.
Thanks!
|
|
|
|
|
i am working on project which i developed for long time,
recently someone out in germany wanted to use my application,
so i made a few tests on my application on germany set regional info in windows )
then i found out they use a comma decimal separator which pretty much killed my application.
i never thought of that before , i have done some reading on the subject and a lot of people like the idea of CultureInfo.InvariantCulture. in every parsing or to string method in the application , how ever the project contains kazzillion lines of codes,
and i rather shoot my self then doing that.
i was looking for a way to set the, cultureinfo to en-us in the application level ,
found this example which didnt work for me:
<br />
CultureInfo myCulture = new CultureInfo("en-US");<br />
myCulture.DateTimeFormat.ShortDatePattern = "MM/dd/yyyy";<br />
Application.CurrentCulture = myCulture;<br />
also found that i can change it on a thread level which doesn't really help me.
please anyone with any tips or answer to how i can change the culture in application level , or any other alternative i would like to here , it would me alot thanks in advance!!!!!!!
Net
|
|
|
|
|
Hi,
AFAIK there is no way to fix the culture info for an entire app, you can only set it on the thread level using Application.CurrentCulture or Thread.CurrentCulture. And there not being a way is an indication you are not expected to need it either...
Here are some guidelines:
- you should not fix the culture info on input/output intended for human consumption; the user chooses the culture through the Regional Settings control panel and all the apps should obey that choice.
- you should fix the culture info for culture-invariant data storage such as databases, allowing international cooperation on such data. ISO 8601 sets the standard for these.
- Since threads can be involved in both human I/O and database I/O you can't possibly have it all automatically. Hence the suggestion to keep the threads at the regional settings, so human I/O is fine, and explicitly code for culture-invariant I/O where appropriate.
FWIW: object orientation should prevent any detail to appear a kazzillion times whatever the size of the app is.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I basicly have the same problem:
I was trying to set the CurrentCulture of my application to en-US. I used the following source code:
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
System.Threading.Thread.CurrentThread.CurrentUICulture = System.Threading.Thread.CurrentThread.CurrentCulture;
My solution consists in a HMI interface and a dll project. in the runtime mode, the HMI interface is set to en-US (had a label choing it each 1 second for test) but when executing things in the DLL project, I noticied that the CurrentCulture is getting back to fr-FR.
I read on the net that when creating threads, we have to change their CurrentCulture too but I'm not creating Threads. In other hands, I'm using delegates for the callbacks. Could they be the source of that?
For now, I'm forcing that by adding the 2 lines at the beginning of the procedure I'm using to get numeric input (which are using "." as separation). But this solution is not the best solution I guess.
Could anyone help me please?
|
|
|
|
|
You might not be creating threads explicitly and still be using threads, e.g. through the BackgroundWorker class or the ThreadPool class. And most asynchronous operations implicitly rely on the ThreadPool class, see my little article here[^].
Anyway, my previous reply remains valid. The only way out that I know of is by having each thread that works for you and needs your culture setting, to start with its culture getting set. Which means you might need that in your DataReceived handler of your serial port, and all the other asynchronous handlers you might have.
BTW: assuming changing the culture takes some time, you'd better add some flags so it gets set only once per thread.
|
|
|
|
|
Can you tell me how to Stop Resizing the VBAccelerator’s sGrid2 http://www.vbaccelerator.com/home/VB/Code/Controls/S_Grid_2/index.asp[^] Header when Column Width is out of range of Max width or Min Width?
When reaching the boundary of Max or Min Column Width, mouse don’t allow to move further to over the limits. I am trying to sendMessage when reach the end point but doesn’t work.
I can’t use bHandled = True when reaching the boundary, it will cancel the resizing action. I want to STOP resizing and mouse don’t allow to move further when reaching the boundary.
If lHDI(1) < m_lMinWidth(tHDN.iItem) And Not m_lMinWidth(tHDN.iItem) = -1 Then
lReturn = 1
bHandled = True
End If
If lHDI(1) > m_lMaxWidth(tHDN.iItem) And Not m_lMaxWidth(tHDN.iItem) = -1 Then
lReturn = 1
bHandled = True
End If
RaiseEvent StartColumnWidthChange(tHDN.iItem, lHDI(1), bCancel)
If bCancel Then
lReturn = 1
bHandled = True
End If
Here are the sGrid2 clsHeaderControl Subclass Code:
Private Sub myWndProc(ByVal bBefore As Boolean, _
ByRef bHandled As Boolean, _
ByRef lReturn As Long, _
ByVal lng_hWnd As Long, _
ByVal uMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long, _
ByRef lParamUser As Long)
Dim tNMH As NMHDR
Dim tHDN As NMHEADER
Dim lHDI() As Long
Dim bCancel As Boolean
Dim bForceManualDragDrop As Boolean
Dim sFilter As String
Dim sx As Single
Dim sy As Single
Dim tP As POINTAPI
Dim tGRedraw As NMLVCUSTOMDRAW
Select Case lParamUser
Case exParentWindows
Select Case uMsg
Case &H4E 'WM_NOTIFY
CopyMemory tNMH, ByVal lParam, LenB(tNMH)
Select Case tNMH.code
Case HDN_BEGINTRACKA, HDN_BEGINTRACKW
CopyMemory tHDN, ByVal lParam, Len(tHDN)
'
|
|
|
|
|