|
You will have to modify your Access database
Here is an example
It has a menu toolbar to direct to various printers or email
'http://www.attcanada.net/~kallal.msn/msaccess/DownLoad.htm
' Acesss97 example With ms-access interface hidden:
And here is the method to call it.
I tested this with another Access program but should work with VB.
You can even remove the Access Key Icon or set to your own
in the upper corner, can't remember how but have done it.
Option Compare Database
Option Explicit
Private Const SW_SHOWMAXIMIZED = 3
Private Const SW_SHOWNORMAL = 1
Private Const SW_HIDE = 0
Private Declare Function apiSetForegroundWindow Lib "user32" _
Alias "SetForegroundWindow" _
(ByVal hWnd As Long) As Long
Private Declare Function apiShowWindow Lib "user32" _
Alias "ShowWindow" _
(ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Sub test()
'http://www.attcanada.net/~kallal.msn/msaccess/DownLoad.htm
' Acesss97 example With ms-access interface hidden:
Dim accRpt As Access.Application
Set accRpt = CreateObject("Access.Application")
With accRpt
.Application.OpenCurrentDatabase ("C:\WordVBA\Kallal Word Merge Easy Samples\WordMerge22\WordMerge22.mdb")
.Application.DoCmd.Maximize
.Application.Visible = True
Call apiSetForegroundWindow(.hWndAccessApp)
'Call apiShowWindow(.hWndAccessApp, SW_SHOWNORMAL)
Call apiShowWindow(.hWndAccessApp, SW_SHOWMAXIMIZED)
' Call apiShowWindow(.hWndAccessApp, SW_HIDE)
' .Application.DoCmd.OpenForm "frmDefaultPrinterList"
'displays the custom toolbar named CustomToolbar in all Microsoft Access windows that become active:
.Application.DoCmd.ShowToolbar "Rides Print", acToolbarYes
'DoCmd.ShowToolbar
.Application.DoCmd.OpenReport "Contacts", Access.AcView.acViewPreview
'Set the focus to MSACCESS
'Dim lngAcc As Long
' lngVal = FindWindow("OMain", ByVal 0&)
' lngAcc = SetFocusAPI(lngVal)
'must close form to exit second app 'acReport=3;acObjStateOpen=1
Do While .SysCmd(acSysCmdGetObjectState, acReport, "Contacts") = acObjStateOpen
DoEvents
Loop
.Quit acQuitSaveNone
'MsgBox "Print"
End With
Set accRpt = Nothing
End Sub
|
|
|
|
|
Hi All,
I want to view inbox of outlook Express in my application.
How to??
Regards
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
Hi
I have used WebBrowser control and i want to save the entire webpage including pictures etc.
i have called ExecWB method of WebBrowser control with OLECMDEXECOPT_DONTPROMPTUSER flag, but it opens save as dialog box.
I want automatically save the webpage without using save as dialog box.
"Is there any way of save as webpage?"
regards
programmer2004
|
|
|
|
|
I'd like to know the answer to this myself. Were you able to get the form to run in a Web browser? Specifically IE?
|
|
|
|
|
Hi
How to find which windows API(.dll) is getting called when working with some events.
for e.g. when click on windows open menu, save menu, print menu.
once API knows then how to find all function list and syntax of that functions?
Please anyone can help me?
Regards
|
|
|
|
|
Basically, you can't. This would require very advanced debugging skills and a kernel debugger with a checked build of Windows running. You can't do it on a standard install of Windows using the debugger in the VS.IDE.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
1. How to set a tab page visibility at runtime?
2. I have a form that runs minimized, but it has an notify icon. Once i click the notify icon, i set the windows state to normal. When running the form, i click the notify icon, it will show me error message System.Windows.Form: '0' is not a valid for 'value'. 'value' should be between 'minimum' and 'maximum'
How to solve it?
Thanks.
Special thanks to Dave Kreskowiak
|
|
|
|
|
I am developing an application for my college campus .Here is the brief description of my project.
Assuming that the campus residents have pda/handset, this application will have following capability.
Allow the user who is at location A wanting to reach location B in the campus,will receive directions and a map and minimum time required to reach destination in his handset/pda.The directions will not be static but will change based upon the users location.
I would like to do application using visualstudio.net compact framework and mappoint webservice.
Mappoint Webservice do not provide maps for university campus map and so on.
I find so many samples using datasource MAPPoint.NA...
But I am not getting how to add my college map and get the directions..using Mappoint webservice..
How I can add my campus map and provide directions for ex:between library and some administration building and so on... to the mappoint webservice.
what are the data sources I need to create in sql server CE?
I have limited timeframe..Your help is greatly appreciated.
thanks
agith
|
|
|
|
|
agith wrote:
But I am not getting how to add my college map and get the directions..using Mappoint webservice..
Uhhh...The datasource is maintained by Microsoft. You can't add you university map to it...
[EDIT]
Silly me, after double checking with the latest MapPoint SDK, it appears you CAN upload points of interest, but I fail to see how you can upload your "map". It doesn't appears as though to can upload your own map.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Q1
I am writing an application program in VB.NET. How can I make buttons (or other features) on the form that open certain documents saved in Excel, or Powerpoint or Word?
Q2
In a form that with a textbox2 that lists integers that a user input using a textbox1, how can I code the form such that the user only needs to input an integer and strike ENTER so that the integer he has input is added to textbox2. I have this running already but at the moment the user has to keep on clicking a button, which takes much time.
Ben
|
|
|
|
|
bensoncd wrote:
I am writing an application program in VB.NET. How can I make buttons (or other features) on the form that open certain documents saved in Excel, or Powerpoint or Word?
You could put a Link Label on the form and just handle the click event. Put something like the following code in there to launch the file, say a Word document, you want:
Dim procStartInfo As New ProcessStartInfo(fullPathToWordDOCFile)
procStartInfo.UseShellExecute = True
Process.Start(procStartInfo)
bensoncd wrote:
In a form that with a textbox2 that lists integers that a user input using a textbox1, how can I code the form such that the user only needs to input an integer and strike ENTER so that the integer he has input is added to textbox2. I have this running already but at the moment the user has to keep on clicking a button, which takes much time.
The easiest way is to make that button the default button on the form. Just click on the form that holds that button and the textbox. Go to the properties of the form and find the AcceptButton property. Click on the dropdown in there and select the button that you want to be the default button clicked when the user hits Enter.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you Dave, Let me give it a try
|
|
|
|
|
Help:
Do you remember in VB6 we had Wizard Manager that provided help to create an end-user wizard.
Is there a similiar add-in in VB.net?
|
|
|
|
|
No, not out-of-the-box. There may be a 3rd party addin, but I can't find one.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Perhaps you should post this in the "Article Requests" forum.
my blog
|
|
|
|
|
I am having trouble using MSDE with VB.NET Standard. I’m trying to study the book ADO.NET Step by Step, but it’s practice file installation instructions assume I have VB Studio, which includes a servers node. The Standard edition does not include a servers node and I can’t figure out how to access the database without it.
The Standard edition does not include MSDE, so I downloaded it separately. I believe I installed it correctly, creating the VSDOTNET instance, but I have no way to check and see if it’s setup properly. If I need to add the connection manually in VB, I’m not sure what the name of my server is, or my user name and password.
I can’t be the first person who’s run into this problem. Can anyone tell me what to do? Thanks.
|
|
|
|
|
Unfortunately, MSDE does not include any tools to actually access the database. All is not lost though -- you can try either:
* .NET Enterprise Manager (web based)
* download the new MSDE (beta) which does include tools
my blog
[EDIT: the new beta does not include tools at this time, although later versions will ]
|
|
|
|
|
Or download SQL Server 2000 trial and install ONLY the tools (not the server engine). The tools don't expire...
|
|
|
|
|
I tried ASP.NET Enterprise manager, but it asked me for a user ID and password and I don't know what these are. Any ideas?
|
|
|
|
|
Did you try a username of "sa" and a blank password? Works in 90% of cases
my blog
|
|
|
|
|
Didn't work. I got some help from Kelly Martens using VNC. She was referred to me by the author of ADO.NET Step by Step, Rebecca Riordan. She configured my system properly. Hopefully it will stay fixed. I just finished a grueling VNC session with her and I'm beat. Don't think I want to risk breaking things right now. Thanks for you help anyway.
Ellison
|
|
|
|
|
This is my code in VB.Net:
Dim dirDate As Date = Now()
dirStrDate = String.Format("D:\test\{0}", dirDate.ToString("MMyy"))
If System.IO.Directory.Exists(dirStrDate) Then
Textbox1.Text = "Directory Found!"
End If Everything works on my local drive, but how do I search a network drive? If I use
dirStrDate = String.Format("K:\test\{0}", dirDate.ToString("MMyy")), it doesn't fail but nothing ever returns, even if the directory does exist on that drive.
Any help aprecciated. Thanks
|
|
|
|
|
What happens exactly and on what line. The line you have
dirStrDate = String.Format("K:\test\{0}", dirDate.ToString("MMyy"))
will return no matter what. Are you saying that your app hangs on the following line:
If System.IO.Directory.Exists(dirStrDate) Then
????
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
It looks for directory 0704 in K:\test\. Nothing ever hangs but it never finds the directory. There is an 0704 directory in K:\test\. It should find it as it does on my local drive. If I use D:\test\, then it finds the 0704 and says directory found. It acts as if I need to provide maybe my login information? I have run out of ideas.
Thanks
|
|
|
|
|
Sorry,
It does find it in VB.Net. I wrote the small app in VB.Net and it worked. The problem I am having is when I apply it to my VB.Net and ASP.Net project, it doesn't work. It never sees the network. I guess when it goes out and comes back, I somehow need it to see my network. Any suggestions??
Thanks
|
|
|
|