|
Can you give me examples about split method in this line
200041511 john 1899/02/02
how to split 9 digit for idno then after 9 digit split 15 digit for name then after 9+15=24 split 10 digit for berth date ?
|
|
|
|
|
I have written a Windows Service in VB.NET 2005 for the purpose of logging data from a nursecall system. The data is written to a SQL database. It is important to know when logging has started and stopped and this is done by writing an entry to the database each time one of these events occurs. This is happening now when the service starts automatically on system startup. The 'stop' entry is even written in the event that the service is stopped manual (not something that would normally be done).
However, if the system is closed down, the OnStop sub is not being executed.
It looks like I need to detect a System Shutting Down event from within my code and then execute Me.Stop, forcing the OnStop sub to execute.
Can anyone help in suggesting how to detect that a system has commenced shutting down?
|
|
|
|
|
|
How to Write Text in currently opened cmd window?
I am using writeConsole function. What Handle i have to give as a parameter.....
Jothi Murugeswaran.S
|
|
|
|
|
i have the following string that i have passed to notepad
Private Sub PrintNotepad()
Dim MySecurity As New MajiDll.Security
Dim strCode As String
Dim myNum As Integer
strCode = strCode & " NYERI WATER AND SEWERAGE COMPANY LIMITED {ENTER}"
strCode = strCode & " P.O Box 1520 {ENTER}"
strCode = strCode & " TEL 2034548,2034617,2034623{ENTER 2}"
strCode = strCode & " DATE : " & Format(Date, "dd-mm-yy") & "{ENTER}"
strCode = strCode & " TIME : " & Format(Time, "hh:mm:ss") & "{ENTER}"
strCode = strCode & " NAME: " & lblname.Text & "{ENTER}"
strCode = strCode & " ACCOUNT NUMBER: " & txtAccNo & "{ENTER}"
strCode = strCode & " PAYMENT FOR : " & cboFundType & "{ENTER}"
strCode = strCode & " AMOUNT RECEIVED : " & txtAmntReceived & "{ENTER}"
strCode = strCode & " AMOUNT CHARGED : " & txtAmountApply & "{ENTER}"
strCode = strCode & " CHANGE : " & lblbal & "{ENTER}"
strCode = strCode & " The Sum of Kshs: " & MySecurity.numConverter(txtAmountApply, "Shillings") & ""
Shell "Notepad.exe", vbNormalFocus
SendKeys strCode, True
End Sub
Could some one out there help me in printing it directly to a printer as it first opens the notepad then u have to click print for it to print
briogene
|
|
|
|
|
Email me on
code {at} osdirect dot com dot au
and I will send you over a class that will help with the printing...
Cam
|
|
|
|
|
briogene wrote: SendKeys strCode, True
After this can't you send the Ctrl and P keys to execute the print command.
hope it help !
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
Hi,
I want to change language of the system thru VB code?can any one give me some idea how to do this?
thanx in advance.....
birajendu
CyberG India
Delhi
India
|
|
|
|
|
How can i create a vpn connection using code of vb.net??????????
What changes should be done in settings of computer?
Any idea would be appreciated
|
|
|
|
|
Hi all,
Please give me some guidance to solve this problem
Thanks with anticipation
|
|
|
|
|
Hi all,
I am adding items to the propertygrid using this method. I have a enumeartion type called Fruit
[code]
Private Enum Fruit
Apple = 1
Banana = 2
Orange = 3
Peach = 4
Pear = 5
End Enum
[/code]
and using this method to add the items to the grid.
[code]
bg.Properties.Add(New PropertySpec("Vijay", GetType(Fruit)))
[/code]
Here the PropertySpec construtor has the following function
[code]
Public Sub New(ByVal name As String, ByVal type As String)
Me.New(name, type, Nothing, Nothing, Nothing)
End Sub
[/code]
The first method wokred well. Now I am trying to add the items the grid using array list. But it is displaying the dropdown list.
[code]
Dim lst As New ArrayList
lst.Add("Vijay")
lst.Add("Ashok")
lst.Add("vijy")
bg.Properties.Add(New PropertySpec("Vijay",lst.Getype ))
[/code]
What could be the problem.Can some one help
|
|
|
|
|
Are you still having trouble with this?
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
Hi I have developed a project in vb6 and converted it to vb.net 2005 Express edition, fixed the issues after conversion, also did some more development wok.
Now after completion of the when I built a release I am not able to install it on client’s place. Tried running application from the exe n debug folder by coping the entire folder on the clients machine but it effused to work..
What I am suspecting is that there is some dependencies from VB6 installation but I am not able to figure it out
What should I do?
Nishkarsh
|
|
|
|
|
Seems more likely that the .NET framework is not installed on the target machine.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
.net framework is installed in the target machine...
The application works fine if i also install VB6 in the target machine.. That made me sure that there is a issue of VB6 references and dlll
|
|
|
|
|
Hi all,
I am working in vb.net,In my application i want to display combobox in a column of datagridview so that the user can select a item of combo,so i used this code:-
Me.DataGridView2.DataSource = Me.ds.Tables(0)<br />
<br />
With DataGridView2<br />
<br />
Dim cmbcol As New DataGridViewComboBoxColumn<br />
<br />
With cmbcol<br />
.DataPropertyName = "emp_id"<br />
.HeaderText = "emp_name"<br />
.Width = 80<br />
.DataSource = ds.Tables(0)<br />
.ValueMember = "emp_id"<br />
.DisplayMember = "emp_name"<br />
End With<br />
.Columns.Add(cmbcol)<br />
End With
But there are some problems
1> First of all i am using dataset binding and i want to display this combobox in second column but it is displayed at the end of all columns.
2>Second is selection of the item of combobox is not properly worked,i need to use emp_id when user select the name of employee in combobox of datagridview
Any idea would be appreciated heartly
Thanks with anticipation
-- modified at 1:40 Tuesday 13th November, 2007
|
|
|
|
|
Have you solved this?
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
MDI_FORM CAPTION IN RIGHT HAND SIDE IN VB6.0
MY CODING IS
<br />
MDIFORM1.CAPTION = "MAIN FORM"<br />
THIS CODE GIVES ME THE CAPTION ON LEFT HAND SIDE.
THANX IN ADVANCE!
PRIYA
|
|
|
|
|
ADD LOTS OF SPACES !!!
Please don't shout. Why are you using VB6 ? It's a dead language.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: It's a dead language
Obviously not judging by the amount of posts to this forum, regard VB6, although I do believe it should be taken outside and shot.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Steven J Jowett wrote: VB6, although I do believe it should be taken outside and shot.
Good one
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
Priya its very simple look at below:
MDIFORM1.CAPTION = " MAIN FORM"
pad spaces before text
Thanks,
Irfan Baig.
irfibaig@hotmail.com
|
|
|
|
|
I liked that kids 'ghost writer' idea. He might of been tired and cranky or just an emo. Whatever. Anyways, I wrote the code to make the 'ghost writer' to work but I would like to write code inside of my string. Example: in the middle of the 'ghost' writing a sentence, the writing stops and a msgbox would pop up. When you hit OK the writing would resume typing. How would I do that?
Static y As Integer
y = y + 1
Dim GhostText As String = "A msgbox should pop up here=>. and then I would Click OK and it would resume typing the rest of this. "
If y <= GhostText.Length Then
Me.Label1.Text = GhostText.Substring(0, y)
Else
Me.Timer1.Stop()
' Dim form3 As New Form2
' Me.Hide()
' form2.Show()
End If
|
|
|
|
|
You could come up with one or two escape characters that switch modes, as in:
Dim GhostText As String = "You soon will see a messagebox. [here it is!] Did you see it?"
and adjust your code accordingly.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Ok this does not sound like it would be hard but i can not get it to work. I am trying to just open a file in vb.net from say c:\temp\abc.jpg or .doc or whatever. I just want to give the program a file location and just have it open it with the default program assigned to that file type.
|
|
|
|