|
Is ther any one can tell me that how to creat a sub property in ActiveX control, like A recordset has sub properties and the TableDef has an array or properties and same with the fields.
I will obviously thankfull to you.
sameers
sameers@hangamahouse.com
|
|
|
|
|
i think you mean something like this
in class, MyActiveXControl
<br />
Private m_sStringProperty as String<br />
<br />
...<br />
<br />
Public Property Get MyStringProperty() as String<br />
MyStringProperty = m_sStringProperty<br />
End Property<br />
<br />
Public Property Let MyStringProperty(sSP as String)<br />
' Validate if you want<br />
m_sStringProperty = MyStringProperty<br />
End Property<br />
You can also use 'Public Property Set' to have an object be a property and you can use Private to make your property read/write only as well.
James Johnson
--
There are two secrets to success. 1) Never tell anyone everything you know.
|
|
|
|
|
I understand how to go from a HelpContextID to an .htm file using the Map and Alias
tabs of the HTML Help Workshop.
Can one go from a HelpContextID to a bookmark in an HTML file?
Specifying
IDH_Helpme = file.htm#bookmark
does not work (It gives file file.htm#ookmark not found). Is there a syntax which does work?
thanks
nick toop
|
|
|
|
|
Hello codegurus,
I have a deep problem with Visual Basic. I just started using it a few days ago so there's still a lot to learn (sorry for any dull questions). The problem is that I tried to put a lot of controls on a form that I had to change the height of the form to the maximum but still needed to put more controls so I thought it was best to add scroll bars to the form and just scroll the contents of the page. OK, now I have two problems; the first probelm is that I have resized the form to its maximum height but still need to add more controls, how can I change the height of the form after it reached its maximum (11520 twips on 1024x768 resolution)?! Do I have to create the controls dynamically? Or should I just place them anywhere then change their positions at run-time? the second problem is that I can't add scroll bars to the form (of course I could've used the scroll bar control but this is not what I want, I want to add the scroll bars to the window not as seperate controls). Should I use SetWindowLong() to change the style of the window at run-time? If I add the scroll bars how can I scroll the contents of the page?
Any suggestions would be appreciated.
|
|
|
|
|
Hehe, Why not try EasyGrid ActiveX?
It'll be helpful.
I guess it can be found in the web.
But I forget the Url.
Try at altavista.com with the keyword of easygrid activex.
best wishes.
|
|
|
|
|
Hi everyone...
I'm new at working around vba and i'm trying to figure out a way to secure a mde file using a access form at the begining of the program.
What it should do is check if the user has a registered key to access the main program file and allow him to work on the database.
And if he doesn't have a registered key, get him to call the client to obtain one.
So there's the the problem... i don't know where to start.
Can anyone help me with this?
Any example code is appreciated...
|
|
|
|
|
Hopefully it helps
Private Sub cmdOK_Click()
1 Dim CNN As New ADODB.Connection
2 Dim RCS As New ADODB.Recordset
3 Dim CNNstr As String
4 Dim sqlstr As String
5 Open App.Path + "\" + "db\CNNstr.txt" For Input As #1
6 Input #1, CNNstr
7 Close #1
8 CNN.CursorLocation = adUseClient
9 CNN.Open CNNstr
10 sqlstr = "select * from TABLE where UserID = '" & Text1.Text & "' and UserPassword ='" & Password & "'"
11 RCS.Open sqlstr, CNN, adOpenForwardOnly, adLockReadOnly
12 If RCS.RecordCount > 0 Then
13 Form1.Show 1
14 Else
15 r = MsgBox("Unauthorised User")
16 Text1.SetFocus
17 End If
End Sub
1, 2, 3, 4 Declare variable
5 get the database path in text file
10 check whether the user exist and the password correct or not at once
|
|
|
|
|
I have a couple of forms in my MDI application. When I create multiple instances of the child forms, they occupy a lot of screen real-estate. I want to change my design to have one single form having a tab control with each tab displaying the same controls which is currently displayed in separate forms. Is there any way I can attach/move the controls in a form to a tab page at run-time?
For example, there are two forms - Form1, Form2. The user can create any number of instances of these forms at run-time. Instead I want to have a tab control and show these forms as tab pages. The existing forms have lot of contrls and there is lot of code behind them!
Is there any way I can attach these controls to a tab ctrl at run-time?
Thanx,
Jagadish.
|
|
|
|
|
VBA in Access
Is there a way to get VBA code to pause a few seconds before a shell command is run?
Thanks
|
|
|
|
|
i am currently working on a shell. my shell will completely get rid of the start/tool/task bar, however i dont want to always push alt+tab whenever i switch to a new window. does anyone know how to program a totally new running tool bar so i can click on a minimized window instead of always pushing alt tab?
thanks
|
|
|
|
|
Hi i just want to ask who i can change the screen resolution from visual basic! thnx!
The Code That Man Do!
-=-=-=-=-=-=-=-=-=-=-
When The Night
Will Gather Darkness
And Black Clouds Unadorde
Only Poets, Dreams And Mandess
Will Sail Out Into The Storm!
Each Man Has A Soul
That Struggles To Escape
And In The Shallows Of His Dreams
We Can Often See Its Wake!
|
|
|
|
|
Try the ChangeDisplaySettings API function
|
|
|
|
|
Let's say i want to have a feature in my system which enable users to view chart report e.g. students' performance. How am i suppose to do that in VB language? Can i link to MS Excel to create these charts? Please help. Thank you.
|
|
|
|
|
An plugin of AAA EasyGrid ActiveX will be very helpful.
It can be downloaded from
http://www.share2.com/easygrid/
|
|
|
|
|
Does anyone know how if it is possible to export a text file out of Access using a VBA function like (DoCmd.TransferText) to append a text file instead of writing over it. Or is there a different approach that would work.
Thanks
|
|
|
|
|
Have you tried the OutputTo action?
Giles
|
|
|
|
|
|
does n e 1 know the code for saving a file to a place
|
|
|
|
|
Here's one way...
Sub SaveDocToFile()
' Replace "Any.Doc" with your document name
' type with or without path you want to save it to
Dim strSaveAs As String
Dim strMsg As String
strSaveAs = "Any.Doc"
strMsg = "Choose Yes to overwrite the existing document " & vbCrLf _
& "'" & strSaveAs & "'" & " or No to save as a new document"
If Dir(strSaveAs & "*") = "" Then
ActiveDocument.SaveAs FileName:=strSaveAs
Else
Select Case MsgBox(strMsg, vbYesNoCancel + vbExclamation)
Case vbYes
ActiveDocument.SaveAs FileName:=strSaveAs
Case vbNo
With Dialogs(wdDialogFileSaveAs)
.Name = ""
.Show
End With
Case Else
End Select
End If
End Sub
|
|
|
|
|
I search the way to upload a file from a client to a server via the INet control but NOT WITH FTP MODE ONLY HTTP!
Thank YOU
|
|
|
|
|
Can I change the font of the Menu in MDIForms.
|
|
|
|
|
That's possible
Considderd to be the worlds fastest knoppenbonker.
10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute).
And experience with the one and only NewEra Guru. And one year experience with the VB guru
|
|
|
|
|
|
To the best of my knowledge this cannot be done. The font set in the Menu item, in display properties is used by the system.
|
|
|
|
|
Does anyone know how to open a *.doc file with launching the MS WORD?
|
|
|
|