|
As should be; that's how the stuff works. If you want a "mashup", you'll have to draw the pictureboxes by hand, on the forms' paint event.
|
|
|
|
|
Can anybody help me to solve this problem...
I am facing the below problem while trying to send mail in Vb6.0
Problem was encountered when trying send mail- ActiveX component can't create object.
Would Appreciate help...
|
|
|
|
|
Check the outlook is configured on particular machine.
Also check the outlook reference is added or not in your application.
Still problem is not resolved, then send the line of code, i will correct it.
|
|
|
|
|
Can anybody help me to solve this problem...
I am facing the below problem while trying to send mail in Vb6.0
Problem was encountered when trying send mail- ActiveX component can't create object.
Appreciate your help...
|
|
|
|
|
From this Google search I think the top 2 results might be a good place to start
Google: VB6 sendmail - ActiveX component can't create object[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Hi
how to give Chinese characters as in put in a Text box in vb.net. i need to enter the charecter through key bord.
and how display the chineses charectes in datagrid in vb.net.
|
|
|
|
|
Install a Chinese keyboard with the Language Bar of Windows. Set the focus to your text box, then select "Chinese" from the Language Bar, and type: "川宫" (don't know what it means, just typed some characters on my German keyboard with the Chinese keyboard selected in the LanguageBar...)
|
|
|
|
|
Hello all,
I have built a C++ class like this:
class MyClass {
public:
int x;
MyClass();
virtual void f1(int);
virtual void f2();
virtual void f3();
};
extern "C" DLLIMPORT void* MCSet(int);
extern "C" DLLIMPORT void MCKill();
extern "C" DLLIMPORT int MCGet();
extern "C" DLLIMPORT void DoStuff(MyClass); I also made a client *.exe that uses all MyClass features. Can someone tell me if it is possible to call MyClass from vba and do the same? If so, how? (A sample code would be very helpfull )
[]'s
|
|
|
|
|
I developed a hotel bill In Windows form application(visual basic 2010)
i created a database with Column names
1.S_No
2.ItemName
3.Quantity
4.Price
5.Total
6.GrandTotal
And i added this database to my form and i dragged and dropped as Details view. I arranged columns in horizontal format. Grand total button at end form. i selected all text boxes excluding grand total textbox. by holding Ctrl key i made duplicates to all text boxes in the same horizontal columns. The first text boxes are correctly working correctly.but the duplicates box values although i inserted they are not assigning to database(when i pressed save icon on top)(only first Row boxes are saved) what to do please help me. provide the code in visual basic 2010 format. if you don't understand i will mail my complete project to you please please help me
|
|
|
|
|
I want to an admin Login page for My Form How to create that form that checks user name and password and allow to second form
|
|
|
|
|
In your VB.NET application IDE there is ALREADY a LOGIN form Template!
Why not use that one and add yuor code to query yuor members dtabase?
|
|
|
|
|
I have an the following application setting [Name: PO / Type: Integer / Scope: User / Value: 100001]
This setting increments every time the user logs into the application and is displayed in a textbox - it is working fine on 4 different workstations - but on workstation 5 it is only displaying 1 then 2 then 3 and so on instead of 100001,100002,100003 . . . ..
There is a mixture of operating systems anything from XP to Windows 8. Workstation 5 is Windows 7.
Is there something obvious I'm missing?
Thanks,
MB
|
|
|
|
|
Without knowing anything about how you implemented this functionality, it's pretty much impossible to tell you what's going wrong.
How are you getting this setting and from where? How are you updating this setting and persisting it?? We'd need to see the relavent code snippets.
|
|
|
|
|
OK - lets see if this helps - have the following variable under Public Class Main:
Dim poIncNo As Integer
Then in the formLoad Event I have:
txtBx_poNo.Text = genPoNo(currUser)
Private Function genPoNo(ByVal user As String) As String
Dim strNum As String = "1"
poIncNo = My.Settings.po + 1
Dim poNum As String
Select Case user
Case uFred
poNum = strNum & userId + CStr(poIncNo)
Return poNum
End Select
End Function
In Application.Settings I have:
Name = po
Type = integer
Scope = user
Value = 100001
Thanks,
MB
|
|
|
|
|
OK, so are these application-scope settings or user-scope settings??
You also don't have any code in what you posted that sets the settings with new values and persists them.
|
|
|
|
|
Dave,
It is 'user-scope'
Private Function genPoNo(ByVal user As String) As String
08 Dim strNum As String = "1"
09 poIncNo = My.Settings.po + 1 '----IT'S INCREMENTED HERE !
10 Dim poNum As String
11 Select Case user
12 Case uFred
13 poNum = strNum & userId + CStr(poIncNo)
14 Return poNum
15 End Select
16 End Function
Thanks MB
|
|
|
|
|
mebjen wrote: poIncNo = My.Settings.po + 1 '----IT'S INCREMENTED HERE !
NO, IT'S NOT! You set the value of poIncNo to the setting + 1, but you never showed where you saved that new value back into settings!
|
|
|
|
|
Hi
I have a strange problem which i am not sure if it is an issue in VB
Public Class Form1
Private moving As Boolean = False
Private Sub Label2_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label2.MouseDown
If e.Button = Windows.Forms.MouseButtons.Left Then
moving = True
End If
End Sub
Private Sub Label2_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label2.MouseUp
moving = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label3.Text = moving
End Sub
Private Sub Form1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
Dim eLocation As New System.Drawing.Point(e.X, e.Y)
If moving = True Then
Label1.Text = "X." & e.X & vbCrLf & "Y." & e.Y
Label2.Location = eLocation
End If
End Sub
End Class
There is a label on the form and when you click on it is should be dragable on the form. The issue is that the flag is not been set on the mouse down event but I am not sure why or if it is the mouse move event where I test for the flag is always false. If I take the test for the flag out of the mouse move the label follows the mouse with the left mouse button down so all events seem to be working. If I declare the flag as true at start up the label also follows the mouse until the left button is pressed and released resetting the flag. I have also tried removing the flag reset in mouse up event, this actually starts to work when the left button is released.
Any help would be appreciated
Col
VB Express 2010
|
|
|
|
|
Have a read of this
Drag label anywhere[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Hi
Yes i have Simon and i have seen a lot of examples however they all seem to stop at VB 2008, I have tried the example but the problem i have is still there. It seems that on the mouse down button it fires the mousedown event, while holding the the button and now move the mouse the mousemove event is not triggered untill the mouse button has been released. Is there any way to tell the event to end and contine looking for other events?? is this a limitation of 2010 Express version??
Col
|
|
|
|
|
You need to implement a mouse move event on the control not the form
i.e.
Private Sub Control_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label2.MouseMove
If Moving Then
Dim ctrl As Control = CType(sender, Control)
' Move the control according to mouse movement
ctrl.Left = (ctrl.Left + e.X) - cursorX
ctrl.Top = (ctrl.Top + e.Y) - CursorY
' Ensure moved control stays on top of anything it is dragged on to
ctrl.BringToFront()
End If
End Sub
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Thanks Simon, that was the problem the control had to have the event
Col
|
|
|
|
|
Your Form1_MouseMove method handles the form's MouseMove event. Shouldn't it be attached to Label2 MouseMove?
Alan.
[EDIT, just like Simon says]
|
|
|
|
|
I find I need an old vb program on win7 but got out of doing stuff like this. Despite the fact that some ways of doing things was dropped in modern windows I am guessing there is a replacement. I know send keys was considered un reliable but the problem was finding what window was the focus. Chances are the window is called something else. A good example is the program I need this for when the window is open there is no title to be seen. all my research says that vb6 is an unreliable or troublesome install on win 7. I have the source for an old vb program and have been advised to find a net replacement. And was wondering how others handled the same problems. For instance the converter by microsoft. Does it work. And how much should I expect to be converted and how much should I expect to hand code.
here is what I am talking about.
<pre lang = "vb">
<pre>VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 1995
ClientLeft = 60
ClientTop = 345
ClientWidth = 4185
LinkTopic = "Form1"
ScaleHeight = 1995
ScaleWidth = 4185
StartUpPosition = 3 'Windows Default
Begin VB.Timer Timer1
Left = 540
Top = 930
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Sub Form_Load()
Timer1.Interval = 100
End Sub
Private Sub Timer1_Timer()
Static lHwnd As Long
Dim lCurHwnd As Long
Dim sText As String * 255
lCurHwnd = GetForegroundWindow
If lCurHwnd = lHwnd Then Exit Sub
lHwnd = lCurHwnd
If lHwnd <> hwnd Then
Caption = "ActiveWidow: " & Left$(sText, GetWindowText(lHwnd, ByVal sText, 255))
Debug.Print Caption
Else
Caption = "ActiveWindow: Form1"
End If
End Sub
Is there an easy way to do this on win 7?
|
|
|
|
|
Is this what you mean?
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Interval = 250
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Static lHwnd As Long
Dim lCurHwnd As Long
Dim sText As String
sText = ""
lCurHwnd = GetForegroundWindow
If lCurHwnd = lHwnd Then Exit Sub
GetWindowText(lHwnd, sText, 255)
lHwnd = lCurHwnd
If lHwnd <> Me.Handle Then
Me.Text = "ActiveWindow: " & Microsoft.VisualBasic.Left(sText, 255)
Debug.Print(Me.Text)
Else
Me.Text = "ActiveWindow: Form1"
End If
End Sub
|
|
|
|