|
I am using vb6 to develop a client server applications. At installation site there are nearly 50 pcs using the application which is installed on each pc. But when there are changes in the application and a new executable file is prepared I need to install it again on all the pcs. Is there any way by which i can install the executable file on all the pcs instead of physically going to each pc ? or can i share the executable file that resides at a centralized location ? Please help me out
SL Tan
|
|
|
|
|
You could place the Exe on a centeralized location. Like a server. Then map a drive to that folder on each of the PC's. Then update you short cuts to point to the mapped drive. This way when a new exe comes out all you have to do is replace the one exe. Also you will need to install all of the exe's dependancies on the other machines.
NOTE: if the app has per user settings that are saved to a ini file, those settings need to be saved in a unique manner for each user. This can be solved in a number of ways.
Forever Developing
|
|
|
|
|
Hi all,
i am writing an IDE like visual studio .Net. i want to produce the same effect as vs.net provide like when you drag and drop a control on a form it appears and if you want to adjust the location of this control you can use the mouse to drag and drop it to any location. i have successfully done every thinig accept that the selection frame. on my mousedown event when selection frame is drawn it goes behind and hides. i want to take it on top i mean it should not hide behind any control instead it should be the top most element when user is grabbing it and moving her mouse. can any body help in this regard. tested code will be plus for me .
Thnx.
|
|
|
|
|
Hi All,
Im designing an complaints application on VB.Net,
Im trying to make the Tab Moves from one field to another when i Press
Enter Key,
any One can help,
If anybody know's sites for free VB.Net code in Order to Learn More and More
Thanks in Advance
Loolita
|
|
|
|
|
Trap the keypress and if it's the enter key move to the next control:
Private Sub TextBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp
If e.KeyCode = Keys.Enter Then
MyControl.Focus()
End If
End Sub
Hope this helps
Tom
|
|
|
|
|
Good Day,
Thank you Very much it realy Wroks,
Just i have a wonder whether we can put such Code on the Form Level,
if e.keycode=keys.enter then
" focus=focus.nextfield",this what i mean.
in order not to put the same code for each control.
|
|
|
|
|
I have applied a similar solution.
However, every time I press the enter key everything works ok BUT the system gives a beep sound.
Does anyone know why this is and how to stop it?
Thanks
|
|
|
|
|
No panic!!!
This was resolved by the following:
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then
TextBox2.Focus()
e.Handled = True
End If
End Sub
|
|
|
|
|
hello
i wish program a button that will move another button to a specific location
i try to make it more simple
there are 2 buttons A & B
when button A is pressed, button B will move away from button A so that button A's sub button could be display
i can manage the sub button part but was unable to move button B to a specific location because i dont know the coding that will do the task
can you please help me?
if this type of program or coding is impossible, please tell me, so i can drop my intention to do this function.
thank you in advance
p.s. below is a visual example of the thing i wish to do
"before button A is clicked"
Button A
Button B
"after button A is clicked"
Button A
Button B
Gary
|
|
|
|
|
I do not syntax of VB.Net, but in C# the above can be done as below
this.button2.Location = new Point(this.button2.Location.X, this.button2.Location.Y + 10);
Read about the Location Property of the class System.Windows.Forms.Button on msdn, This property is being inherited from Control . You get all relevent details.
Best of luck.
Regards,
Jay
|
|
|
|
|
dear gary it is very simple in .net. if i would have been at your place i should do it in this manner.
place button A then place a textbox with multiline property set to be true also make it invisible now put a new button button B. leave it i m giving you the entire code use it and remember me in your prayers.
Public Class FrmMoveButton
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Button2 As System.Windows.Forms.Button
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Button2 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(4, 14)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(112, 28)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Button1"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(6, 44)
Me.TextBox1.Multiline = True
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(110, 48)
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = "please provide co-ordinates in (x,y) format dont forget paranthasis"
Me.TextBox1.Visible = False
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(6, 44)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(110, 30)
Me.Button2.TabIndex = 2
Me.Button2.Text = "Button2"
'
'FrmMoveButton
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Button1)
Me.Name = "FrmMoveButton"
Me.Text = "FrmMoveButton"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Visible = True
Button2.Location = New System.Drawing.Point(TextBox1.Location.X, TextBox1.Location.Y + TextBox1.Size.Height + 10)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim loc As New System.Drawing.Point(0, 0)
Dim arr(2) As String
Dim str As String
Try
str = Microsoft.VisualBasic.Mid(TextBox1.Text, 2)
str = Microsoft.VisualBasic.Left(str, str.Length - 1)
arr = Microsoft.VisualBasic.Split(str, ",")
Button2.Location = New System.Drawing.Point(CInt(arr(0)), CInt(arr(1)))
Catch ex As Exception
MsgBox("I think you ddnt provide the value in form (x,y)")
End Try
End Sub
End Class
|
|
|
|
|
wow....
thanks ehmed..i will dream hahaha
sorry for the late reply....
my motherboard got fried
i will try out this code
thanks again
Gary
|
|
|
|
|
<b></b>Hi all, I am new to VB.Net and need help. I want to write some code that will set a environment variable in DOS that I can use within DOS - or more precisely I want to create a command line exe file that will set a variable called mydate equal to today’s date in yyyymmdd format. The full code would be most welcome if possible.
Regards
wrh
|
|
|
|
|
hey a word of advice. don't ask people to write code for you it will piss them off. seriously, Just read the reply to the thread a few threads below yours. it is labeled;
please help me by telling me the code to the following problem.
so just a suggestion; change the wording on your next thread.
happy holidays
|
|
|
|
|
I have two tables in my xmlfile table0 and table1.table0 has 5 columns; itemid, checkno, payee, amount, & date. table1 has only one column; balance I need the tables to be joined together so that instead of my datagrid showing only table0 it will show both table 0 and 1. so since table0 is the first 5 columns i need to get table1 to be the 6th.the reason for this is because later on i am going to try to get amount from table0 to subtract from balance in table1 and the sum will end up in the balance column of the next row . this will eventually need to happen over and over again(loop). can anyone help me with joining these it would be greatly appreciated.
happy holidays
|
|
|
|
|
There should some common columns in both the tables to join, If you wish to join the tables. Table1 should have some primary key like itemId, and should become the Master Table. I would advice u to add the column in Table1.
Finally, It should be like
Table0
-----
ItemId
CheckNum
Payee
Amount
PaymentDate
Table1
-----
ItemId
Balance
Finally the query will be
Select A.ItemId, A.CheckNum, A.Payee, A.Amount, A.PaymentDate, B.Balance
From Table0 A, Table1 B
Where A.ItemId = B.ItemId
|
|
|
|
|
Also, make sure that Table0.ItemID is a unique primary key, or you'll potentially introduce data integrity issues.
if you want my opinion, there is no reason why your balance column should not be included inside of table0. If it is a true one to one relation like that then there is no need to create two tables and join them as that's just more overhead for your server to handle every time you request it and is just plain un-clean datbase design.
However if the balance is a one-to-many relationship, like a date range, then you'd need to include that column in table1.
given what you're saying there's just no need to include the balance column in a seperate table
'Cause I'm living on things that excite me, be it pastries or lobsters or love... I'm just trying to get by, being quiet and shy, in a world full of push and shove...
Jimmy Buffett - The Wino and I know
|
|
|
|
|
Please reply to Mr. beginner1 , By mistake your reply has come to me.
BTW, Thanks for added attension.
Regards,
Jay
|
|
|
|
|
So even if I want to make payee from table0 subtract from balance I can still do this if balance is included in table0?
Thanks
|
|
|
|
|
My mistake I meant amount subtract from balance not payee. so this will still work even if They are in the same table?
Thanks
|
|
|
|
|
Hi.
I really hope someone can help me on this as I have had headaches during the past few days trying to figure it out.
In VS.NET 2003, I create a Crystal Report called Customers.rpt using data from Northwind database on DEV_SERVERONE server. In my code this is how I load the report into the Crystal Report viewer on a Windows Form:
Dim UID, PWD, SRV, DTB as string
'read settings from the config file
UID = Configuration.ConfigurationSettings.AppSettings.Item("UID")
PWD = Configuration.ConfigurationSettings.AppSettings.Item("PWD")
SRV= Configuration.ConfigurationSettings.AppSettings.Item("SRV")
DTB = Configuration.ConfigurationSettings.AppSettings.Item("DTB ")
Dim rep As New Customers 'create new instance
rep.SetDatabaseLogon(UID,PWD,SRV,DTB) 'set the DB logon settings Me.CrystalReportViewer1.ReportSource = rep ' load the report
On my development machine, this code works seamlessly. When I deploy this application elsewhere, Crystal Reports opens up a dialog and prompts me for these settings. All the settings in the app.config on the customer's machine is ok. I am using SQL Server 2000 and VB.NET.
Please help me if you can because this is driving me nuts The worst part of it all is that according to MSDN, my code is supposed to work. I do not have that much experience with Crystal, so please give me some assistance if you can.
Thanks
Terrence J. Joubert
RUS Pty Ltd
|
|
|
|
|
I'm not sure how different the 2003 version is from the 2002 version but here's how you do it in VB.NET 2002:
Dim Rep as New MyReportFile() 'Class wrapper for Crystal report file
Dim MyLIS As New CrystalDecisions.Shared.TableLogOnInfos()
Dim MyLI As New CrystalDecisions.Shared.TableLogOnInfo()
Dim i as Integer
For i = 0 to MyRep.Database.Tables.Count - 1
MyLI = MyRep.Database.Tables(0).LogonInfo
MyLI.UserID = [User ID as String]
MyLI.Password = [User Password as String]
MyLI.ServerName = [SERVER Name as String]
MyLIS.Add(MyLI)
next
CrystalReportViewer1.LogOnInfo = MyLIS
............
'Cause I'm living on things that excite me, be it pastries or lobsters or love... I'm just trying to get by, being quiet and shy, in a world full of push and shove...
Jimmy Buffett - The Wino and I know
|
|
|
|
|
I have several classes in my project that I need to persist as XML. I achieved this by using serialization - I have load/save function in each class. Since I'm using the same routines in each class, it makes more sense to me to create a class with these routines in it, and then derive each class from this one. With me so far?
So, here is my base class (which the other classes will derive from):
Imports System.IO
Imports System.Xml.Serialization
Public MustInherit Class XMLSerializationBase
Public Sub SavetoXML(ByVal Filename As String)
Dim writer As StreamWriter = Nothing
Try
Dim ser As XmlSerializer = New XmlSerializer(Me.GetType)
writer = New StreamWriter(Filename)
ser.Serialize(writer, Me)
Catch ex As Exception
Dim strErr As String = String.Format("Unable to save file. Error: ", ex.Message)
MessageBox.Show(strErr, "File Save Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally
If Not writer Is Nothing Then writer.Close()
writer = Nothing
End Try
End Sub
Public Function LoadfromXML(ByVal filename As String)
Dim reader As StreamReader = Nothing
Try
Dim ser As XmlSerializer = New XmlSerializer(Me.GetType)
reader = New StreamReader(filename)
Dim o = CType(ser.Deserialize(reader), XMLSerializationBase) '<------ HERE IS THE PROBLEM
If o Is Nothing Then Throw New NullReferenceException("Invalid file")
Return o
Catch ex As Exception
Dim strErr As String = String.Format("Unable to load file. Error: ", ex.Message)
MessageBox.Show(strErr, "File Open Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally
If Not reader Is Nothing Then reader.Close()
reader = Nothing
End Try
End Function
End Class
Ok, so here is the problem When I deserialize the info, I need to convert it into a type of class - whatever type of class the base class is. So what I really want to do is this:
Dim o = CType(ser.Deserialize(reader), Me)
The problem is, this doesn't work - the IDE won't accept it. I also tried MyBase, Me.GetType, MyBase.GetType - none of these work, the IDE says that the object is not defined, or that it is an invalid type.
How to I tell CType to convert the info to whatever type of class my base class is???
-Todd Davis (toddhd@gmail.com)
|
|
|
|
|
Hello,
I want to create an OCX file using
Visual Basic .NET
How can I do that?
Best Regards.
Happy Christmas.
Thanks.
|
|
|
|
|
You can't. The VB.NET compiler will not target an OCX. You'll need to use VB6 or unmanaged C++ for this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|