|
Yes, I know the usage of Shared in VB.NET, but as far as this keyword existed in QBasic (long time ago!) I thought it might be used in vb6 (which was not very wrong, because vb6 IDE recognized it and removed it...)
But if it is the case that Dave mentioned, and I cannot expect such behavior from vb6, I guess I should do the Public Member in a module method...
Thanks anyway....
|
|
|
|
|
MohammadAmiry wrote: this keyword existed in QBasic
My mistake then.
Wow, it's been over 10 years since I've used QuickBasic. I can barely remember it now.
MohammadAmiry wrote: But if it is the case that Dave mentioned, and I cannot expect such behavior from vb6, I guess I should do the Public Member in a module method.
I just tried placing a Static variable inside of a VB6 class method. That way we can have it return a static object reference to a variable container. Unfortunately, it's not static between object instances.
Bummer! It looks like you have to use a Module.
|
|
|
|
|
Hi,
This is kiran
Like I four textboxes in my vb.net application and i want to display textbox controls data in tabular form in word document
plz any one help me
kiran
mailme@ vk_ravula@yahoo.com
|
|
|
|
|
can any one tell me the code at button_click event to trasfer data fro datagrid to excel sheet
mail at toneeraj.kumar@rediffmail.com
thankyou
neeraj kumar
|
|
|
|
|
1) Please use descriptive subjects - every post here is a "problem" of some sort
2) Please do not expect a private response from a public board - answers are posted here for everyones benefit
3) Please describe the problem fully, including relevant code, exception messages etc.
|
|
|
|
|
go to following link
http://www.codeproject.com/aspnet/ExportClassLibrary.asp
Shipra Pandey
Software Developer
Solversa Technology Pvt Ltd.
|
|
|
|
|
Hi,
I need an application, that read the document template (.dot) data and make those values as for my future reference.
Any help to read .dot file thru vb.net.
Thanks in Advance.
Be simple and Be sample.
|
|
|
|
|
hi,
we need to put ,some value in matrix report which is actuly based upon some calculation factor.
for example : martix is based upon the count of x value but we wish to refelect matrix value as x*factor
thanks
vipin
|
|
|
|
|
hi friends i am working on a vb.net project which uses access as db.I have to move the value in a date textbox to an access db when user click a button.I have set the text box text as dateobj.today().It returns date okay but when i transfer it into the data base it looks weird...sometimes it shows absolutly wrong dates(like 1899,1900 etc) BTW the dataype in access database is date/time.I am using access 2003...what am i doing wrong..?
|
|
|
|
|
Are you insterting the date into access in US format? ie mm/dd/yyyy
|
|
|
|
|
oh ok I'll remove it.
-- modified at 6:46 Wednesday 19th April, 2006
|
|
|
|
|
Does any easy method to to embed to IE6 into my form ?
Thank you!
|
|
|
|
|
Yes you can. If you are using .NET 2.0, you can use the inbuilt WebBrowser Control. If you're using .NET 1.1 or .NET 1.0, you can use the WebbrowserEx Control.
Yuvi Panda T
Microsoft Student Partner
Blogs at : http://yuvipanda.blogspot.com
|
|
|
|
|
into a function looking like this :
setStatus(id as Integer, Status as System.Nullable(of Short))
The function is automaticly created in the DataSet-designer for "INSERT INTO Status ...."
Regards // Maw
|
|
|
|
|
Null is called Nothing in VB.
---
b { font-weight: normal; }
|
|
|
|
|
Hrmmmz ...
If I want to use C#? how about it then?
//Maw
|
|
|
|
|
Then null is called null.
---
b { font-weight: normal; }
|
|
|
|
|
Hi guy's i want to set a grammer check and spell check in my text box control can i do this using visual basic 6 or .Net.
Sasmi
|
|
|
|
|
go to following link u will get code
http://www.devcity.net/Articles/89/1/spellcheck.aspx
Shipra Pandey
Software Developer
Solversa Technology Pvt Ltd.
|
|
|
|
|
Dear Sir,
I have taken a combo box in datagrid. that combo box allows the user to write in it. please tell me the code to stop the user to write anything in it.
code is :-
Private Sub CboUom(ByVal sender As System.Object, ByVal e As System.EventArgs)
Try
Dim cbo As New ComboBox
cbo = CType(sender, ComboBox)
dgrdItems.Item(dgrdItems.CurrentCell.RowNumber, dgrdItems.CurrentCell.ColumnNumber) = cbo.Text
dgrdItems.Item(dgrdItems.CurrentCell.RowNumber, dgrdItems.CurrentCell.ColumnNumber + 1) = CInt(cbo.SelectedValue.ToString)
Catch ex As Exception
clsXmlMessages.ShowError(ex.Message)
End Try
End Sub
please help.
Gurpreet
|
|
|
|
|
No code at all.
In the combobox properties, the DropDownStyle is probably set to "DropDown". Change it to "DropDownList".
Roy.
|
|
|
|
|
I havent taken combobox in datagrid...i think, u havent seen my code.
I am taking combobox like this.....dim tempcom as new combobox which will be converted into textbox after user lost its focus. and when we try to write smthing in dropped down combobox...after leaving the box...textbox comes and written word are displayed there instead of chosen field.
so, dont have property window.
please try to help me out.
thanks
Gurpreet
|
|
|
|
|
i have a problem.
In my code ,while design mode of project code work propperly.
when i make the exe & install & run it code doesn't work.
in my code i m doing a simple task.
i change the directory ,
call cmd.exe
& run a different file.
here on my cmd prompt
|
|
|
|
|
So... where's the point at which your problem occurs? Posting your code will make a huge difference to the help you get on this forum.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
the way i am sending the code may be wrong, i don't know how to send code on forum but i am trying
the code is as follow
it has 2 forms
' the code for module 1
Module Module1
Public Make As frmMakeCode
End Module
------------
code for frm1 ,it has 1 textbox ,one button
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ChDir(TextBox1.Text)
If Make Is Nothing Then
Make = New frmMakeCode()
Else
End If
Make.CommandText.Text = "make"
Make.run()
End Sub
'------------i am having one class ,code for class is as follow
Imports System.IO
Imports System.Diagnostics
Public Class CmdProcessor
Public Sub Execute(ByVal command As String)
_process = Me.InitializeProcess(command)
_executing = True
_process.Start()
Me.AttachStreams()
Me.PrepareAsyncState()
_standardOutput.BaseStream.BeginRead(_outputBuffer, 0, _outputBuffer.Length, _outputReady, _outputState)
_standardError.BaseStream.BeginRead(_errorBuffer, 0, _errorBuffer.Length, _errorReady, _errorState)
End Sub
Public Event TextReceived As CmdProcessorEvenHandler
Private Function GetStartInfo(ByVal command As String) As ProcessStartInfo
Dim psi As New ProcessStartInfo()
psi.FileName = "cmd.exe"
psi.Arguments = "/c" + command
psi.UseShellExecute = False
psi.RedirectStandardError = True
psi.RedirectStandardOutput = True
psi.CreateNoWindow = True
Return psi
End Function
Private Function InitializeProcess(ByVal command As String) As Process
If (_executing) Then
Throw New ApplicationException("Another process is currently executing")
End If
_process = New Process()
_process.StartInfo = GetStartInfo(command)
_process.EnableRaisingEvents = True
AddHandler _process.Exited, AddressOf _process_Exited
Return _process
End Function
Private Sub _process_Exited(ByVal sender As Object, ByVal e As EventArgs)
Dim exitCode As Integer
exitCode = _process.ExitCode
RaiseEvent TextReceived(Me, New CmdProcesserEventArgs(exitCode.ToString()))
_process.Dispose()
_process = Nothing
_executing = False
End Sub
Private Sub AttachStreams()
_standardOutput = _process.StandardOutput
_standardError = _process.StandardError
End Sub
Private Sub OutputCallback(ByVal ar As IAsyncResult)
Dim state As AsyncState
state = DirectCast(ar.AsyncState, AsyncState)
Dim count As Integer
count = state.Stream.BaseStream.EndRead(ar)
If count > 0 Then
Dim text As String
text = System.Text.Encoding.ASCII.GetString(state.Buffer, 0, count)
RaiseEvent TextReceived(Me, New CmdProcesserEventArgs(text))
state.Stream.BaseStream.BeginRead(state.Buffer, 0, state.Buffer.Length, _outputReady, state)
End If
End Sub
Private Sub PrepareAsyncState()
_outputReady = New AsyncCallback(AddressOf OutputCallback)
_outputState = New AsyncState(_standardOutput, _outputBuffer)
_errorReady = New AsyncCallback(AddressOf OutputCallback)
_errorState = New AsyncState(_standardError, _errorBuffer)
End Sub
Private _executing As Boolean
Private _process As Process
Private _standardOutput As StreamReader
Private _standardError As StreamReader
Private _errorBuffer(512) As Byte
Private _outputBuffer(512) As Byte
Private _outputReady As AsyncCallback
Private _outputState As AsyncState
Private _errorReady As AsyncCallback
Private _errorState As AsyncState
Class AsyncState
Public Sub New(ByVal stream As StreamReader, ByVal buffer As Byte())
_stream = stream
_buffer = buffer
End Sub
Public ReadOnly Property Stream() As StreamReader
Get
Return _stream
End Get
End Property
Public ReadOnly Property Buffer() As Byte()
Get
Return _buffer
End Get
End Property
Protected _stream As StreamReader
Protected _buffer As Byte()
End Class
End Class
Public Delegate Sub CmdProcessorEvenHandler(ByVal sender As Object, ByVal e As CmdProcesserEventArgs)
Public Class CmdProcesserEventArgs
Public Sub New(ByVal text As String)
_text = text
End Sub
Public Property Output() As String
Get
Return _text
End Get
Set(ByVal Value As String)
_text = Value
End Set
End Property
Protected _text As String
End Class
------------
the code for frm makecode is as follow
cod start here
Private Sub GoButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GoButton.Click
msgF = False
showmsgF = True
k = 0
Me.OutputTextBox.Text = String.Empty
Dim cmd As New CmdProcessor()
AddHandler cmd.TextReceived, AddressOf Me.cmd_TextReceived
cmd.Execute(Me.CommandText.Text)
End Sub
/**************
this code work at design time , but at run time it fails
|
|
|
|