Pull-Down Event On Menu?
I have a form with a normal set of menus at the top, created by the Menu Editor tool. My form responds to MouseMove events. It responds to them improperly when a menu item is pulled down.Is there any way to be notified when pull-down menus are pulled down?Dave StraayerVaratouch, Inc.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Pull Down Menu
i want to do a pull down menu, im not quite sure wut the code is though. so i make a combo box. now what is the code so i make another option.
Pull Down Menu
I have a pull down menu with a top level name of tools.
I want to dynamically add sub entries to the tools pull down based on the tools installed on that machine.
I can search a specific directory and determine the available tools.
I do not want to just dis-able them. There are 15 of them and most of them are mutually exclusive. Administrators have tools that customer service people don't have access to and the managers don't want the customer service people to even know the tools exist.
so
File Edit View Tools Help-
-save -cut -bla -lookup -contents
bla
bla
bla
the lookup needs to be dynamically added .
thank you for your time and have a good day
PS planning on the form activate event.
Pull Down Menu
Anyone can help me.
How can i disable my pull down menu during runtime,
For example :
File
--Test
--Close
How can i disable Test during runtime ?
Thanks alot.
Pull Down Menu
I have written an program witch has a pull down menu. I want to make at run time new etries in the pull down menu. At the moment I have 10 etries witch are hidden. When I want to make a new one, I set it to not hidden. But with this methode I can only add 10 new entries.
How can I add more entries. Is there an add methode or any other methode witch I can use.
mfG Pueromane
Coding For Pull-down Menu
I have coding behind a pull-down menu which finds and displays a drawing which is actually an adobe pdf file which has been saved in a particular folder.
The code runs well and finds the drawing which is named with a Job Number followed by -DWG for example 222555-1-DWG for first drawing and 222555-2-DWG for second drawing. The 222555 is the Job Number and is taken from the textbox, named txtJobNo from the current record of the form.
When I click on Drawings in the pull down menu I would like to display a list of one or more drawings found in the folder and then be able to open each one from the list. The code I have at the moment automatically opens the first drawing found only...
Private Sub mnuDrawings_Click()
'Pulldown Menu to display Drawing/s
Dim Path As String, dwgFile As String, JobNo As String
JobNo = txtJobNo.Text
Path = "C:JobsFolder" & JobNo & ""
dwgFile = JobNo & "-" & "DWG.pdf"
'Requires reference to Microsoft Scripting Runtime to use the FileSystemObject.
With New FileSystemObject
If .FileExists(Path & dwgFile) Then
ExecuteWait Path & dwgFile
Else
MsgBox "File " & Path & dwgFile & " does not exist."
End If
End With
End Sub
Any help is much appreciated!
Toolbar Pull Down Menu
I have added a toolbar to my app. One of the buttons is a pull down menu, when I click on the button, I would like to show the pull down menu. I have searched the forum (as always) and could not find what I was looking for... how would this be done?
Screenshot attached.
Pull Down Menu , Combo Box
i want to create a combo box that will allow me to point the default setting to an ini file. let's say the main setting is called default. Default points to whatever the ini file is pointed to. Currently, Default setting is pointing to ABC.ini file, i want Default to point to BCD.ini file. Where do i create that list of different ini files so that Default changes to whatever i point to? And how does it match up the file to change in the combo1_click procedure?
Using VB To Make A Pull Down Menu
*****Question Rephrased******
I am looking for code that modifies the bar menu that appears long the top of the
Form (Not the pop up menu that is control by the left mouse button). A person can use
Tool Bar Menu Editor during design time to make and design a bar menu. I am looking for code that modifies
that menu durring run time. Many programs have a file selection history that places past
selected filenames into "File" menu command bar located on the top of their window. I am attempting to make a
filename selection program or routine that would do the same thing in VB. I need code to place Filenames the a
bar menu because I have all ready made a filename histroy array that can put the filenames in a list box.
The next step is to find code that will allow me to place my filenames in a bar menu.
Thank you,
It is possable to make a pull down menu in a form using VB code
instead using Menu Editor Tool durring design time. If so, does someone
have sample code that would demostrate how to make a pull menu and to
place labels and sublabels in it.
Thank you,
doug@evansville.net
Pull Down Menu Links
First off let me say sorry if this is in the wrong place
what i need is some sort of pull down menu where each item in the pull down menu links to a different thing, is this possible?
any help would be most appreciated
David
Menu Pull Down In A Coolbar?
Ok, I think I got this coolbar thing figured out finally. I've got an app where I am using the normal form menus.
I want to make those menus a band in the coolbar I got. Except I can't figure out how (or find the correct control?) for putting my menu as a band in the coolbar. You know, like IE has got it's 'File' 'Edit' etc., items in a coolbar band.
Any suggestions on how to do this?
Adding Options To A Pull Down Menu?
hey guys... im setting up a form in excel using vb. i want the user to be able to make a choice from a pull down menu. in vb what do i do to add the different choices to the combo box, then how do i copy the users selection into a cell. THANKS IN ADVANCE!!
Pull Down Menu As Parameter Of A Class
MsgBox "hello", vbOKCancel, "Title"
When entering the 1st comma of the above line, VB intellisense displays a drop down listbox of choices.
How do I achieve the same in my own class?
Pull Down Menu On Right Mouse Click
I have a List View Control in my Application.
How can I make a pull down Menu when the user clicks the Right Mouse Button on an Entry.
mfG Pueromane
Formating: Drop Down / Pull Down Menu / Combo Box
I have a few pull down menus (drop down menus) on the worksheet that users can use to select certain reporting criteria.
I am trying to accomplish 2 things:
1. Right now, when you mouse click the pull-down menu, you can select an option, but then the pull-down deactivates. You have to click again to select the next item on the list. I want to be able to click on it once, then mouse arrow down (or page-up/down) to get to new criteria. I have looked everywhere trying to find out how to do this with no luck.
2. Format text contained in the drop-down menu. Right now, cannot seem to change font or other factors (bold/underline,etc). I figure there must be some way to do this.
Any ideas much appreciated...
Thanks
How Do I Pull The Caption/Text From A Menu Item?
Hello,
I am trying to find a how to use the Caption of a menu item/entry to use in an error message.
Near the top of my code I have the following code. I know there may be a better way to accomplish this, but this is what I know how to do.
Code:
Public Sub Err_Msg()
Dim strErrMsg1a As String
Dim strErrMsg1b As String
strErrMsg1a = " installation unavailable at this time. "
strErrMsg1b = "Please contact Support"
MsgBox strErrMsg1a & strErrMsg1b
End Sub
Then for the menu entries I have this. These are just examples, there are several entires.
Code:
Private Sub mnuTest1_Click(Index As Integer)
On Error GoTo msg_err_01
Dim test1Path As String
test1Path = "D:models est1"
If Len(Dir$(test1Path, vbDirectory)) = 0 Then MkDir (test1Path)
Dim RetVal_test1
RetVal_test1 = Shell("T:ideasin_test1i-deasogl.cmd", vbNormalFocus)
End
msg_err_01:
Err_Msg
End Sub
Private Sub mnuTest2_Click(Index As Integer)
On Error GoTo msg_err_01
Dim test2Path As String
test2Path = "D:models est2"
If Len(Dir$(test2Path, vbDirectory)) = 0 Then MkDir (test2Path)
Dim RetVal_test2
RetVal_test2 = Shell("T:ideasin_test2i-deasogl.cmd", vbNormalFocus)
End
msg_err_01:
Err_Msg
End Sub
What I'm wanting to do is use the Caption for each menu entry to create a general error message and have the Caption list which installation it is that is unavailable, so the error message reads
Test1 installation unavailable at this time. Please contact Support.
OR
Test2 installation unavailable at this time. Please contact Support.
Can I do this, or does each menu entry have a specific name, thus not allowing me to use a gerenal message.
I can accomplish what I want by doing this.
Code:
Private Sub mnuTest1_Click(Index As Integer)
strErrMsg1a = "Test1 installation unavailable at this time. "
strErrMsg1b = "Please contact I-DEAS Support."
On Error GoTo msg_err_01
Dim test1Path As String
test1Path = "D:models est1"
If Len(Dir$(test1Path, vbDirectory)) = 0 Then MkDir (test1Path)
Dim RetVal_test1
RetVal_test1 = Shell("T:ideasin_test1i-deasogl.cmd", vbNormalFocus)
End
msg_err_01:
MsgBox strErrMsg1a & strErrMsg1b
End Sub
Private Sub mnuTest2_Click(Index As Integer)
strErrMsg1a = "Test2 installation unavailable at this time. "
strErrMsg1b = "Please contact I-DEAS Support."
On Error GoTo msg_err_01
Dim test2Path As String
test2Path = "D:models est2"
If Len(Dir$(test2Path, vbDirectory)) = 0 Then MkDir (test2Path)
Dim RetVal_test2
RetVal_test2 = Shell("T:ideasin_test2i-deasogl.cmd", vbNormalFocus)
End
msg_err_01:
MsgBox strErrMsg1a & strErrMsg1b
End Sub
With the strErrMsg1a and strErrMsg1b variables Declared in the General/Declarations section. However, that means I have to do this for every entry, I would like to stay away from that if I can.
Do you have any suggestions/ideas?
Thank you,
IF
Force The Pull-down Menu To Show When Click On Combo Box
Awhile back, I posted a question about forcing the pull-down menu to show when you click on a combo box. And the answer involved API...and now I can't find it. Any suggestions on how I could do that?
Private Sub cboBox_Click()
????
End Sub
MDI Menu Event
hi everyone,
I have a project which have frmMain(MDI form) and frmCustomer(normal for;with purpose of adding,deleting and editing records).I would like to perform a task;
-when I click a menu on MDIform it should be work as I click the Add button on frmCustomer.(I mean not showing the frmCustomer;especially performing Add_Click() event on frmCustomer)
Thanks in advance
How To Add Menu Event In VB
Hi!
I'm a newbie in VB and I'm now doing one project
that need to add some menu items in other applications
menu. I have successfully appended the item in the menu and i would like to know how to attach an
event to the new item...
I'm using Win32 API to integrate the new menu item but i can't find any API reference that can let me add event to the menu item. Need help urgently...
Thanz in advance...
BC Lee
Validate Event With Menu
Hi Everybody !
Is it normal that the validate event is not fired when I click in menu ???
Thanks in advance !
Note: NEVER USE SSTAB ! I LOST 2 HOURS TO REPLACE IT BY TABSTRIP !
Menu Click Event
The following code creates menus and it pops them up but how can I use them? The click event? Thanks! (I got this code from the API-Guide).
VB Code:
Const MF_CHECKED = &H8&Const MF_APPEND = &H100&Const TPM_LEFTALIGN = &H0&Const MF_DISABLED = &H2&Const MF_GRAYED = &H1&Const MF_SEPARATOR = &H800&Const MF_STRING = &H0&Private Type POINTAPI x As Long y As LongEnd TypePrivate Declare Function CreatePopupMenu Lib "user32" () As LongPrivate Declare Function TrackPopupMenu Lib "user32" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal x As Long, ByVal y As Long, ByVal nReserved As Long, ByVal hwnd As Long, ByVal lprc As Any) As LongPrivate Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As LongPrivate Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As LongPrivate Declare Function DestroyMenu Lib "user32" (ByVal hMenu As Long) As LongPrivate Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As LongDim hMenu As LongPrivate Sub Form_Load() 'KPD-Team 1998 'URL: [url]http://www.allapi.net/[/url] 'E-Mail: [email]KPDTeam@Allapi.net[/email] 'Create an empty popupmenu hMenu = CreatePopupMenu() 'Append a few menu items AppendMenu hMenu, MF_STRING, ByVal 0&, "Hello !" AppendMenu hMenu, MF_GRAYED Or MF_DISABLED, ByVal 0&, "Testing ..." AppendMenu hMenu, MF_SEPARATOR, ByVal 0&, ByVal 0& AppendMenu hMenu, MF_CHECKED, ByVal 0&, "TrackPopupMenu"End SubPrivate Sub Form_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single) Dim Pt As POINTAPI 'Get the position of the mouse cursor GetCursorPos Pt If Button = 1 Then 'Show our popupmenu TrackPopupMenu hMenu, TPM_LEFTALIGN, Pt.x, Pt.y, 0, Me.hwnd, ByVal 0& Else 'Show our form's default popup menu TrackPopupMenu GetSystemMenu(Me.hwnd, False), TPM_LEFTALIGN, Pt.x, Pt.y, 0, Me.hwnd, ByVal 0& End IfEnd SubPrivate Sub Form_Unload(Cancel As Integer) 'Destroy our menu DestroyMenu hMenuEnd Sub
Menu Mousedown Event?
Is there a way I can subclass the menu to tell when the user left-clicks on a menu item, so I can then show a popup menu with options?
Any ideas on how to do this?
Menu MouseMove Event??
I can't figure out how to check when a menu is hovered over by the mouse I want to make it so when the user moves the mouse over a menu a label says the description of it (ie- if you put your mouse over "print" the label will say "Click to print current document")
Notify Event In Menu
Hi buddies,
I have made the menu run time using api .Now how can i notify events using wm_command or by another way.
Regards and thanx
Yujvendra Verma
Adding Menu Event In VB
Hi!
I'm a newbie in VB and I'm now doing one project
that need to add some menu items in other applications
menu. I have successfully appended the item in the menu and i would like to know how to attach an
event to the new item...
I'm using Win32 API to integrate the new menu item but i can't find any API reference that can let me add event to the menu item. Need help urgently...
Thanz in advance...
BC Lee
Click Event On A Menu Item
I have 2 forms... one a MDIForm with a menu and the another mdichilt.
In the MDIform I have
Code:
Private Sub mnuIndividualSpinsTypeIn_Click()
frmNewSpins.Show
End Sub
What I want to achieve is create some buttons on the other form (a customized control panel) that i should add it to the right of my mdiform, as a task panel and have the same features as some menu items.
For example I have a button that i want to do the exact thing as the mnuIndividualSpinsTypeIn does on click.
I tried to call the click event function from the second form, but it doesn't work... how can I do this?
Code:
Private Sub imgNew_Click(Index As Integer)
Select Case Index
Case 0:
frmMain.mnuIndividualSpinsTypeIn_Click
End Select
End Sub
Need Help Create Event For Popup Menu
I've create a popupmenu and display it wit some API functions, Like Createpopupmenu,
Insermenuitem, ..etc.Now I want to load a newform when a menu item in popupmenu that I've create is clicked
How Can I do this?
I also want to know how to create new shape for form of popupmenu
(Popupmenu is created with API functions)
would u help me plz
thanks
Dynamic Created Menu - Button Click Event
Hi all!
Last month I did a function which creates a menu dynamically with some CommandBarButtons.
Code:
For msgIndex = 1 To msgEndIndex
'msgIndex = 1
'Get the informations (Sender, Subject and body)
msgFrom = Application.....Item(msgIndex).SenderName
msgSubject = Application.....Items.Item(msgIndex).Subject
msgBody = Application....Items.Item(msgIndex).Body
'Create the menu
Set newButton = Application.ActiveInspector.CommandBars("Standard").Controls("Signature").Controls.Add(msoControlButton)
newButton.Caption = msgFrom & ": " & msgSubject
Next msgIndex
But I now have the problem, that I can't use the button click event as normal. This is it with one button:
Code:
Dim WithEvents newButton As CommandBarButton
Private Sub newButton_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
MsgBox ("Hallo")
End Sub
Can anyone help me with my problem? This would be too nutty!
Error 365 - Unloading Menu Items From Combo_Click() Event
I have found that I cannot unload menu items from a Click event of the Combo box. Any other control will allow the menu items to be unloaded. Even if I pass the event to a different control and then unload the menu items, the error - 365 "Unable to unlaod within this context" still happens!
Has anyone else come accross this problem and perhaps knows a solution. I would appreciate knowing how to get around this problem as I must have a combo box which results in menu items bing unloaded.
Common Event Handler For Child And MDI Window Menu
I want to write a common function to handle events of menu the child and MDI window. I have written a MDI application with MDI window having a menu and the child window menu is super set MDI window. How is it possible to write common event handlers for the menu items which have common funtionality in both the windows?
See If One Of You Knows How To Pull This Off...
I want to put a pass on a cd. To be more specific, When the cd is loaded, the autorun.inf runs a program which brings up a form telling you to enter a password. If the password is wrong I want to know how to make it eject the cd.
Sql Pull
I am trying to pull a table from my sql server, I just need to know what the initial catalog is refering to in this line of code:
Dim rdaOleDbConnectString As String = _
"Provider=sqloledb; Data Source=Brianp_DSK;Initial Catalog=Medic; " + _
"User Id=;Password="
I am trying to connect to an sql server ce database I have seen examples where they put Northwind as the Initial Catalog. Could anyone explain to me what Initial Catalog is?
If...then Pull Hair Out
Hi,
I've been having trouble with some code. I have a set of coefficients for equations, stored in arrays. The code is suppoed to select which set to use.
Code:
Range("H1").Select
For cnt = 0 To FloodDuration
ActiveCell.Offset(cnt, 0).Value = cnt
Next cnt
Range("I1").Select
For cnt1 = 0 To FloodDuration
' Select Case cnt1
' Case x(0) To (x(1) - 1)
' cnt2 = 0
' Case x(1) To (x(2) - 1)
' cnt2 = 1
' Case x(2) To (x(3) - 1)
' cnt2 = 2
' Case x(3) To (x(4) - 1)
' cnt2 = 3
' Case x(4) To (x(5) - 1)
' cnt2 = 4
' Case x(5) To (x(6) - 1)
' cnt2 = 5
' Case x(6) To x(7)
' cnt2 = 6
' End Select
If cnt1 >= x(0) And cnt1 < x(1) Then cnt2 = 0
If cnt1 >= x(1) And cnt1 < x(2) Then cnt2 = 1
If cnt1 >= x(2) And cnt1 < x(3) Then cnt2 = 2
If cnt1 >= x(3) And cnt1 < x(4) Then cnt2 = 3
If cnt1 >= x(4) And cnt1 < x(5) Then cnt2 = 4
If cnt1 >= x(5) And cnt1 < x(6) Then cnt2 = 5
If cnt1 >= x(6) Then cnt2 = 6
qa = Aval(cnt2) * (cnt1 - x(cnt2)) ^ 3
qb = Bval(cnt2) * (cnt1 - x(cnt2)) ^ 2
qc = Cval(cnt2) * (cnt1 - x(cnt2))
qd = Dval(cnt2)
q = qa + qb + qc + qd
ActiveCell.Offset(cnt1, 0).Value = q
Next cnt1
As you can see, I've tried a couple of methods, but I have the same problem with each: It uses the A(0), B(0), C(0) and D(0) coefficients for all the values of cnt1, until it reaches the switch for the 7th set (cnt2=6) of coefficients. So, it correctly uses the first and last sets, but doesn't switch for the middle sets.
Any suggestions?
Pull Text
Hi all,
I am working on a text problem and have tried several ways but none do it properly.
I need to separate text from a text box and put it into another.
The data is in Text1 like this: XX"DFRgt53td"ZZ
XX" and "ZZ are the only constants, the data in between them is always different.
Also these are surrounded by other data, here is an example of actual data:
647655 gtr54545eeXX"7665trgdf45rwf"ZZi 756hjff XX"u54ty934 23t24r re"ZZ4536rf
So as you can see above the data is embeded into other text. So I need a process to run and if the above example were entered into Text1.Text, then transfered to Text2.Text would be:
XX"7665trgdf45rwf"ZZ
XX"u54ty934 23t24r re"ZZ
Thx
Is There A Way To Pull Code From A Vb.exe?
Just curious if there is a way to pull the code out of a program that was made with VB? Or maybe a program that does it?
I was wanting to look at a small program
Thanks in advance!
Pull Down The Combo Box
I have textbox and combo box.
How I can pull down the combo box, when I try insert the value in the textbox?
Combo-Box Pull Down
Does anyone know how to activate the pull down list of a combo box when anything is typed in the combo box?
Whats The Best Way To Pull This Off?
I have a main form, always loaded with a winsock control listening for connections, When someone connects, i want to open a new window, Which has 2 more winsock controls on it.. and connect them both up to winsock.remoteip on the main form..
What do you Personally think the best way to do this is?
My way seems kinda sloppy...
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
On Error Resume Next
Dim StrData As String
Winsock1.GetData StrData
' If the remote user is sending the correct handshake command, Forward the user to the message window, and connect.
If Left(StrData, 3) = "HI:" Then ' HI:Username is our handshake command
Set mx = New fMsg ' Create message form
mx.RemoteName = Mid(StrData, 4, Len(StrData)) ' Remote Username ( Next to our handshake command )
mx.RemoteIP = Winsock1.RemoteHostIP ' Remote ip
mx.wChat.Connect mx.RemoteIP, 5556
mx.Show
Set mx = Nothing
Winsock1.Close
Winsock1.Listen
Else
' Remote user didnt send the correct handshake command. Close connection and wait for another.
Winsock1.Close
Winsock1.Listen
End If
RDA Pull Error
I installed ssce 2.0 server tools service pack 3 because i installed sql server 2000 service pack 3.I did this beccause
i want to use RDA pull method to access database tables from sql servver to the database in ssce.
It is not showing any tables in the database except the system created one.
The code i used is this one. I am not getting any error except i cannot see any table name -which i specified authors in my case
Dim ceRDA As SSCE.RemoteDataAccess
Dim oCatalog As ADOXCE.Catalog
Dim sSvrCon, sLocalCon
' Delete database if it already exists, and then create
On Error Resume Next
If FileSystem1.Dir("check1.sdf") <> "" Then
FileSystem1.Kill "check1.sdf"
If Err.Number <> 0 Then
DisplayError "Deleting database:error "
Exit Sub
End If
End If
Set oCatalog = CreateObject("ADOXCE.Catalog.3.1")
If Err.Number <> 0 Then
DisplayError "Creating ADOXCE.Catalog object: "
Exit Sub
End If
lblStatus.Caption = "Creating local database"
sLocalCon = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;"
sLocalCon = sLocalCon & "Data source=check1.sdf"
oCatalog.Create sLocalCon ' create the database
If Err.Number <> 0 Then
DisplayError "Creating Database:error "
Exit Sub
End If
Set oCatalog = Nothing
lblStatus.Caption = "Connecting to remote server"
'create the RDA object
Set ceRDA = CreateObject("SSCE.RemoteDataAccess.2.0")
If Err.Number <> 0 Then
ReportEngineErrors "remote connection error:", ceRDA
Exit Sub
End If
' set RDA properties
ceRDA.InternetURL = "http://localhost/sscePubs/sscesa20.dll"
'ceRDA.InternetLogin = "root"
'ceRDA.InternetPassword = "mathew2"
If Err.Number <> 0 Then
ReportEngineErrors "url error:", ceRDA
Exit Sub
Else
MsgBox "url connection est."
End If
'lOCAL CONNECTION
ceRDA.LocalConnectionString = sLocalCon
If Err.Number <> 0 Then
ReportEngineErrors "local connection error:", ceRDA
Exit Sub
End If
' enable this line if SSCE Relay is used
'ceRDA.InternetProxyServer = "ppp_peer:81"
sSvrCon = "Provider=sqloledb;Data Source=(local);Initial Catalog=pubs"
'sSvrCon = sSvrCon & ";user id= sa"
'sSvrCon = sSvrCon & ";password= mathew2"
lblStatus.Caption = "Pulling Authors"
ceRDA.Pull "authors", "SELECT * FROM authors", _
sSvrCon, TRACKINGOFF
Set ceRDA = Nothing
let me expalin some more. i created virtual directory.I could see sql server ce server agent when i enter.
http://localhost/sscePubs/sscesa20.dll when it is offline.
I am wondering if there is any error in this code:
sSvrCon = "Provider=sqloledb;Data Source=(local);Initial Catalog=pubs"
I can see pubs database when i go toSQl server enterprise manager.In that page under console rootmicrosoft sql servers- there is two items sql server group and Thomas which is my server name.under thomas i have local server .ie Thomaslocal(windows NT).
I am wondering if i need to change my data source path and initial catalog path. so that it will access the pubs database.
when i run this code,it creates the database and under tables folder ,system tables like MSystemConstraints and two other system tables.
I appreciate some ones help asap.
CRC32 - Need To Pull The CRC From A *.dll
Hi,
Nobody will probably be able to help with this, but here it goes anyway.
If I have a .dll in the root of any directory, for example on a system running US Office C:\Program FilesCommon FilesMicrosoft SharedProofMsspell3.dll
and Msspell3.dll being the target; I want to find the CRC32 of this file?? how would I approach this problem with regard to the actual code to pull the CRC32 from the file?
I am aware of the following Construtors and methods, but I do not know how to implement them.
CRC32()
getValue() Returns CRC-32 value.
reset() Resets CRC-32 to initial value.
update(byte[]) Updates CRC-32 with specified array of bytes.
update(byte[], int, int) Updates CRC-32 with specified array of bytes.
update(int) Updates CRC-32 with specified byte.
If anyone could help I would much appreciate it..
Thanks in advance..
Physics: Gravitational Pull
I want to simulate atoms... i use the formula F = G*m1*m2/d^2 and then to determine how fast they move toward each other i use F = m*a, i isolate a = F/m and i determine the acceleration toward the other object.... but this is where i am stuck... i want to add more atoms, not just 2, and i will probably need vector math to determine how the vectors cancel each other out.
Did i start something that is really too hard for me ? This is my code so far
Code:
Dim F As Double
Dim G As Double
Dim d As Double
'type
Private Type o
X As Double
Y As Double
m As Double
v As Double
End Type
'declarations
Dim o() As o
Dim i As Integer, j As Integer
'initialize
Private Sub Form_Load()
G = 6.673 * 10 ^ (-11)
ReDim o(1)
'initialize masses
For i = 0 To UBound(o)
o(i).X = Int(Rnd * Form1.ScaleWidth)
o(i).Y = Int(Rnd * Form1.ScaleHeight)
o(i).m = Int(Rnd * 100) + 1
Next i
End Sub
'timer control
Private Sub Timer1_Timer()
'draw them
For i = 0 To UBound(o)
Form1.DrawWidth = o(i).m
Form1.PSet (o(i).X, o(i).Y), vbBlack
Next i
'do the math...
For i = 0 To UBound(o)
For j = 0 To UBound(o)
If i <> j Then
'calculate distance between objects
d = Sqr((o(i).X - o(j).X) ^ 2 + (o(i).Y - o(j).Y) ^ 2)
'calculate force
F = G * o(i).m * o(j).m / (d ^ 2)
'adjust acceleration of object
'Side note: I know the o(i).m cancel out, but just for clarity i left it
o(i).v = o(i).v + (F / o(i).m)
'what do i do with this velocity now ??? it has to have a direction, not just a number!
End If
Next j
Next i
End Sub
Pull Data In Chart
URGENT!!
Just wrote a macro that
1) deletes the existing column chart
2) creates a new chart with one data entry
3) updates the chart by pulling additional input data into the chart. Both the chart and the input data are located on the same sheet.
The program is running.
If I want to apply the same macro on a different sheet in the same workbook by only adjusting some data ranges and sheet/workbook names a weird error occurs:
"Run-time error '5': Invalid procedure call or argument"
The debugger flags the following line of the source code:
ActiveChart.Location Where:=xlLocationAsObject, Name:="Total Amount of Claims per Year"
Despite the above line, the new chart is inserted on a new sheet. It should be inserted on the same sheet that contains the input data. Do I have to put in "other words". It seems that there is no logical and semantically mistake.
Here is a part of the source code including the critical line:
'create chart
Range("A1").Select
Charts.Add
ActiveChart.ChartType = xlColumnStacked
ActiveChart.SetSourceData Source:=Sheets("Total Amount of Claims per Year").Range("B2"), PlotBy:= _
xlRows
ActiveChart.SeriesCollection(1).XValues = "='Total Amount of Claims per Year'!R1C2"
ActiveChart.Location Where:=xlLocationAsObject, Name:="Total Amount of Claims per Year"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Total Amount of Claims per Year"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
I appreciate any advice or question as this is a really urgent project.
Thank you.
Pull Down Sheets Tabs
I have seen this somewhere before so I know it is possible.
I want each sheet label ( The ones with the different worksheets names on them) to be a drop down where I can select multiple sheets.
Please help.
Pull A Computers Information?
I would like to find out how much disc space is free/available on a server we have here, and then the size of a file, how can I do this with VBA? any hints?
thanks
-Steve
Pull Information From Access To VB.
I am using Visual Basic 6.0 Professional. What I am looking to do is simply have three fields on a VB Form, type a number into the first field and have it pull the matching information information from an Access database to the other fields. The number I would type in would be the key field in Access.
I am really new to VB and read the tutorial that was listed at the top of this board but it seemed to have focus on just pulling the information over. Does anyone know a good tutorial for what I am trying to do?
Sorry to bother everyone.
Icons On The Pull-down Menus
Anyone know how to put icons in pull-down menus? I'm using the VB Menu Editor to construct the pull-down menus, but there doesn't seem to be a way to put a little icon next to the menu item.
(Like a helpbook icon next to the Contents item in the Help pull-down menu.)
Any ideas?
Thanks.
|