|
Hello all
I am having a small problem which I was hoping I could get help with. I am loading a local web page into the webbrowser control (Framework 2.0), and have made the control real small. My goal is to have it sort of look like a large thumbnail of the rendered web page.
The issue I am having is, no matter what size I make the control, the web page itself is always "full size". So with a real small webbrowser control, I end up just seeing a small amount of the upper left corner of the page. I want to see the entire page, just much much smaller. THumbnail sized.
Any help is greatly appreciated.
|
|
|
|
|
I'm going to try to make this simple. I use thunderbird as my email client on my pc. I have written a program that uses MAPI to send a message. I need to test it with Outlook. I set up an email account in outlook that works nicely. I then set the default email client to outlook. But, my program still launches thunderbird. Thunderbird tells me it isn't the default email client and mailto: now uses outlook so I know the default email client has been changed to outlook. It's not my code as in windows explorer if I select a file then right click and select Sendto/Mail recipient it still opens thunderbird too.
I've been searching the web for over a day now and I've read all kinds of stuff about mapi but can't figure out what is going wrong.
It appears the mapistub.dll has replaced mapi32.dll as they are the same size and dates. I think this is normal.
There is no mapi32x.dll on my system anywhere.
In the registry
the default mail client is set to Microsoft Outlook
outlook's dllpath is mapi32.dll
thunderbird's dllpath is c:\progra~1\mozill~2\mozmapi32.dll
I am running Windows XP Pro 2002 SP2, Outlook 2000 Sr-1, Thunderbird 1.5.0.2
I'm hoping someone here can help. Thanks
|
|
|
|
|
The "default mail program" does not impact MAPI -- it is a user setting, while MAPI provider is, unfortunately, a system setting.
First, see if System.Web.Mail will get the job done for you -- if it will do what you need, use it. I have not used it with Thunderbird, so I don't know if it will call through. If System.Web.Mail won't get the job done, then try Collaboration Data Objects (CDO), and verify it won't get the job done. If CDO works, it will be a better choice than MAPI. It gives you an object model, etc. and doesn't require nasty p/Invoke calls.
The MAPI32.DLL switch operates based on these registry keys (source: Platform SDK)
HKEY_LOCAL_MACHINE\Software\Clients\Mail\(default)
HKEY_LOCAL_MACHINE\Software\Clients\Mail\Provider1
HKEY_LOCAL_MACHINE\Software\Clients\Mail\Provider2
HKEY_LOCAL_MACHINE\Software\Clients\Mail\Provider3
Where Provider1, Provider2 and Provider3 are MAPI providers.
Underneath each provider, find the following:
(default) -- this is the display/text name of the provider
DLLPath -- this is the file name (without a path) of the DLL
DLLPathEx -- this should be the fully qualified path
MSI* -- information to do the install
Also check for these registry entries, which can overide the MAPI used for specific applications:
HKLM\Software\Microsoft\Windows Messaging Subsystem\MSMapiApps::exchng32.exe = ""
(route call directly to Mapi32x.dll)
HKLM\Software\Microsoft\Windows Messaging Subsystem\MSMapiApps::msspc32.dll = "Microsoft Outlook"
(route call using Microsoft Outlook key under HKLM\Software\Clients\Mail)
Also, try this (from platform SDK):
In the event that an application overwrites Mapi32.dll, you can restore it using Fixmapi.exe. Fixmapi.exe can be found in the same location as the stub library itself, usually C:\Winnt\System32 for Microsoft Windows NT version 4.0 systems. This utility copies the current Mapi32.dll (the new DLL that overwrote the stub library) to Mapi32x.DLL, and then copies the stub image, contained in the Mapistub.dll file, to Mapi32.dll. There are no arguments for Fixmapi.exe.
If the MAPI DLL was provided by Netscape or Eudora e-mail clients, the DLL is renamed to Nsmapi.dll or Eumapi.dll respectively, and the appropriate HKLM\Software\Clients\Mail subkey and DLLPath value are created. The DLLPath value points to the renamed DLL because neither DLL supports extended MAPI calls, so the DLLPathEx value is not needed.
Again, if at all possible I would go with System.Web.Mail or CDO. These should "do the right thing" and correctly route through Thunderbird or Outlook. If it is not possible to route through these implementations, and you do have to call MAPI directly, then I would probably allow the user to select a provider from the list.
|
|
|
|
|
First, my understanding is that system web mail does not actually open your default mail client but sends the message itself. I'm not sure about CDO. I'm trying to replicate the action of the Send To/Mail Recipient found in Windows Explorer. It's what we want.
As for my MAPI setup everything you spoke of looks correct still it doesn't work.
|
|
|
|
|
Well, I tried uninstalling and reinstalling and recreating the accounts in Outlook and I still can't get Outlook to come up when I select Send To/Mail Recipient. Let make this even simplier. Just get me that. I don't want to program anything any more. I want to make Send To/Mail Recipient bring up Outlook. Can anyone tell me how?
|
|
|
|
|
Dave Bacher wrote: The "default mail program" does not impact MAPI -- it is a user setting, while MAPI provider is, unfortunately, a system setting.
Apparently it does. I'd tried changing the default mail program using use Start/Settings/Control Panel/Internet Options many times and it didn't work. But after I used the "Set Program Access and Defaults" icon, located in the Start menu somewhere and in the "Add or Remove Programs" tool in Control Panel to set the default mail program to--as Outlook wasn't an option--Outlook Express things started working.
Now using Start/Settings/Control Panel/Internet Options I can change my "default mail program" and the mail program launched by my vb program via mapi changes as does the mail program launched by Send To/Mail recipient in windows explorer. I haven't been in "Set Program Access and Defaults" since. Just use Start/Settings/Control Panel/Internet Options. I've changed it from Outlook to Thunderbird and back several times w/o rebooting or even closing my application and whatever I select as my default mail program is the mail program that is started when I click the button to send mail in my program.
Why this works and why it wasn't I don't know but my experiences clearly show changing the default mail program in Start/Settings/Control Panel/Internet Options will change the mail program started by mapi (at least as it is used in my sub). Further my experiences strongly suggest that microsoft uses mapi the same way as I do in their windows explorer send to/mail recipient functionality.
Anyway, thanks for the help and I'm working good now.
|
|
|
|
|
Please email me at Sterling.wright@comcast.net
I am trying to undo a range in excel. However, I can't get the script to work. I want to add in funcationality to undo a specificied range. I tried Application.Undo. But, it only resets Cell D106.
Please See Script Below
Private Sub CommandButton1_Click()
Dim Config As Integer
Dim Ans As Integer
Dim MaxVal As Integer
Dim UserEntry As String
Dim Msg As String
Dim DblEntry As Double
MaxVal = ActiveSheet.Range("D107")
UserEntry = ActiveSheet.Range("D106")
If UserEntry > MaxVal Then
Config = vbCritical + vbQuestion + vbDefaultButton2
Ans = MsgBox("Are you sure you want to use more hours than you are budgeted?", Config)
End If
End Sub
|
|
|
|
|
Sir,
I am displying images into the img tag in datalist control.Now the problem is when I acces the images from the database and showing the images into datalist ,there lies no difference in portrait and landscape images.I mean in the img tag in the datalist control i am mentioning the height and width.so both images either show themselves portrait or landscape.If i don't mention the dimensions(height and width) then some pictures coved one and a half page and som 2.Do I have to mention the height and width of the img tag in datalist control at runtime.If so how to do it.
Please sort out the problem
If possible please send the project with solution file.
Thanks and Regards
Amaneet Brar
|
|
|
|
|
Hi,
yes you can set the properties of that at the runtime in the OnItemDataBound event of the datalist. If you are know it that whether the image is landscape or portrait then depending upon the condition it can be set.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Sir,
I am using the update query and there is occuring the problem
There is a syntax error in update command.
Please sort out the problem
Thanks and Regards
amaneet Brar
str = "Provider = Microsoft.jet.Oledb.4.0;Data Source =" + Server.MapPath("\sandeep\sujok\sujok.mdb")
con = New OleDbConnection(str)
con.Open()
Dim sdd As String = "Update admin Set password ='" & txtNewPassword.Text & "' where user_id = 'ddd' and password = 'aa'"
cmd = New OleDbCommand(sdd, con)
cmd.ExecuteNonQuery()
con.Close()
-- modified at 8:51 Thursday 18th May, 2006
|
|
|
|
|
You are injecting text directly into your SQL string. This can compromise the security of your database and your application. You should, at least, use parameterised queries. See SQL Injection Attacks and Tips on How to Prevent Them.[^]
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
|
I am going to using DSOFILE.dll in my application.
It is a free component provided by Microsoft, but I find most of client doesn't have this component.
For easy maintainance, I hope this component can embed to my application.
How can I do that? I don't wanna use shell() actually.
Thank you friends.
|
|
|
|
|
hi all,
i want to change index colunm in datagrid at runtime.
pls help with code
thanks
vipin paliwal
|
|
|
|
|
hi,
Can you give a bit more detail.
Best Regards,
Apurva Kaushal
|
|
|
|
|
There are 2 forms, named as form1 and form2
form1_onLoad
dim a as new form2
a.showDialog(me)
when the form2 closed(dispose), the focus will back to form1.
The case is, after form2 dispose, the screen will refresh shortly.
I have tried a lot of time, it seems that my application will minisize in a shorttime and then show the form1.
How can I remove the "refresh" ?
|
|
|
|
|
Hi,
I am making a Contact Database program with vb.net and MS Access 2003. I have 5 tables within the database and they are all relationed with the Contacts tabel. Now I have a Country table and I am using a combobox to the tabel with some countries that i wrote them from the database. Now how can i add a new country from the combobox within the program because he is not updating the new country into the combobox. can someone help me with this pls??
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Hi,
If I have understood correctly then you want to add some item to the combobox at dynamically, if so then you can use
ComboBox1.Items.Add("name")
Best Regards,
Apurva Kaushal
|
|
|
|
|
i cannot because an error occurs telling me:
CANNOT MODIFY THE ITEMS COLLECTION WHEN THE DATASOURCE PROPERTY IS SET.
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Hi Adrian,
It seems that you can't an item to the combobox once it has been assigned the datasource for it. So one solution could be to add whatever item you want in the datatable itself and then bind it to the combobox.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Using VB 2005.
I have a form on my Web Browser and it says search google. I have a textbox "txtGoogle" and when you click the search button "btnsearch" it will bring up search in www.google.co.uk in another form "Webbrowser.vb" in webbrowsercontrol "Dmxwebbrowser" how would you do this? (The form webbrowser.vb will be open already. if not I want it to load)
In the end we're all just the same
-- modified at 5:44 Thursday 18th May, 2006
|
|
|
|
|
Do a few searches on google, you'll work out how to build a search URL.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
And keep your eye on the Address bar while searching...
Yuvi Panda T
15 Year old Microsoft Student Partner
Blogs at : http://yuvipanda.blogspot.com
|
|
|
|
|
hi all,
how to find whether scanner in usb is connected or discoonected.
i would like to know the status of the scanner connection via USB.
whether its possible using code?
thanks in advance,
bye .
|
|
|
|
|
help me to solve the above isuue.
Is there any way to find the hardware connected or hardware details using
code.
thanks,
|
|
|
|