|
Hi if you are familiar with Visual basic then it's so easy to creat that kind of software .
At first your must to know all atribute . Make a design of data base
E-R diagram depand on your requrement.
First : you design the diagram and make relation with all entity (
Entity-Relationship Model )
Second : Make form depand on those table you made and relationship of model ( You must to make a table of user name and password and make relation with users )
Then it will be more easy.
If You want source code or if you want sample Please write would try to reply you as soon as possible
Good luck
|
|
|
|
|
Thanks for replying, i managed to get help. Thanks again,
Malcom
|
|
|
|
|
I've looked at several examples (not the database piece yet for capturing the "Yes" instances) and put together the code listed below. In a prior version of code also in the ItemSend Object the user is presented with the message box like I want and if they select "No" the E-Mail message is not sent.
However, when I tried to modify the code (see below) I get the Microsoft VB error:
"Run-time error '424' Object Required
Can someone help me correct my code statement and also let me know if I have the correct syntax for searching the body of the E-Mail message. I created a test E-Mail message with "Joe" in the body of the message. If I can't figure out the database piece, is the only option I have hard coding the names of all the restricted employees?
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim olMail As Outlook.MailItem
Set olMail = olapp.CreateItem(olMailItem)
Dim blnExecute As Boolean
If InStr(olMail.Body, "Joe") <> 0 Then
blnExecute = CBool(MsgBox("You are sending " & _
"or forwarding an E-Mail message from a " & _
"restricted employee, do you wish to " & _
"continue?", vbYesNo, "Rule Execution") = vbYes)
If blnExecute = True Then
'Eventually want some code to capture that
'the end-user chose to send the E-Mail
'message.
ElseIf blnExecute = False Then
Cancel = True 'this will cancel the send
End If
End If
Thanks for your help as always.
axla
|
|
|
|
|
Hi, I just need code that I have 4 column A B C D in Ms-Excel
In VB Form I had list first 2 columns value in Combo Box
& 3rd column is also combo Box containing “Auto & Manual”
4th column is sum of column A & B
In VB form there is Text Box in which the Answer or the Sum “column D” must be shown
But I don’nt know what code use for Text box or Auto Manual combo box to display column D in Text box
Thanks & regards:
Muhammad Ata-ul-haq Sultani
|
|
|
|
|
Plz post your problem in detail, so that i could solve it. It is not too hard to read data or record from excel sheet.
|
|
|
|
|
In short when I select Auto from combo box I need the values(which are in column D in excel) in text Box
|
|
|
|
|
hi, im new-ish to vb
im currently pseudocoding a program for sorting some data. the data is pulled from file or database, then compared against some fields in another file or db, then put into an array. the initial data has 5 fields, the second has 8, and the result has 2 fields. at the moment its 400+ entries with 40-60 groups with 4-8 comparisons for each
what i am endlessly confused about is if a 5D array "appears" the same as a db table with 5 columns or if it more closely resembles a black hole (so i can visualise it a bit easier) and whether it would be easier to code 5 x 2D arrays for the data and another 8 x 2D for the tests
oh, and which method is more efficient
-N
note: i have completed the file>array bit and can compare two arrays
|
|
|
|
|
IMO a database table is a one-dimensional array holding rows; each row holds fields of different types, something an array isn't capable of in most languages.
In C#, C/C++, or VB.NET a row could be represented by a class or struct, where each field corresponds to one field of the datatable row.
Do not use multi-dimensional arrays if you don't really need them, and don't use parallel one-dimensional arrays either: use more structured data, as in an array of structs/classes.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
thats very useful
thanks for the fast reply
|
|
|
|
|
you're welcome.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
This is a stub version of the actual problem.
Here are two files. Form1.vb, which looks like this:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim myIKGrid As New IKGrid
myIKGrid.Columns(0).Caption = "English"
myIKGrid.Columns(0) = "Zero"
End Sub
End Class
You cannot modify Form1 for any reason whatsoever.
The other file is IKGrid.vb. It looks like this:
Public Class IKGrid
Public Property Columns(ByVal s As Short) As IKColumn
Get
Return Nothing
End Get
Set(ByVal value As IKColumn)
End Set
End Property
End Class
Public Class IKColumn
Public Property Caption() As String
Get
Return ""
End Get
Set(ByVal value As String)
End Set
End Property
End Class
You can modify IKGrid any way you please.
Anyway, this code results in a compile error. The line:
myIKGrid.Columns(0) = "Zero"
causes
Value of type 'String' cannot be converted to 'IKColumn'
So, how can you modify the IKGrid file so that the String CAN be converted to an IKColumn? The project doesn't need to do anything useful, it just needs to be able to compile without errors.
|
|
|
|
|
i_kant_spel wrote: The project doesn't need to do anything useful
Interesting prospect.
From myIKGrid.Columns(0) = "Zero" it would seem IKGrid.Columns[] is a string array, however you can't get myIKGrid.Columns(0).Caption = "English" right since a string doesn't have a Caption property.
Hence, IKGrid.Columns must be a type that has a Caption property, and has an override for the = operator.
The remainder is left as your homework.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Override for the = operator? Only in C++ where nothing means anything because everything can be overriden. There are not overrides for assignment in .NET (or VB6 for that matter), though with default properties, it could sometimes look that way.
|
|
|
|
|
Now you killed the homework completely!?
there is an "operator implicit" in C# that would let you cast automatically, don't know how VB.NET stands on this.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
It's got to be possible somehow. The original project uses commercial libraries, which I don't have access to at this time. I'm trying to create dummy classes. For the time being, I don't need the functionality of the real classes. I just need the existing code to compile correctly as it is.
Whatever type IKGrid.Columns(0) returns, it definitely has a "caption" property and it does something that makes it possible to assign a String to it with the equals operator. But I still have no idea how that's done. I've looked into overloading operators in VB.NET, but I can't find information regarding the equals sign as an assignor, only as an equality tester.
|
|
|
|
|
There's a bit of a disconnect between your initial question and its restrictions. Either you can recompile the form class, which means you can change it to just use the caption property, or you can't recompile it and you can't do anything to IKGrid either because the form has already bound to it. (Well, you may be able to change some things, but nothing that will make your situation work.)
Regardless, Luc and I have dropped some hints about how to do what you want in other posts in the thread.
|
|
|
|
|
Well, yes there are conversion operators I suppose (Widening Operator CType would be equivalent to implicit, I believe)
Personally, my solution is fix the code in the form, but if the situation doesn't allow, then I guess there are plenty of ways to get around it. Though if it's not homework, one wonders how it compiled in the first case.......
|
|
|
|
|
Adding a Widening Operator CType to the dummy class worked. So I guess it compiled in the first place because the class in the commercial library does something similar.
|
|
|
|
|
Unless I am missing something, doesn't the Caption property of the IKColumn class need to be set as the default property?
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
I haven't set any default properties. It compiles fine without default properties. The IKGrid.vb file looks like this now:
Public Class IKGrid
Public Property Columns(ByVal s As Short) As IKColumn
Get
Return Nothing
End Get
Set(ByVal value As IKColumn)
End Set
End Property
End Class
Public Class IKColumn
Public Shared Widening Operator CType(ByVal src As String) As IKColumn
Return Nothing
End Operator
Public Property Caption() As String
Get
Return ""
End Get
Set(ByVal value As String)
End Set
End Property
End Class
And I can call myIKGrid.Columns(0).Caption = "English" just fine without Caption being a default property.
|
|
|
|
|
Ah yes but if you define your property like so:-
Public Default Property Caption() As String
Then you can assign the caption as follows :-
myIKGrid.Columns(0) = "English"
Which I believe is what you are trying to achieve, or am I wrong?
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
I have created a project, and with form3, created a class for datagridview called MyDtGrd. And when I created a form4 I used that same MyDtGrd. When I used before to publish the program no problem.
But after publishing When I tried to make changes, giving error like
"The variable MyDtGrd is either undeclared or was never assigned"
Is there any technique to access the same class oject to use in other forms?
Thank You !
|
|
|
|
|
Simply pass the reference from one to the other.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Is there a way within vb to find which window has focus on a computer? For instance if IE, Open Office Writer and Photoshop are open, how can I programmatically tell which one has focus?
|
|
|
|
|
This would need some code class to native window function, here is C# code you can port it to VB
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
public class MyClass
{
[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")]
public static void Main() {
IntPtr handle = GetForegroundWindow();
}
}
|
|
|
|