|
Instead, change the Form reference to be an "IContainer" control since all Controls and Forms inherit from IContainer.
|
|
|
|
|
Thanks for the reply. But I'm new to .NET. If you mean, have the main form inherit from System.Windows.Form.IContainerControl it doesn't work. At least I get an error that says classes can inherit only from classes.
|
|
|
|
|
I'm trying to send email from within VB.NET and I get the following error: "Could not access 'CDO.Message' object." when I try to send the message. Here's a brief summary of my config:
Running Windows 2000, SP3 on our Company Ethernet with MS Echange email server
Code:
Imports System.Web.Mail<br />
<br />
'These 3 were added while I was debugging the problem, but they don't seem to help<br />
Imports CDO <br />
Imports MAPI <br />
Imports MSMAPI<br />
.<br />
.<br />
Dim MailMsg As System.Web.Mail.MailMessage<br />
Dim MailSrvr As System.Web.Mail.SmtpMail<br />
.<br />
.<br />
.<br />
.<br />
MailMsg = New System.Web.Mail.MailMessage()<br />
MailMsg.From = "from@email"<br />
MailMsg.Body = "Test Message!"<br />
MailMsg.Subject = "HI"<br />
MailMsg.To = "to@email"<br />
Try<br />
MailSrvr.Send(MailMsg)<br />
Catch err As Exception<br />
Debug.WriteLine(err.Message)<br />
End Try
Without fail, I get the error message. It seems to me that the code is right, but I must be missing a service or config somewhere. I've searched high and low on the web, MSDN, and .NET's sorry documentation but can't find out what's up.
Any ideas?
|
|
|
|
|
Have you set the MailSrvr.SmtpServer property yet??. You need to set it to the IP of your Mail Server.
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
Thank you for your help. It seems so obvious , but none of the examples or references I had found, actually said that. I set it to the name of our mail server, and it worked.
|
|
|
|
|
txtFind is a textbox that is used for search purposes (ie if a value is entered and the text box looses focus, a grid appears displaying a range of results). However, if no value is entered and it looses focus, i want the focus to be set on another text box:
If txtFind.Text = "" Then
txtCustomerCode.SetFocus
Exit Sub
End If
However, this generates the error: "Invalid procedure call or argument", is there anything i can do to alleviate this? thanks in advance for any help!let me know if any additional detail is required.
|
|
|
|
|
Hi !
I get this same error when the control to which I want to set the focus is not visible.
Jerome
|
|
|
|
|
First of all, make sure you have another Control that can get Focus (i.e. It must be Enabled and if there is an "AllowFocus" property, set it to true).
Then in the Validate Event:
If (txtFind.Text.Length = 0) Then txtNext.Focus():Exit Sub
'Otherwise, populate Grid Here
|
|
|
|
|
hello all...
i am looking for an API for VB6 to interface the parallel port...i.e. i want to input and output data from external electronic circuits to a visual basic 6 program...
does anyone know where i can get such an API ??
Thanx
|
|
|
|
|
Hello,
I'm using VB.NET and i was just wondering, how can i make a window flash 3 times; when the user clicks on it while the property Enabled is set to false.
Any help would be greatly appreciated. Thanks.
|
|
|
|
|
u can use the flashWindowEx api function defined in user32.lib
enjoy
<marquee>rishabhs
|
|
|
|
|
Could you please be more specific. I'm not that good with APIs, and I have never done this before. Thanks.
|
|
|
|
|
actually its very simple to do
just open the api viewer (either thru addin menu in the ide or from program group (tools)
then load file win32api.txt in the api viewer (file->open)
add declaration for FlashWindow in ur code
another alternate way is to search for file WIn32api.txt (in visual studio folder\common tools) and copy decl of the function in ur code
now all u have to do is to just call the function FlashWindow anywhere in ur code and see ur window flashing once
put the first param as ->
and 2'nd param is to specify whether window inverts its state after flasing or not (See MSDN)
if u want to flash n times then
add FlashWindowEx function along with FLASHWINFO struct in same way as i told u
i hope now u can make it work
enjoy
|
|
|
|
|
I'm having problems with my VB ole control. I inserted the (wordpad) object inside the form, and added the code doverb to display it at run time, but the menu items are not displayed. If i run the program with doverb and use double click on the control the menu is displayed. Any ideas.
Thanks
|
|
|
|
|
I'm having problems with my VB ole control. I inserted the (wordpad) object, and added the code doverb to display it at run time, but the menu items are not displayed. If i run the program with doverb and use double click on the control the menu is displayed. Any ideas.
Thanks
|
|
|
|
|
I've created a windows service using VB.NET, the service monitors the users actions and should lanuch an application if particular set of conditions have been meet. The problem I'm having is the launch of the windows application from the service. I found an explaination to my problem in MSDN "Process created by the service cannot display a user Interface". I think if I start a new process/thread as the current user not the service I should be able to start my application. My problem...How do you create a new process/thread as the current user?
If anyone has a solution or idea I would greatly appreciate it. Thanks
There are 10 types of people in the world:
Those who understand Binary and those who don't.
|
|
|
|
|
i get the above error when i try to generate a report in vb. i am using the report designer, but i have checked the report and there is not label or text field or anything lapping over page - what could be the problem? any help would be greatly appreciated!
|
|
|
|
|
try decreasing the report size in the design...i.e. pull the side inwards a little bit....
|
|
|
|
|
plz help....
I used to use control array in vb which is currently not support by vb .net. For example, if i have 5 text box and make it as control array of text(0), text(1)...text(4) to refer to respective text control. what happen is i have a problem of refering to the control in the form when the control having the focus by press the f3 key to call the lookup windows...in vb .net. Attached with sample code for your reference and understanding in VB.
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
With ActiveControl
Select Case KeyCode
Case vbKeyF3
Select Case .Name
Case "text"
Select Case .Index
Case cozsys_textbox0
If Lookup("select zsys_comid as Company_ID, " & _
"zsys_comnm as Company_Name, " & _
"zsys_regno as Register_No " & _
"from zsys order by zsys_comid") Then
.Text = LookupFields("Company_ID")
Case cozsys_textbox1
Case cozsys_textbox2
Case cozsys_textbox3
End If
End Select
text(.Index).SetFocus
text(.Index).DataChanged = False
End Select
End Select
End With
End Sub
where cozsys_textbox0, cozsys_textbox1, cozsys_textbox2, cozsys_textbox3 is the array index for text box 1 to 4
How could we refer the control array in the calling Private Sub form1_KeyDown(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown in vb .net. Please help me ? Any other methods ?
Thank you very much
Gilbert
|
|
|
|
|
HI,
Is there a way I can use the windows "file moving" animation that explorer moves?
I have a program that takes a file/directory, does some hashing stuff etc etc and then moves the files to a new directory, and performs the same hashing algorhythms to nathermatically prove files did not change between locations...
I want the "file moving" animation to pop up while I am doing it....
can it be done, or do I have to build my own??
Thanx
|
|
|
|
|
Is it possible to freeze columns in the MSHFlexGrid control? If not, is there another control that can be used in VB6 in which columns can be frozen in the same way that Freeze Panes works in MS Excel?
|
|
|
|
|
Dear Sirs,
I develop a mediaplayer (mPlayer.exe), which uses the runtime argument to pass in the file name that refers to the movie to be played back in the player.
Instead of entering the file name each time when I run the mPlayer.exe, is there any way I can develop a wrapper, which will make use of the mPlayer.exe and the file name as input and generate a new mediaplayer inside which the file name had been hardcoded. Thus a stand alone executable could be run instead of a mPlayer.exe and a file name.
I tried to do like this because only the new wrapper and the excutable mediaplayer (mPlayer.exe) could be released under my current development plan.
Thanks
DJ
|
|
|
|
|
I have a component(dll) which is registered on COM+.The dll has only one add
method and return a value.Now i want to access this component from another
machine.I am wrote the code in VB as activex exe which i have checked option
for remote server files also.
i just want to know how to access this dll from anyother machine.What are
the steps involve in that process.
|
|
|
|
|
on the machine where you have installed the component in COM+, go to the application, and choose Export. Then select Application Proxy.
This will setup the right informaiton, and create an MSI installed file.
Now go to the machine where you want to use the component, and run this MSI.
YOu will now be creating the instance of the component on your com+ server.
|
|
|
|
|
Hi,
I have a dataset that is ordered by an account number. But I also want to access this dataset by last name. When I setup my combo box with last name, I can move around the dataset but the names are not in order. I've setup another dataset where the SQL pulls in name order. Does anyone have some code I can use as an example to move my main dataset around using my sorted name combo box? Thanks in advance.
Thanks,
Mike
|
|
|
|